summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/gridwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/gridwin.cxx')
-rw-r--r--sc/source/ui/view/gridwin.cxx686
1 files changed, 343 insertions, 343 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0f07b8772254..ee6f2b67dd5b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -133,9 +133,9 @@ using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
-const BYTE SC_NESTEDBUTTON_NONE = 0;
-const BYTE SC_NESTEDBUTTON_DOWN = 1;
-const BYTE SC_NESTEDBUTTON_UP = 2;
+const sal_uInt8 SC_NESTEDBUTTON_NONE = 0;
+const sal_uInt8 SC_NESTEDBUTTON_DOWN = 1;
+const sal_uInt8 SC_NESTEDBUTTON_UP = 2;
#define SC_AUTOFILTER_ALL 0
#define SC_AUTOFILTER_TOP10 1
@@ -151,8 +151,8 @@ enum ScFilterBoxMode
};
extern SfxViewShell* pScActiveViewShell; // global.cxx
-extern USHORT nScClickMouseModifier; // global.cxx
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern sal_uInt16 nScClickMouseModifier; // global.cxx
+extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
#define SC_FILTERLISTBOX_LINES 12
@@ -176,12 +176,12 @@ private:
ScGridWindow* pGridWin;
SCCOL nCol;
SCROW nRow;
- BOOL bButtonDown;
- BOOL bInit;
- BOOL bCancelled;
- BOOL bInSelect;
+ sal_Bool bButtonDown;
+ sal_Bool bInit;
+ sal_Bool bCancelled;
+ sal_Bool bInSelect;
bool mbListHasDates;
- ULONG nSel;
+ sal_uLong nSel;
ScFilterBoxMode eMode;
protected:
@@ -199,11 +199,11 @@ public:
SCCOL GetCol() const { return nCol; }
SCROW GetRow() const { return nRow; }
ScFilterBoxMode GetMode() const { return eMode; }
- BOOL IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
+ sal_Bool IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); }
void EndInit();
- BOOL IsInInit() const { return bInit; }
- void SetCancelled() { bCancelled = TRUE; }
- BOOL IsInSelect() const { return bInSelect; }
+ sal_Bool IsInInit() const { return bInit; }
+ void SetCancelled() { bCancelled = sal_True; }
+ sal_Bool IsInSelect() const { return bInSelect; }
void SetListHasDates(bool b) { mbListHasDates = b; }
bool HasDates() const { return mbListHasDates; }
};
@@ -217,10 +217,10 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
pGridWin( pGrid ),
nCol( nNewCol ),
nRow( nNewRow ),
- bButtonDown( FALSE ),
- bInit( TRUE ),
- bCancelled( FALSE ),
- bInSelect( FALSE ),
+ bButtonDown( sal_False ),
+ bInit( sal_True ),
+ bCancelled( sal_False ),
+ bInSelect( sal_False ),
mbListHasDates(false),
nSel( 0 ),
eMode( eNewMode )
@@ -235,13 +235,13 @@ __EXPORT ScFilterListBox::~ScFilterListBox()
void ScFilterListBox::EndInit()
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nSel = 0;
else
nSel = nPos;
- bInit = FALSE;
+ bInit = sal_False;
}
void __EXPORT ScFilterListBox::LoseFocus()
@@ -262,7 +262,7 @@ long ScFilterListBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode = aKeyEvt.GetKeyCode();
if ( !aCode.GetModifier() ) // ohne alle Modifiers
{
- USHORT nKey = aCode.GetCode();
+ sal_uInt16 nKey = aCode.GetCode();
if ( nKey == KEY_RETURN )
{
SelectHdl(); // auswaehlen
@@ -289,16 +289,16 @@ void __EXPORT ScFilterListBox::SelectHdl()
{
if ( !IsTravelSelect() && !bInit && !bCancelled )
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
{
nSel = nPos;
if (!bButtonDown)
{
// #i81298# set bInSelect flag, so the box isn't deleted from modifications within FilterSelect
- bInSelect = TRUE;
+ bInSelect = sal_True;
pGridWin->FilterSelect( nSel );
- bInSelect = FALSE;
+ bInSelect = sal_False;
}
}
}
@@ -333,7 +333,7 @@ Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
// ============================================================================
-BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
+sal_Bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
{
// wenn es ein editierbarer Bereich ist, und rechts unten eine Matrix-Zelle
// mit Origin links oben liegt, enthaelt der Bereich genau die Matrix.
@@ -341,7 +341,7 @@ BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
if ( !pDoc->IsBlockEditable( rRange.aStart.Tab(), rRange.aStart.Col(),rRange.aStart.Row(),
rRange.aEnd.Col(),rRange.aEnd.Row() ) )
- return FALSE;
+ return sal_False;
ScAddress aPos;
const ScBaseCell* pCell = pDoc->GetCell( rRange.aEnd );
@@ -371,24 +371,24 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c
sal_Bool lcl_GetHyperlinkCell(ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScBaseCell*& rpCell )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{
pDoc->GetCell( rPosX, rPosY, nTab, rpCell );
if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE )
{
if ( rPosX <= 0 )
- return FALSE; // alles leer bis links
+ return sal_False; // alles leer bis links
else
--rPosX; // weitersuchen
}
else if ( rpCell->GetCellType() == CELLTYPE_EDIT)
- bFound = TRUE;
+ bFound = sal_True;
else if (rpCell->GetCellType() == CELLTYPE_FORMULA &&
static_cast<ScFormulaCell*>(rpCell)->IsHyperLinkCell())
- bFound = TRUE;
+ bFound = sal_True;
else
- return FALSE; // andere Zelle
+ return sal_False; // andere Zelle
}
while ( !bFound );
@@ -416,27 +416,27 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
mpDPFieldPopup(NULL),
mpFilterButton(NULL),
nCursorHideCount( 0 ),
- bMarking( FALSE ),
+ bMarking( sal_False ),
nButtonDown( 0 ),
- bEEMouse( FALSE ),
+ bEEMouse( sal_False ),
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
- bDPMouse( FALSE ),
- bRFMouse( FALSE ),
+ bDPMouse( sal_False ),
+ bRFMouse( sal_False ),
nPagebreakMouse( SC_PD_NONE ),
- bPagebreakDrawn( FALSE ),
+ bPagebreakDrawn( sal_False ),
nPageScript( 0 ),
- bDragRect( FALSE ),
+ bDragRect( sal_False ),
meDragInsertMode( INS_NONE ),
nCurrentPointer( 0 ),
- bIsInScroll( FALSE ),
- bIsInPaint( FALSE ),
+ bIsInScroll( sal_False ),
+ bIsInPaint( sal_False ),
aComboButton( this ),
aCurMousePos( 0,0 ),
nPaintCount( 0 ),
- bNeedsRepaint( FALSE ),
- bAutoMarkVisible( FALSE ),
- bListValButton( FALSE )
+ bNeedsRepaint( sal_False ),
+ bAutoMarkVisible( sal_False ),
+ bListValButton( sal_False )
{
switch(eWhich)
{
@@ -471,7 +471,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
SetUniqueId( HID_SC_WIN_GRIDWIN );
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
__EXPORT ScGridWindow::~ScGridWindow()
@@ -528,7 +528,7 @@ IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo )
return 0;
}
-void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr )
+void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr )
{
//! gridwin2 ?
@@ -538,13 +538,13 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
ScDPSaveData aSaveData( *pDPObj->GetSaveData() );
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( !bIsDataLayout )
{
@@ -558,7 +558,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSaveData( aSaveData );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -572,10 +572,10 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -614,13 +614,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
TypedScStrCollection aStrings( 128, 128 );
// get list box entries and selection
- BOOL bHasCurrentPage = FALSE;
+ sal_Bool bHasCurrentPage = sal_False;
String aCurrentPage;
ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab);
if ( pDPObj && nCol > 0 )
{
// look for the dimension header left of the drop-down arrow
- USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
@@ -629,7 +629,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// get current page from SaveData
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( pSaveData && !bIsDataLayout )
{
@@ -637,7 +637,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if ( pDim && pDim->HasCurrentPage() )
{
aCurrentPage = pDim->GetCurrentPage();
- bHasCurrentPage = TRUE;
+ bHasCurrentPage = sal_True;
}
}
}
@@ -645,7 +645,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
// include all entry widths for the size of the drop-down
long nMaxText = 0;
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -676,13 +676,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show must be called before SetUpdateMode
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(sal_False);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// fill the list box
- BOOL bWait = ( nCount > 100 );
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -695,9 +695,9 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (bHasCurrentPage)
nSelPos = pFilterBox->GetEntryPos( aCurrentPage );
@@ -748,7 +748,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -793,7 +793,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
Size aSize( nSizeX, nHeight );
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(sal_False);
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
@@ -844,12 +844,12 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS );
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
pFilterBox->GrabFocus();
// Select erst nach GrabFocus, damit das Focus-Rechteck richtig landet
//! SvLBoxEntry* pSelect = NULL;
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if (aCurrent.Len())
{
nPos = pFilterBox->GetEntryPos( aCurrent );
@@ -870,15 +870,15 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange )
CaptureMouse();
}
-void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
+void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect )
{
delete pFilterBox;
delete pFilterFloat;
- USHORT i;
+ sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nSizeX = 0;
long nSizeY = 0;
@@ -920,15 +920,15 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
pFilterBox->SetTabJustify( 1, bLayoutRTL ? AdjustRight : AdjustLeft );
*/
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
TypedScStrCollection aStrings( 128, 128 );
if ( bDataSelect ) // Auswahl-Liste
{
// Liste fuellen
- aStrings.SetCaseSensitive( TRUE );
+ aStrings.SetCaseSensitive( sal_True );
pDoc->GetDataEntries( nCol, nRow, nTab, aStrings );
if ( aStrings.GetCount() == 0 )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else // AutoFilter
{
@@ -940,8 +940,8 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
long nMaxText = 0;
// default entries
- static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER };
- const USHORT nDefCount = sizeof(nDefIDs) / sizeof(USHORT);
+ static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER };
+ const sal_uInt16 nDefCount = sizeof(nDefIDs) / sizeof(sal_uInt16);
for (i=0; i<nDefCount; i++)
{
String aEntry( (ScResId) nDefIDs[i] );
@@ -959,7 +959,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// check widths of numerical entries (string entries are not included)
// so all numbers are completely visible
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i=0; i<nCount; i++)
{
TypedStrData* pData = aStrings[i];
@@ -997,14 +997,14 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!!
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(sal_False);
pFilterFloat->SetOutputSizePixel( aSize );
pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS);
// Listbox fuellen
- USHORT nCount = aStrings.GetCount();
- BOOL bWait = ( nCount > 100 );
+ sal_uInt16 nCount = aStrings.GetCount();
+ sal_Bool bWait = ( nCount > 100 );
if (bWait)
EnterWait();
@@ -1015,11 +1015,11 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
}
//! SvLBoxEntry* pSelect = NULL;
- USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (!bDataSelect) // AutoFilter: aktiven Eintrag selektieren
{
@@ -1029,7 +1029,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryParam aParam;
pDBData->GetQueryParam( aParam ); // kann nur MAXQUERY Eintraege ergeben
- BOOL bValid = TRUE;
+ sal_Bool bValid = sal_True;
for (SCSIZE j=0; j<MAXQUERY && bValid; j++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(j).bDoQuery)
{
@@ -1038,7 +1038,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
ScQueryEntry& rEntry = aParam.GetEntry(j);
if (j>0)
if (rEntry.eConnect != SC_AND)
- bValid = FALSE;
+ bValid = sal_False;
if (rEntry.nField == nCol)
{
if (rEntry.eOp == SC_EQUAL)
@@ -1065,7 +1065,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
else
{
- ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
+ sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr(
nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue();
if ( nIndex )
{
@@ -1086,13 +1086,13 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
bool bSortList = ( pData->GetListType() == ValidListType::SORTEDASCENDING);
if ( bSortList )
{
- USHORT nStrIndex;
+ sal_uInt16 nStrIndex;
if (aStrings.Search(pNew,nStrIndex))
nSelPos = nStrIndex;
}
else
{
- USHORT nCount = aStrings.GetCount();
+ sal_uInt16 nCount = aStrings.GetCount();
for (i = 0; ((i < nCount) && ( LISTBOX_ENTRY_NOTFOUND == nSelPos)); i++)
{
if ( aStrings.Compare(aStrings[i], pNew)==0 )
@@ -1143,7 +1143,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
}
}
-void ScGridWindow::FilterSelect( ULONG nSel )
+void ScGridWindow::FilterSelect( sal_uLong nSel )
{
String aString;
/*
@@ -1155,7 +1155,7 @@ void ScGridWindow::FilterSelect( ULONG nSel )
aString = pStringEntry->GetText();
}
*/
- aString = pFilterBox->GetEntry( static_cast< USHORT >( nSel ) );
+ aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
@@ -1196,7 +1196,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr )
}
}
-void ScGridWindow::ExecFilter( ULONG nSel,
+void ScGridWindow::ExecFilter( sal_uLong nSel,
SCCOL nCol, SCROW nRow,
const String& aValue, bool bCheckForDates )
{
@@ -1223,13 +1223,13 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
else
{
- BOOL bDeleteOld = FALSE;
+ sal_Bool bDeleteOld = sal_False;
SCSIZE nQueryPos = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (!aParam.bInplace)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (aParam.bRegExp)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
for (SCSIZE i=0; i<MAXQUERY && !bDeleteOld; i++) // bisherige Filter-Einstellungen
if (aParam.GetEntry(i).bDoQuery)
{
@@ -1238,14 +1238,14 @@ void ScGridWindow::ExecFilter( ULONG nSel,
ScQueryEntry& rEntry = aParam.GetEntry(i);
if (i>0)
if (rEntry.eConnect != SC_AND)
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
if (rEntry.nField == nCol)
{
if (bFound) // diese Spalte zweimal?
- bDeleteOld = TRUE;
+ bDeleteOld = sal_True;
nQueryPos = i;
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
nQueryPos = i + 1;
@@ -1257,8 +1257,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).Clear();
nQueryPos = 0;
- aParam.bInplace = TRUE;
- aParam.bRegExp = FALSE;
+ aParam.bInplace = sal_True;
+ aParam.bRegExp = sal_False;
}
if ( nQueryPos < MAXQUERY || SC_AUTOFILTER_ALL == nSel ) // loeschen geht immer
@@ -1267,8 +1267,8 @@ void ScGridWindow::ExecFilter( ULONG nSel,
{
ScQueryEntry& rNewEntry = aParam.GetEntry(nQueryPos);
- rNewEntry.bDoQuery = TRUE;
- rNewEntry.bQueryByString = TRUE;
+ rNewEntry.bDoQuery = sal_True;
+ rNewEntry.bQueryByString = sal_True;
rNewEntry.nField = nCol;
rNewEntry.bQueryByDate = bCheckForDates;
if ( nSel == SC_AUTOFILTER_TOP10 )
@@ -1297,7 +1297,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
pViewData->GetViewShell()->UpdateInputHandler();
}
- pViewData->GetView()->Query( aParam, NULL, TRUE );
+ pViewData->GetView()->Query( aParam, NULL, sal_True );
pDBData->SetQueryParam( aParam ); // speichern
}
else // "Zuviele Bedingungen"
@@ -1331,7 +1331,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
rDestWin.nRFIndex = nRFIndex;
rDestWin.nRFAddX = nRFAddX;
rDestWin.nRFAddY = nRFAddY;
- bRFMouse = FALSE;
+ bRFMouse = sal_False;
}
if (nPagebreakMouse)
@@ -1345,26 +1345,26 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
}
}
-BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
+sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction )
{
// MouseEvent buttons must only be checked if bAction==TRUE
// to allow changing the mouse pointer in MouseMove,
// but not start AutoFill with right button (#74229#).
- // with bAction==TRUE, SetFillMode / SetDragMode is called
+ // with bAction==sal_True, SetFillMode / SetDragMode is called
if ( bAction && !rMEvt.IsLeft() )
- return FALSE;
+ return sal_False;
- BOOL bNewPointer = FALSE;
+ sal_Bool bNewPointer = sal_False;
SfxInPlaceClient* pClient = pViewData->GetViewShell()->GetIPClient();
- BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
+ sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
if ( pViewData->IsActive() && !bOleActive )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// Auto-Fill
@@ -1393,7 +1393,7 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
// where the Marking flag is set and MarkToSimple won't work anymore.
pViewData->GetMarkData().MarkToSimple();
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1414,21 +1414,21 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction )
aStartPos.X() += 2;
aEndPos.X() += 2;
}
- BOOL bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
+ sal_Bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 );
- BOOL bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
+ sal_Bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 &&
aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 );
if ( bTop || bBottom )
{
SetPointer( Pointer( POINTER_CROSS ) );
if (bAction)
{
- BYTE nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
+ sal_uInt8 nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB;
pViewData->SetDragMode(
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), nMode );
}
- bNewPointer = TRUE;
+ bNewPointer = sal_True;
}
}
}
@@ -1488,7 +1488,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// merken, dass FilterBox geloescht wird, damit sichergestellt
// ist, dass in diesem Handler nicht an gleicher Stelle wieder
// eine neue geoeffnet wird.
- BOOL bWasFilterBox = ( pFilterBox != NULL &&
+ sal_Bool bWasFilterBox = ( pFilterBox != NULL &&
((Window*)pFilterBox)->IsVisible() &&
!pFilterBox->IsDataSelect() );
SCCOL nOldColFBox = bWasFilterBox ? pFilterBox->GetCol() : 0;
@@ -1499,7 +1499,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
HideNoteMarker(); // Notiz-Anzeige
- bEEMouse = FALSE;
+ bEEMouse = sal_False;
ScModule* pScMod = SC_MOD();
if (pScMod->IsModalMode(pViewData->GetSfxDocShell()))
@@ -1511,11 +1511,11 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird
nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen
- BOOL bDetective = pViewData->GetViewShell()->IsAuditShell();
- BOOL bRefMode = pViewData->IsRefMode(); // Referenz angefangen
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
- BOOL bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
- BOOL bDouble = (rMEvt.GetClicks() == 2);
+ sal_Bool bDetective = pViewData->GetViewShell()->IsAuditShell();
+ sal_Bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE
+ sal_Bool bDouble = (rMEvt.GetClicks() == 2);
// DeactivateIP passiert nur noch bei MarkListHasChanged
@@ -1596,7 +1596,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
pScMod->SetInputMode( SC_INPUT_TABLE );
- bEEMouse = TRUE;
+ bEEMouse = sal_True;
bEditMode = pEditView->MouseButtonDown( rMEvt );
return;
}
@@ -1617,7 +1617,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) )
{
- bRFMouse = TRUE; // die anderen Variablen sind oben initialisiert
+ bRFMouse = sal_True; // die anderen Variablen sind oben initialisiert
if ( pViewData->GetActivePart() != eWhich )
pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ???
@@ -1627,7 +1627,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
+ sal_Bool bCrossPointer = TestMouse( rMEvt, sal_True );
if ( bCrossPointer )
{
if ( bDouble )
@@ -1642,10 +1642,10 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
&nPagebreakBreak, &nPagebreakPrev );
if (nPagebreakMouse)
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = sal_False;
// CaptureMouse();
StartTracking();
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, sal_False );
return;
}
}
@@ -1659,7 +1659,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // kein Draw-Objekt selektiert
+ pViewData->GetViewShell()->SetDrawShell( sal_False ); // kein Draw-Objekt selektiert
// TestMouse schon oben passiert
}
@@ -1698,7 +1698,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
Rectangle aButtonRect = GetListValButtonRect( aListValPos );
if ( aButtonRect.IsInside( aPos ) )
{
- DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), TRUE );
+ DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), sal_True );
nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect
CaptureMouse();
@@ -1739,7 +1739,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Links in Edit-Zellen
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && rMEvt.IsLeft() &&
GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen
{
@@ -1769,7 +1769,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
ReleaseMouse();
StartTracking();
}
- pViewData->GetMarkData().SetMarking(TRUE);
+ pViewData->GetMarkData().SetMarking(sal_True);
return;
}
}
@@ -1797,7 +1797,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
nMouseStatus = SC_GM_NONE;
// Selection-Engine: Markieren abbrechen
pViewData->GetView()->GetSelEngine()->Reset();
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(sal_False);
if (pViewData->IsAnyFillMode())
{
pViewData->GetView()->StopRefMode();
@@ -1854,7 +1854,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->InvalidateAttribs();
rBindings.Invalidate( SID_HYPERLINK_GETLINK );
- bEEMouse = FALSE;
+ bEEMouse = sal_False;
return;
}
@@ -1866,8 +1866,8 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // Range wieder richtigherum
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // Range wieder richtigherum
+ bRFMouse = sal_False;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
return;
@@ -1875,7 +1875,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, TRUE );
+ PagebreakMove( rMEvt, sal_True );
nPagebreakMouse = SC_PD_NONE;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
@@ -1895,7 +1895,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects
return;
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(sal_False);
SetPointer( Pointer( POINTER_ARROW ) );
@@ -1911,16 +1911,16 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// DBG_ASSERT( nStartCol==pViewData->GetRefStartX() && nStartRow==pViewData->GetRefStartY(),
// "Block falsch fuer AutoFill" );
ScRange aDelRange;
- BOOL bIsDel = pViewData->GetDelMark( aDelRange );
+ sal_Bool bIsDel = pViewData->GetDelMark( aDelRange );
ScViewFunc* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE ); // #i5819# don't use AutoFill anchor flag for selection
+ pView->GetFunctionSet()->SetAnchorFlag( sal_False ); // #i5819# don't use AutoFill anchor flag for selection
if ( bIsDel )
{
- pView->MarkRange( aDelRange, FALSE );
+ pView->MarkRange( aDelRange, sal_False );
pView->DeleteContents( IDF_CONTENTS );
SCTAB nTab = pViewData->GetTabNo();
ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
@@ -1930,7 +1930,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBlockRange.aEnd.SetCol( aDelRange.aStart.Col() - 1 );
else
aBlockRange.aEnd.SetRow( aDelRange.aStart.Row() - 1 );
- pView->MarkRange( aBlockRange, FALSE );
+ pView->MarkRange( aBlockRange, sal_False );
}
}
else
@@ -1952,11 +1952,11 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( sal_False );
if ( aEndPos != aBlockRange.aEnd )
{
- pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, FALSE );
+ pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, sal_False );
pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) );
}
}
@@ -1966,11 +1966,11 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( sal_False );
pViewData->GetDocShell()->UpdateOle(pViewData);
}
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
pScMod->EndReference();
@@ -2006,7 +2006,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pStyleSheet->GetName() );
ScPrintFunc( pViewData->GetDocShell(),
- pViewData->GetViewShell()->GetPrinter(TRUE),
+ pViewData->GetViewShell()->GetPrinter(sal_True),
pViewData->GetTabNo() ).UpdatePages();
rBindings.Invalidate( SID_STATUS_PAGESTYLE );
@@ -2032,7 +2032,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// double click (only left button)
//
- BOOL bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
+ sal_Bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() );
if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() )
{
// data pilot table
@@ -2053,7 +2053,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( ( aData.Flags & sheet::MemberResultFlags::HASMEMBER ) &&
! ( aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
if ( pView->HasSelectionForDrillDown( nDummy ) )
{
// execute slot to show dialog
@@ -2065,7 +2065,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScDPObject aNewObj( *pDPObj );
pDPObj->ToggleDetails( aData, &aNewObj );
ScDBDocFunc aFunc( *pViewData->GetDocShell() );
- aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -2119,7 +2119,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
// Links in edit cells
//
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN )
{
// beim ButtonUp nur ausfuehren, wenn ButtonDown auch ueber einer URL war
@@ -2162,7 +2162,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
//
// SelMouseButtonDown is called only for left button, but SelMouseButtonUp would return
- // TRUE for any call, so IsLeft must be checked here, too.
+ // sal_True for any call, so IsLeft must be checked here, too.
if ( rMEvt.IsLeft() && pViewData->GetView()->GetSelEngine()->SelMouseButtonUp( rMEvt ) )
{
@@ -2170,7 +2170,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->UpdateAutoFillMark();
SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher();
- BOOL bFormulaMode = pScMod->IsFormulaMode();
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode();
DBG_ASSERT( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" );
// #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no
@@ -2183,7 +2183,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
String aAddr; // CurrentCell
if( rMark.IsMarked() )
{
-// BOOL bKeep = rMark.IsMultiMarked(); //! wohin damit ???
+// sal_Bool bKeep = rMark.IsMultiMarked(); //! wohin damit ???
ScRange aScRange;
rMark.GetMarkArea( aScRange );
@@ -2240,7 +2240,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bEEMouse && nButtonDown && !rMEvt.GetButtons())
{
- bEEMouse = FALSE;
+ bEEMouse = sal_False;
nButtonDown = 0;
nMouseStatus = SC_GM_NONE;
return;
@@ -2282,7 +2282,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
+ sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2302,19 +2302,19 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, FALSE );
+ RFMouseMove( rMEvt, sal_False );
return;
}
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, sal_False );
return;
}
// anderen Mauszeiger anzeigen?
- BOOL bEditMode = pViewData->HasEditView(eWhich);
+ sal_Bool bEditMode = pViewData->HasEditView(eWhich);
//! Testen ob RefMode-Dragging !!!
if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) )
@@ -2335,7 +2335,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow )
{
// Field can only be URL field
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() )
SetPointer( Pointer( POINTER_REFHAND ) );
else if ( pEditView && pEditView->GetEditEngine()->IsVertical() )
@@ -2346,29 +2346,29 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- BOOL bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
+ sal_Bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush();
if (bWater)
SetPointer( Pointer(POINTER_FILL) );
if (!bWater)
{
- BOOL bCross = FALSE;
+ sal_Bool bCross = sal_False;
// Range-Finder
- BOOL bCorner;
+ sal_Bool bCorner;
if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) )
{
if (bCorner)
SetPointer( Pointer( POINTER_CROSS ) );
else
SetPointer( Pointer( POINTER_HAND ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Page-Break-Modus
- USHORT nBreakType;
+ sal_uInt16 nBreakType;
if ( !nButtonDown && pViewData->IsPagebreakMode() &&
( nBreakType = HitPageBreak( rMEvt.GetPosPixel() ) ) != 0 )
{
@@ -2395,25 +2395,25 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt )
break;
}
SetPointer( Pointer( eNew ) );
- bCross = TRUE;
+ bCross = sal_True;
}
// Fill-Cursor anzeigen ?
if ( !bFormulaMode && !nButtonDown )
- if (TestMouse( rMEvt, FALSE ))
- bCross = TRUE;
+ if (TestMouse( rMEvt, sal_False ))
+ bCross = sal_True;
if ( nButtonDown && pViewData->IsAnyFillMode() )
{
SetPointer( Pointer( POINTER_CROSS ) );
- bCross = TRUE;
+ bCross = sal_True;
nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix
}
if (!bCross)
{
- BOOL bAlt = rMEvt.IsMod2();
+ sal_Bool bAlt = rMEvt.IsMod2();
if (bEditMode) // Edit-Mode muss zuerst kommen!
SetPointer( Pointer( POINTER_ARROW ) );
@@ -2458,7 +2458,7 @@ void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseE
long ScGridWindow::PreNotify( NotifyEvent& rNEvt )
{
bool bDone = false;
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN )
{
Window* pWindow = rNEvt.GetWindow();
@@ -2517,24 +2517,24 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
if (!pViewData->GetView()->IsInActivatePart())
{
if (bDPMouse)
- bDPMouse = FALSE; // gezeichnet wird per bDragRect
+ bDPMouse = sal_False; // gezeichnet wird per bDragRect
if (bDragRect)
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // richtig abbrechen geht dabei nicht...
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht...
+ bRFMouse = sal_False;
}
if (nPagebreakMouse)
{
// if (bPagebreakDrawn)
// DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(),
- // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE );
- bPagebreakDrawn = FALSE;
+ // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False );
+ bPagebreakDrawn = sal_False;
UpdateDragRectOverlay();
nPagebreakMouse = SC_PD_NONE;
}
@@ -2543,7 +2543,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
StopMarking();
MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
SC_MOD()->EndReference(); // #63148# Dialog nicht verkleinert lassen
}
@@ -2569,7 +2569,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
HideNoteMarker();
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if (bEEMouse && pViewData->HasEditView( eWhich ))
{
@@ -2580,7 +2580,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
// #63263# don't remove the edit view while switching views
ScModule* pScMod = SC_MOD();
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( sal_True );
pEditView->Command( aDragEvent );
@@ -2588,7 +2588,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
if (pHdl)
pHdl->DataChanged();
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( sal_False );
if (!pViewData->IsActive()) // dropped to different view?
{
ScInputHandler* pViewHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
@@ -2608,7 +2608,7 @@ void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, Window* pWi
{
SCCOL nCol = pViewData->GetCurX();
SCROW nRow = pViewData->GetCurY();
- Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, TRUE );
+ Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, sal_True );
aEditArea.Right() = aEditArea.Left();
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
@@ -2621,7 +2621,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
// For more information, see #126086# and #128122#
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
SfxInPlaceClient* pClient = pTabViewSh->GetIPClient();
if ( pClient &&
@@ -2640,7 +2640,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
nCmd == COMMAND_EXTTEXTINPUT ||
nCmd == COMMAND_CURSORPOS )
{
- BOOL bEditView = pViewData->HasEditView( eWhich );
+ sal_Bool bEditView = pViewData->HasEditView( eWhich );
if (!bEditView)
{
// only if no cell editview is active, look at drawview
@@ -2670,7 +2670,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if ( pHdl )
{
- pHdl->InputCommand( rCEvt, TRUE );
+ pHdl->InputCommand( rCEvt, sal_True );
return; // done
}
@@ -2733,20 +2733,20 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL )
{
- BOOL bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
+ sal_Bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich );
if (!bDone)
Window::Command(rCEvt);
return;
}
// #i7560# FormulaMode check is below scrolling - scrolling is allowed during formula input
- BOOL bDisable = pScMod->IsFormulaMode() ||
+ sal_Bool bDisable = pScMod->IsFormulaMode() ||
pScMod->IsModalMode(pViewData->GetSfxDocShell());
if (bDisable)
return;
if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() )
{
- BOOL bMouse = rCEvt.IsMouseEvent();
+ sal_Bool bMouse = rCEvt.IsMouseEvent();
if ( bMouse && nMouseStatus == SC_GM_IGNORE )
return;
@@ -2791,12 +2791,12 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
SelectForContextMenu( aPosPixel, nCellX, nCellY );
}
- BOOL bDone = FALSE;
- BOOL bEdit = pViewData->HasEditView(eWhich);
+ sal_Bool bDone = sal_False;
+ sal_Bool bEdit = pViewData->HasEditView(eWhich);
if ( !bEdit )
{
// Edit-Zelle mit Spelling-Errors ?
- if ( bMouse && GetEditUrlOrError( TRUE, aPosPixel ) )
+ if ( bMouse && GetEditUrlOrError( sal_True, aPosPixel ) )
{
// GetEditUrlOrError hat den Cursor schon bewegt
@@ -2842,7 +2842,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
Link aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
pEditView->ExecuteSpellPopup( aMenuPos, &aLink );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( !bMouse )
@@ -2851,7 +2851,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt )
SCCOL nCurX = pViewData->GetCurX();
SCROW nCurY = pViewData->GetCurY();
- aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, TRUE );
+ aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix );
@@ -2999,24 +2999,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
// look for existing selection
- BOOL bHitSelected = FALSE;
+ sal_Bool bHitSelected = sal_False;
if ( pDrawView && pDrawView->IsMarkedObjHit( aLogicPos ) )
{
// clicked on selected object -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
else if ( pViewData->GetMarkData().IsCellMarked(nCellX, nCellY) )
{
// clicked on selected cell -> don't change anything
- bHitSelected = TRUE;
+ bHitSelected = sal_True;
}
// select drawing object or move cell cursor
if ( !bHitSelected )
{
- BOOL bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
- BOOL bHitDraw = FALSE;
+ sal_Bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
+ sal_Bool bHitDraw = sal_False;
if ( pDrawView )
{
pDrawView->UnmarkAllObj();
@@ -3031,7 +3031,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
pView->Unmark();
pView->SetCursor(nCellX, nCellY);
if ( bWasDraw )
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // switch shells
+ pViewData->GetViewShell()->SetDrawShell( sal_False ); // switch shells
}
}
}
@@ -3061,7 +3061,7 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
{
// query for existing note marker before calling ViewShell's keyboard handling
// which may remove the marker
- BOOL bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
+ sal_Bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if (pViewData->GetDocShell()->GetProgress())
@@ -3096,7 +3096,7 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if ( bHadKeyMarker )
HideNoteMarker(); // hide when previously visible
else
- ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), TRUE );
+ ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), sal_True );
return;
}
}
@@ -3110,15 +3110,15 @@ void ScGridWindow::StopMarking()
if (nButtonDown)
{
- pViewData->GetMarkData().SetMarking(FALSE);
+ pViewData->GetMarkData().SetMarking(sal_False);
nMouseStatus = SC_GM_IGNORE;
}
}
void ScGridWindow::UpdateInputContext()
{
- BOOL bReadOnly = pViewData->GetDocShell()->IsReadOnly();
- ULONG nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
+ sal_Bool bReadOnly = pViewData->GetDocShell()->IsReadOnly();
+ sal_uLong nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT );
// when font from InputContext is used,
// it must be taken from the cursor position's cell attributes
@@ -3133,11 +3133,11 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
-BOOL ScGridWindow::DropScroll( const Point& rMousePos )
+sal_Bool ScGridWindow::DropScroll( const Point& rMousePos )
{
/* doch auch auf nicht aktiven Views...
if ( !pViewData->IsActive() )
- return FALSE;
+ return sal_False;
*/
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -3174,15 +3174,15 @@ BOOL ScGridWindow::DropScroll( const Point& rMousePos )
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
}
- return FALSE;
+ return sal_False;
}
-BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
+sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
// Testet, ob bei eingeschalteten RedLining,
// bei einem Drop ein Scenario betroffen ist.
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -3190,7 +3190,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -3198,7 +3198,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if(pDoc->HasScenarioRange(i, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
}
@@ -3229,8 +3229,8 @@ ScRange lcl_MakeDropRange( SCCOL nPosX, SCROW nPosY, SCTAB nTab, const ScRange&
//--------------------------------------------------------
-extern BOOL bPasteIsDrop; // viewfun4 -> move to header
-extern BOOL bPasteIsMove; // viewfun7 -> move to header
+extern sal_Bool bPasteIsDrop; // viewfun4 -> move to header
+extern sal_Bool bPasteIsMove; // viewfun7 -> move to header
//--------------------------------------------------------
@@ -3240,7 +3240,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
// if (bDragRect)
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
return rEvt.mnAction;
}
@@ -3253,7 +3253,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3270,7 +3270,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if (bDragRect) // Rechteck loeschen
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
@@ -3289,7 +3289,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( rData.pCellTransfer->GetDragSourceFlags() & SC_DROP_TABLE ) // whole sheet?
{
- BOOL bOk = pThisDoc->IsDocEditable();
+ sal_Bool bOk = pThisDoc->IsDocEditable();
return bOk ? rEvt.mnAction : 0; // don't draw selection frame
}
@@ -3327,7 +3327,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if (bDragRect)
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3361,14 +3361,14 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( bValid )
{
- BOOL bIsDataLayout;
+ sal_Bool bIsDataLayout;
String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout );
const ScDPSaveDimension* pDim = pDPObj->GetSaveData()->GetExistingDimensionByName( aDimName );
if ( pDim )
{
ScRange aOutRange = pDPObj->GetOutRange();
- USHORT nOrient = pDim->GetOrientation();
+ sal_uInt16 nOrient = pDim->GetOrientation();
if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN )
{
eDragInsertMode = INS_CELLSRIGHT;
@@ -3390,7 +3390,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// no valid sorting in a DataPilot table -> disallow
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3420,7 +3420,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3451,7 +3451,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
nDragStartY = nNewDragY;
nDragEndX = nDragStartX+nSizeX-1;
nDragEndY = nDragStartY+nSizeY-1;
- bDragRect = TRUE;
+ bDragRect = sal_True;
meDragInsertMode = eDragInsertMode;
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
@@ -3467,7 +3467,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
aRange.Format( aHelpStr, SCA_VALID ); // non-3D
Point aPos = Pointer::GetPosPixel();
- USHORT nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT;
+ sal_uInt16 nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT;
Rectangle aRect( aPos, aPos );
Help::ShowQuickHelp(aRect, aHelpStr, nAlign);
}
@@ -3559,7 +3559,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
case DND_ACTION_MOVE:
case DND_ACTION_COPYMOVE:
{
- BOOL bMove = ( nMyAction == DND_ACTION_MOVE );
+ sal_Bool bMove = ( nMyAction == DND_ACTION_MOVE );
if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) ||
IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ||
@@ -3611,7 +3611,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
// Simple check for protection: It's not known here if the drop will result
// in cells or drawing objects (some formats can be both) and how many cells
// the result will be. But if IsFormatEditable for the drop cell position
- // is FALSE (ignores matrix formulas), nothing can be pasted, so the drop
+ // is sal_False (ignores matrix formulas), nothing can be pasted, so the drop
// can already be rejected here.
Point aPos = rEvt.maPosPixel;
@@ -3636,7 +3636,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
return nRet;
}
-ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
+sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
{
TransferableDataHelper aDataHelper( xTransfer );
@@ -3654,7 +3654,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR;
}
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) )
nFormatId = SOT_FORMATSTR_ID_DRAWING;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) )
@@ -3663,7 +3663,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
{
// If it's a Writer object, insert RTF instead of OLE
- BOOL bDoRtf = FALSE;
+ sal_Bool bDoRtf = sal_False;
SotStorageStreamRef xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
@@ -3721,11 +3721,11 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
return nFormatId;
}
-ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
+sal_uLong lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
{
TransferableDataHelper aDataHelper( xTransfer );
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) )
nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE;
else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) )
@@ -3754,7 +3754,7 @@ sal_Int8 ScGridWindow::ExecutePrivateDrop( const ExecuteDropEvent& rEvt )
// hide drop marker
// if (bDragRect)
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = sal_False;
UpdateDragRectOverlay();
ScModule* pScMod = SC_MOD();
@@ -3775,10 +3775,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
ScDocument* pThisDoc = pViewData->GetDocument();
ScViewFunc* pView = pViewData->GetView();
SCTAB nThisTab = pViewData->GetTabNo();
- USHORT nFlags = pTransObj->GetDragSourceFlags();
+ sal_uInt16 nFlags = pTransObj->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi );
// workaround for wrong nDndAction on Windows when pressing solely
// the Alt key during drag and drop;
@@ -3788,7 +3788,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bIsMove = ( nDndAction & DND_ACTION_MOVE && !bIsNavi );
}
- BOOL bIsLink = ( nDndAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( nDndAction == DND_ACTION_LINK );
ScRange aSource = pTransObj->GetRange();
@@ -3829,7 +3829,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc);
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if (!bFiltered && pSourceDoc == pThisDoc)
{
@@ -3838,9 +3838,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( pThisDoc->IsDocEditable() )
{
SCTAB nSrcTab = aSource.aStart.Tab();
- pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, TRUE ); // with Undo
- pView->SetTabNo( nThisTab, TRUE );
- bDone = TRUE;
+ pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, sal_True ); // with Undo
+ pView->SetTabNo( nThisTab, sal_True );
+ bDone = sal_True;
}
}
else // move/copy block
@@ -3852,10 +3852,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
aSource.Format( aRangeName, SCR_ABS_3D, pThisDoc );
SfxStringItem aNameItem( SID_CHART_NAME, aChartName );
SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName );
- USHORT nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
+ sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
pViewData->GetDispatcher().Execute( nId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aRangeItem, &aNameItem, (void*) NULL );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) )
{
@@ -3865,7 +3865,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( aDestPos != aSource.aStart )
bDone = pViewData->GetView()->DataPilotMove( aSource, aDestPos );
else
- bDone = TRUE; // same position: nothing
+ bDone = sal_True; // same position: nothing
}
else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() ||
nSourceTab != nThisTab )
@@ -3873,11 +3873,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
if ( nThisTab == nSourceTab )
@@ -3902,13 +3902,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
{
if ( bIsLink )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->LinkBlock( aSource, aDest.aStart, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->LinkBlock( aSource, aDest.aStart, sal_True /*bApi*/ );
}
else
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, TRUE /*bRecord*/, TRUE /*bPaint*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, sal_True /*bRecord*/, sal_True /*bPaint*/, sal_True /*bApi*/ );
}
}
@@ -3927,8 +3927,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( ( eCmd == DEL_CELLSUP && nDestPosX == aSource.aStart.Col() ) ||
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, TRUE /*bRecord*/, TRUE /*bApi*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, sal_True /*bRecord*/, sal_True /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -3947,7 +3947,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, sal_False, sal_False );
pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() );
}
@@ -3957,7 +3957,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
Sound::Beep(); // instead of error message in drop handler
}
else
- bDone = TRUE; // nothing to do
+ bDone = sal_True; // nothing to do
}
if (bDone)
@@ -3995,7 +3995,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
}
pView->ImportTables( pSrcShell,nTabSelCount, nTabs, bIsLink, nThisTab );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( bIsLink )
@@ -4010,11 +4010,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4055,7 +4055,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
pView->EnterMatrix( aFormula );
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, sal_False, sal_False );
pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() );
}
@@ -4070,11 +4070,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- bDone = TRUE;
+ bDone = sal_True;
if ( meDragInsertMode != INS_NONE )
{
- // call with bApi = TRUE to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ );
+ // call with bApi = sal_True to avoid error messages in drop handler
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4089,7 +4089,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bDone = pView->PasteFromClip( IDF_ALL, pTransObj->GetDocument() ); // clip-doc
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, sal_False, sal_False );
pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() );
}
}
@@ -4120,14 +4120,14 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// try to insert a link
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
String aThisName;
ScDocShell* pDocSh = pViewData->GetDocShell();
if (pDocSh && pDocSh->HasName())
aThisName = pDocSh->GetMedium()->GetName();
if ( rData.aLinkDoc == aThisName ) // error - no link within a document
- bOk = FALSE;
+ bOk = sal_False;
else
{
ScViewFunc* pView = pViewData->GetView();
@@ -4139,7 +4139,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
SCsCOL nPosX;
SCsROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
- pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, sal_False, sal_False );
pView->InsertAreaLink( rData.aLinkDoc, EMPTY_STRING, EMPTY_STRING,
rData.aLinkArea, 0 );
@@ -4147,7 +4147,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
else
{
DBG_ERROR("drop with link: no sheet nor area");
- bOk = FALSE;
+ bOk = sal_False;
}
}
@@ -4158,10 +4158,10 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (rData.pDrawTransfer)
{
- USHORT nFlags = rData.pDrawTransfer->GetDragSourceFlags();
+ sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags();
- BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
- BOOL bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
+ sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0;
+ sal_Bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi );
bPasteIsMove = bIsMove;
@@ -4169,7 +4169,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (bPasteIsMove)
rData.pDrawTransfer->SetDragWasInternal();
- bPasteIsMove = FALSE;
+ bPasteIsMove = sal_False;
return rEvt.mnAction;
}
@@ -4192,7 +4192,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
- BOOL bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
+ sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK );
ScDocument* pThisDoc = pViewData->GetDocument();
SdrObject* pHitObj = pThisDoc->GetObjectAtPoint( pViewData->GetTabNo(), PixelToLogic(aPos) );
@@ -4200,23 +4200,23 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
// dropped on drawing object
// PasteOnDrawObject checks for valid formats
- if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, TRUE ) )
+ if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, sal_True ) )
return rEvt.mnAction;
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
- ULONG nFormatId = bIsLink ?
+ sal_uLong nFormatId = bIsLink ?
lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) :
lcl_GetDropFormatId( rEvt.maDropEvent.Transferable );
if ( nFormatId )
{
- pScMod->SetInExecuteDrop( TRUE ); // #i28468# prevent error messages from PasteDataFormat
- bPasteIsDrop = TRUE;
+ pScMod->SetInExecuteDrop( sal_True ); // #i28468# prevent error messages from PasteDataFormat
+ bPasteIsDrop = sal_True;
bDone = pViewData->GetView()->PasteDataFormat(
nFormatId, rEvt.maDropEvent.Transferable, nPosX, nPosY, &aLogicPos, bIsLink );
- bPasteIsDrop = FALSE;
- pScMod->SetInExecuteDrop( FALSE );
+ bPasteIsDrop = sal_False;
+ pScMod->SetInExecuteDrop( sal_False );
}
sal_Int8 nRet = bDone ? rEvt.mnAction : DND_ACTION_NONE;
@@ -4255,7 +4255,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
// #96821# bSameDocClipboard argument for PasteDraw is needed
// because only DragData is checked directly inside PasteDraw
- pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), FALSE,
+ pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), sal_False,
pDrawTransfer->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
}
@@ -4268,12 +4268,12 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable();
if ( xTransferable.is() )
{
- ULONG nFormatId = lcl_GetDropFormatId( xTransferable, true );
+ sal_uLong nFormatId = lcl_GetDropFormatId( xTransferable, true );
if ( nFormatId )
{
- bPasteIsDrop = TRUE;
+ bPasteIsDrop = sal_True;
pViewData->GetView()->PasteDataFormat( nFormatId, xTransferable, nPosX, nPosY, &aLogicPos );
- bPasteIsDrop = FALSE;
+ bPasteIsDrop = sal_False;
}
}
}
@@ -4294,10 +4294,10 @@ void ScGridWindow::UpdateEditViewPos()
// hide EditView?
- BOOL bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
+ sal_Bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) );
if ( SC_MOD()->IsFormulaMode() )
if ( pViewData->GetTabNo() != pViewData->GetRefTabNo() )
- bHide = TRUE;
+ bHide = sal_True;
if (bHide)
{
@@ -4311,8 +4311,8 @@ void ScGridWindow::UpdateEditViewPos()
}
else
{
- // bForceToTop = TRUE for editing
- Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, TRUE );
+ // bForceToTop = sal_True for editing
+ Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, sal_True );
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
Rectangle aRect = pView->GetOutputArea();
@@ -4328,8 +4328,8 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
ClickExtern();
HideNoteMarker();
- bIsInScroll = TRUE;
- //BOOL bXor=DrawBeforeScroll();
+ bIsInScroll = sal_True;
+ //sal_Bool bXor=DrawBeforeScroll();
SetMapMode(MAP_PIXEL);
Scroll( nDifX, nDifY, SCROLL_CHILDREN );
@@ -4338,7 +4338,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
UpdateEditViewPos();
DrawAfterScroll(); //bXor);
- bIsInScroll = FALSE;
+ bIsInScroll = sal_False;
}
// Formeln neu zeichnen -------------------------------------------------
@@ -4353,7 +4353,7 @@ void ScGridWindow::UpdateFormulas()
// nicht anfangen, verschachtelt zu painten
// (dann wuerde zumindest der MapMode nicht mehr stimmen)
- bNeedsRepaint = TRUE; // -> am Ende vom Paint nochmal Invalidate auf alles
+ bNeedsRepaint = sal_True; // -> am Ende vom Paint nochmal Invalidate auf alles
aRepaintPixel = Rectangle(); // alles
return;
}
@@ -4380,7 +4380,7 @@ void ScGridWindow::UpdateFormulas()
Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
long nMirrorWidth = GetSizePixel().Width();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// unused variable long nLayoutSign = bLayoutRTL ? -1 : 1;
if ( bLayoutRTL )
{
@@ -4396,7 +4396,7 @@ void ScGridWindow::UpdateFormulas()
double nPPTY = pViewData->GetPPTY();
ScTableInfo aTabInfo;
- pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, FALSE, FALSE );
+ pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, sal_False, sal_False );
Fraction aZoomX = pViewData->GetZoomX();
Fraction aZoomY = pViewData->GetZoomY();
@@ -4416,7 +4416,7 @@ void ScGridWindow::UpdateFormulas()
CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here
}
-void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
+void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange)
{
if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) )
{
@@ -4430,9 +4430,9 @@ void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange)
}
}
-void ScGridWindow::UpdateListValPos( BOOL bVisible, const ScAddress& rPos )
+void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
{
- BOOL bOldButton = bListValButton;
+ sal_Bool bOldButton = bListValButton;
ScAddress aOldPos = aListValPos;
bListValButton = bVisible;
@@ -4489,7 +4489,7 @@ void __EXPORT ScGridWindow::GetFocus()
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
pViewShell->GotFocus();
- pViewShell->SetFormShellAtTop( FALSE ); // focus in GridWindow -> FormShell no longer on top
+ pViewShell->SetFormShellAtTop( sal_False ); // focus in GridWindow -> FormShell no longer on top
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility(ScAccGridWinFocusGotHint(eWhich, GetAccessible()));
@@ -4522,10 +4522,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; }
//------------------------------------------------------------------------
-BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
- USHORT* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
+sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
+ sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (pHdl)
{
@@ -4535,7 +4535,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCsCOL nPosX;
@@ -4546,25 +4546,25 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
// Point aNext = pViewData->GetScrPos( nPosX+1, nPosY+1, eWhich );
- Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nPosX, nPosY, nSizeXPix, nSizeYPix );
aNext.X() += nSizeXPix * nLayoutSign;
aNext.Y() += nSizeYPix;
- BOOL bCornerHor;
+ sal_Bool bCornerHor;
if ( bLayoutRTL )
bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 );
else
bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() );
- BOOL bCellCorner = ( bCornerHor &&
+ sal_Bool bCellCorner = ( bCornerHor &&
rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() );
// corner is hit only if the mouse is within the cell
- USHORT nCount = (USHORT)pRangeFinder->Count();
- for (USHORT i=nCount; i;)
+ sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count();
+ for (sal_uInt16 i=nCount; i;)
{
// rueckwaerts suchen, damit der zuletzt gepaintete Rahmen gefunden wird
--i;
@@ -4574,7 +4574,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
if (pIndex) *pIndex = i;
if (pAddX) *pAddX = nPosX - pData->aRef.aStart.Col();
if (pAddY) *pAddY = nPosY - pData->aRef.aStart.Row();
- bFound = TRUE;
+ bFound = sal_True;
rCorner = ( bCellCorner && aAddr == pData->aRef.aEnd );
break;
}
@@ -4590,7 +4590,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
#define SCE_RIGHT 8
#define SCE_ALL 15
-void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges )
+void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uInt16 nEdges )
{
// der Range ist immer richtigherum
@@ -4600,19 +4600,19 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
SCCOL nCol2 = rRange.aEnd.Col();
SCROW nRow2 = rRange.aEnd.Row();
SCTAB nTab2 = rRange.aEnd.Tab();
- BOOL bHiddenEdge = FALSE;
+ sal_Bool bHiddenEdge = sal_False;
SCROW nTmp;
ScDocument* pDoc = pDocSh->GetDocument();
while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab1) )
{
--nCol1;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab1) )
{
++nCol2;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(0, nRow1, nTab1);
if (!ValidRow(nTmp))
@@ -4620,7 +4620,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp < nRow1)
{
nRow1 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab1);
if (!ValidRow(nTmp))
@@ -4628,7 +4628,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges
if (nTmp > nRow2)
{
nRow2 = nTmp;
- bHiddenEdge = TRUE;
+ bHiddenEdge = sal_True;
}
if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge )
@@ -4724,7 +4724,7 @@ void lcl_PaintRefChanged( ScDocShell* pDocSh, const ScRange& rOldUn, const ScRan
}
}
-void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
+void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (!pHdl)
@@ -4745,7 +4745,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = sal_False;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -4760,7 +4760,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
{
if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) );
if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
- bTimer = TRUE;
+ bTimer = sal_True;
}
// Umschalten bei Fixierung (damit Scrolling funktioniert)
@@ -4852,13 +4852,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
//------------------------------------------------------------------------
-BOOL ScGridWindow::GetEditUrl( const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrl( const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
- return GetEditUrlOrError( FALSE, rPos, pName, pUrl, pTarget );
+ return GetEditUrlOrError( sal_False, rPos, pName, pUrl, pTarget );
}
-BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName, String* pUrl, String* pTarget )
{
//! nPosX/Y mit uebergeben?
@@ -4871,24 +4871,24 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
ScDocument* pDoc = pDocSh->GetDocument();
ScBaseCell* pCell = NULL;
- BOOL bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
+ sal_Bool bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell );
if( !bFound )
- return FALSE;
+ return sal_False;
ScHideTextCursor aHideCursor( pViewData, eWhich ); // before GetEditArea (MapMode is changed)
const ScPatternAttr* pPattern = pDoc->GetPattern( nPosX, nPosY, nTab );
- // bForceToTop = FALSE, use the cell's real position
- Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE );
+ // bForceToTop = sal_False, use the cell's real position
+ Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, sal_False );
if (rPos.Y() < aEditRect.Top())
- return FALSE;
+ return sal_False;
// vertikal kann (noch) nicht angeklickt werden:
if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
- return FALSE;
+ return sal_False;
- BOOL bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
+ sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK);
SvxCellHorJustify eHorJust = (SvxCellHorJustify)((SvxHorJustifyItem&)pPattern->
@@ -4989,11 +4989,11 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
Point aLogicClick = PixelToLogic(rPos,aEditMode);
if ( aLogicEdit.IsInside(aLogicClick) )
{
-// aEngine.SetUpdateMode(FALSE);
+// aEngine.SetUpdateMode(sal_False);
EditView aTempView( &aEngine, this );
aTempView.SetOutputArea( aLogicEdit );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
MapMode aOld = GetMapMode();
SetMapMode(aEditMode); // kein return mehr
@@ -5022,7 +5022,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
if (pTarget)
*pTarget = pURLField->GetTargetFrame();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -5033,22 +5033,22 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
return bRet;
}
- return FALSE;
+ return sal_False;
}
-BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
+sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange )
{
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCTAB nTabCount = pDoc->GetTableCount();
if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) )
{
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aButSize = pViewData->GetScenButSize();
long nBWidth = aButSize.Width();
if (!nBWidth)
- return FALSE; // noch kein Button gezeichnet -> da ist auch keiner
+ return sal_False; // noch kein Button gezeichnet -> da ist auch keiner
long nBHeight = aButSize.Height();
long nHSpace = (long)( SC_SCENARIO_HSPACE * pViewData->GetPPTX() );
@@ -5056,31 +5056,31 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
ScMarkData aMarks;
for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++)
- pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME );
+ pDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME );
ScRangeList aRanges;
- aMarks.FillRangeListWithMarks( &aRanges, FALSE );
+ aMarks.FillRangeListWithMarks( &aRanges, sal_False );
- ULONG nRangeCount = aRanges.Count();
- for (ULONG j=0; j<nRangeCount; j++)
+ sal_uLong nRangeCount = aRanges.Count();
+ for (sal_uLong j=0; j<nRangeCount; j++)
{
ScRange aRange = *aRanges.GetObject(j);
// Szenario-Rahmen immer dann auf zusammengefasste Zellen erweitern, wenn
// dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden
pDoc->ExtendTotalMerge( aRange );
- BOOL bTextBelow = ( aRange.aStart.Row() == 0 );
+ sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 );
Point aButtonPos;
if ( bTextBelow )
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aEnd.Row()+1,
- eWhich, TRUE );
+ eWhich, sal_True );
}
else
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aStart.Row(),
- eWhich, TRUE );
+ eWhich, sal_True );
aButtonPos.Y() -= nBHeight;
}
if ( bLayoutRTL )
@@ -5092,12 +5092,12 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
if ( aButRect.IsInside( rPosPixel ) )
{
rScenRange = aRange;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
// #114409#
@@ -5183,11 +5183,11 @@ void ScGridWindow::UpdateCursorOverlay()
ScDocument* pDoc = pViewData->GetDocument();
const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab);
const ScMergeFlagAttr& rMergeFlag = (const ScMergeFlagAttr&) pPattern->GetItem(ATTR_MERGE_FLAG);
- BOOL bOverlapped = rMergeFlag.IsOverlapped();
+ sal_Bool bOverlapped = rMergeFlag.IsOverlapped();
// left or above of the screen?
- BOOL bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
+ sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) );
if (!bVis)
{
SCCOL nEndX = nX;
@@ -5202,12 +5202,12 @@ void ScGridWindow::UpdateCursorOverlay()
if ( bVis && !bOverlapped && !pViewData->HasEditView(eWhich) && pViewData->IsActive() )
{
- Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
// completely right of/below the screen?
// (test with logical start position in aScrPos)
- BOOL bMaybeVisible;
+ sal_Bool bMaybeVisible;
if ( bLayoutRTL )
bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 );
else
@@ -5224,7 +5224,7 @@ void ScGridWindow::UpdateCursorOverlay()
if ( bLayoutRTL )
aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring
- BOOL bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX ||
+ sal_Bool bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX ||
pViewData->GetVSplitMode() == SC_SPLIT_FIX );
if ( pViewData->GetActivePart()==eWhich || bFix )
{
@@ -5381,9 +5381,9 @@ void ScGridWindow::UpdateAutoFillOverlay()
SCTAB nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE );
+ Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True );
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
@@ -5470,7 +5470,7 @@ void ScGridWindow::UpdateDragRectOverlay()
double nPPTY = pViewData->GetPPTY();
SCCOLROW i;
- BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
if (ValidCol(nX2) && nX2>=nX1)