summaryrefslogtreecommitdiff
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.cxx684
1 files changed, 342 insertions, 342 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 47a280dc5dad..7e06db06676b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -139,9 +139,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
@@ -159,8 +159,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
@@ -184,12 +184,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:
@@ -207,11 +207,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; }
};
@@ -225,10 +225,10 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
pGridWin( pGrid ),
nCol( nNewCol ),
nRow( nNewRow ),
- bButtonDown( FALSE ),
- bInit( TRUE ),
- bCancelled( FALSE ),
- bInSelect( FALSE ),
+ bButtonDown( false ),
+ bInit( sal_True ),
+ bCancelled( false ),
+ bInSelect( false ),
mbListHasDates(false),
nSel( 0 ),
eMode( eNewMode )
@@ -243,13 +243,13 @@ 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 = false;
}
void ScFilterListBox::LoseFocus()
@@ -270,7 +270,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
@@ -297,16 +297,16 @@ void 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 = false;
}
}
}
@@ -341,7 +341,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.
@@ -349,7 +349,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 false;
ScAddress aPos;
const ScBaseCell* pCell = pDoc->GetCell( rRange.aEnd );
@@ -379,24 +379,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 = false;
do
{
pDoc->GetCell( rPosX, rPosY, nTab, rpCell );
if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE )
{
if ( rPosX <= 0 )
- return FALSE; // alles leer bis links
+ return 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 false; // andere Zelle
}
while ( !bFound );
@@ -425,31 +425,31 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
mpDPFieldPopup(NULL),
mpFilterButton(NULL),
nCursorHideCount( 0 ),
- bMarking( FALSE ),
+ bMarking( false ),
nButtonDown( 0 ),
- bEEMouse( FALSE ),
+ bEEMouse( false ),
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
- bDPMouse( FALSE ),
- bRFMouse( FALSE ),
+ bDPMouse( false ),
+ bRFMouse( false ),
nPagebreakMouse( SC_PD_NONE ),
- bPagebreakDrawn( FALSE ),
+ bPagebreakDrawn( false ),
nPageScript( 0 ),
- bDragRect( FALSE ),
+ bDragRect( false ),
nDragStartX( -1 ),
nDragStartY( -1 ),
nDragEndX( -1 ),
nDragEndY( -1 ),
meDragInsertMode( INS_NONE ),
nCurrentPointer( 0 ),
- bIsInScroll( FALSE ),
- bIsInPaint( FALSE ),
+ bIsInScroll( false ),
+ bIsInPaint( false ),
aComboButton( this ),
aCurMousePos( 0,0 ),
nPaintCount( 0 ),
- bNeedsRepaint( FALSE ),
- bAutoMarkVisible( FALSE ),
- bListValButton( FALSE )
+ bNeedsRepaint( false ),
+ bAutoMarkVisible( false ),
+ bListValButton( false )
{
switch(eWhich)
{
@@ -483,7 +483,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
SetUniqueId( HID_SC_WIN_GRIDWIN );
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- EnableRTL( FALSE );
+ EnableRTL( false );
}
ScGridWindow::~ScGridWindow()
@@ -540,7 +540,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 ?
@@ -550,13 +550,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 )
{
@@ -573,7 +573,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, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -587,10 +587,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;
@@ -629,13 +629,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
TypedScStrCollection aStrings( 128, 128 );
// get list box entries and selection
- BOOL bHasCurrentPage = FALSE;
+ sal_Bool bHasCurrentPage = 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 )
{
@@ -644,7 +644,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 )
{
@@ -652,7 +652,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
if ( pDim && pDim->HasCurrentPage() )
{
aCurrentPage = pDim->GetCurrentPage();
- bHasCurrentPage = TRUE;
+ bHasCurrentPage = sal_True;
}
}
}
@@ -660,7 +660,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];
@@ -691,13 +691,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
pFilterBox->SetSizePixel( aSize );
pFilterBox->Show(); // Show must be called before SetUpdateMode
- pFilterBox->SetUpdateMode(FALSE);
+ pFilterBox->SetUpdateMode(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();
@@ -710,9 +710,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 );
@@ -763,7 +763,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;
@@ -803,7 +803,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(false);
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
@@ -854,10 +854,10 @@ 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();
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if (aCurrent.Len())
{
nPos = pFilterBox->GetEntryPos( aCurrent );
@@ -876,15 +876,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;
@@ -921,15 +921,15 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
// SetSize spaeter
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = 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
{
@@ -941,8 +941,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, SCSTR_EMPTY, SCSTR_NOTEMPTY };
- const USHORT nDefCount = SAL_N_ELEMENTS(nDefIDs);
+ static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
+ const sal_uInt16 nDefCount = SAL_N_ELEMENTS(nDefIDs);
for (i=0; i<nDefCount; i++)
{
String aEntry( (ScResId) nDefIDs[i] );
@@ -960,7 +960,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];
@@ -998,14 +998,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(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();
@@ -1016,10 +1016,10 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
if (bWait)
LeaveWait();
- pFilterBox->SetUpdateMode(TRUE);
+ pFilterBox->SetUpdateMode(sal_True);
}
- 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 = false;
if (rEntry.nField == nCol)
{
if (rEntry.eOp == SC_EQUAL)
@@ -1064,7 +1064,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 )
{
@@ -1085,13 +1085,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 )
@@ -1141,9 +1141,9 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
}
}
-void ScGridWindow::FilterSelect( ULONG nSel )
+void ScGridWindow::FilterSelect( sal_uLong nSel )
{
- String aString = pFilterBox->GetEntry( static_cast< USHORT >( nSel ) );
+ String aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
@@ -1184,7 +1184,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 )
{
@@ -1211,13 +1211,13 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
else
{
- BOOL bDeleteOld = FALSE;
+ sal_Bool bDeleteOld = false;
SCSIZE nQueryPos = 0;
- BOOL bFound = FALSE;
+ sal_Bool bFound = 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)
{
@@ -1226,14 +1226,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;
@@ -1245,8 +1245,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 = false;
}
if ( nQueryPos < MAXQUERY || SC_AUTOFILTER_ALL == nSel ) // loeschen geht immer
@@ -1255,8 +1255,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 )
@@ -1267,7 +1267,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_EMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_EMPTYFIELDS;
@@ -1275,7 +1275,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
else if (nSel == SC_AUTOFILTER_NOTEMPTY)
{
rNewEntry.pStr->Erase();
- rNewEntry.bQueryByString = FALSE;
+ rNewEntry.bQueryByString = false;
rNewEntry.eOp = SC_EQUAL;
rNewEntry.nVal = SC_NONEMPTYFIELDS;
}
@@ -1301,7 +1301,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
}
aParam.bUseDynamicRange = true;
- pViewData->GetView()->Query( aParam, NULL, TRUE );
+ pViewData->GetView()->Query( aParam, NULL, true );
pDBData->SetQueryParam( aParam ); // speichern
}
else // "Zuviele Bedingungen"
@@ -1335,7 +1335,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )
rDestWin.nRFIndex = nRFIndex;
rDestWin.nRFAddX = nRFAddX;
rDestWin.nRFAddY = nRFAddY;
- bRFMouse = FALSE;
+ bRFMouse = false;
}
if (nPagebreakMouse)
@@ -1349,26 +1349,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 false;
- BOOL bNewPointer = FALSE;
+ sal_Bool bNewPointer = 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
@@ -1397,7 +1397,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;
}
}
}
@@ -1418,21 +1418,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;
}
}
}
@@ -1490,7 +1490,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
HideNoteMarker(); // Notiz-Anzeige
- bEEMouse = FALSE;
+ bEEMouse = false;
ScModule* pScMod = SC_MOD();
if (pScMod->IsModalMode(pViewData->GetSfxDocShell()))
@@ -1502,11 +1502,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
@@ -1586,7 +1586,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
pScMod->SetInputMode( SC_INPUT_TABLE );
- bEEMouse = TRUE;
+ bEEMouse = sal_True;
bEditMode = pEditView->MouseButtonDown( rMEvt );
return;
}
@@ -1607,7 +1607,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 ???
@@ -1616,7 +1616,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- BOOL bCrossPointer = TestMouse( rMEvt, TRUE );
+ sal_Bool bCrossPointer = TestMouse( rMEvt, sal_True );
if ( bCrossPointer )
{
if ( bDouble )
@@ -1631,9 +1631,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
&nPagebreakBreak, &nPagebreakPrev );
if (nPagebreakMouse)
{
- bPagebreakDrawn = FALSE;
+ bPagebreakDrawn = false;
StartTracking();
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, false );
return;
}
}
@@ -1645,7 +1645,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
return;
}
- pViewData->GetViewShell()->SetDrawShell( FALSE ); // kein Draw-Objekt selektiert
+ pViewData->GetViewShell()->SetDrawShell( false ); // kein Draw-Objekt selektiert
// TestMouse schon oben passiert
}
@@ -1684,7 +1684,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();
@@ -1725,7 +1725,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
{
@@ -1755,7 +1755,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
ReleaseMouse();
StartTracking();
}
- pViewData->GetMarkData().SetMarking(TRUE);
+ pViewData->GetMarkData().SetMarking(sal_True);
return;
}
}
@@ -1783,7 +1783,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
nMouseStatus = SC_GM_NONE;
// Selection-Engine: Markieren abbrechen
pViewData->GetView()->GetSelEngine()->Reset();
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
if (pViewData->IsAnyFillMode())
{
pViewData->GetView()->StopRefMode();
@@ -1840,7 +1840,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pViewData->GetView()->InvalidateAttribs();
rBindings.Invalidate( SID_HYPERLINK_GETLINK );
- bEEMouse = FALSE;
+ bEEMouse = false;
return;
}
@@ -1852,8 +1852,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // Range wieder richtigherum
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // Range wieder richtigherum
+ bRFMouse = false;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
return;
@@ -1861,7 +1861,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, TRUE );
+ PagebreakMove( rMEvt, sal_True );
nPagebreakMouse = SC_PD_NONE;
SetPointer( Pointer( POINTER_ARROW ) );
ReleaseMouse();
@@ -1870,7 +1870,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nMouseStatus == SC_GM_WATERUNDO) // Undo im Giesskannenmodus
{
- SfxUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
pMgr->Undo();
else
@@ -1881,7 +1881,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects
return;
- rMark.SetMarking(FALSE);
+ rMark.SetMarking(false);
SetPointer( Pointer( POINTER_ARROW ) );
@@ -1895,16 +1895,16 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
SCROW nEndRow;
pViewData->GetFillData( nStartCol, nStartRow, nEndCol, nEndRow );
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( false ); // #i5819# don't use AutoFill anchor flag for selection
if ( bIsDel )
{
- pView->MarkRange( aDelRange, FALSE );
+ pView->MarkRange( aDelRange, false );
pView->DeleteContents( IDF_CONTENTS );
SCTAB nTab = pViewData->GetTabNo();
ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
@@ -1914,7 +1914,7 @@ void 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, false );
}
}
else
@@ -1936,11 +1936,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
if ( aEndPos != aBlockRange.aEnd )
{
- pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, FALSE );
+ pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, false );
pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) );
}
}
@@ -1950,11 +1950,11 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
ScTabView* pView = pViewData->GetView();
pView->StopRefMode();
pViewData->ResetFillMode();
- pView->GetFunctionSet()->SetAnchorFlag( FALSE );
+ pView->GetFunctionSet()->SetAnchorFlag( false );
pViewData->GetDocShell()->UpdateOle(pViewData);
}
- BOOL bRefMode = pViewData->IsRefMode();
+ sal_Bool bRefMode = pViewData->IsRefMode();
if (bRefMode)
pScMod->EndReference();
@@ -1990,7 +1990,7 @@ void 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 );
@@ -2016,7 +2016,7 @@ void 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
@@ -2037,7 +2037,7 @@ void 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
@@ -2049,7 +2049,7 @@ void 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, false );
pViewData->GetView()->CursorPosChanged(); // shells may be switched
}
}
@@ -2103,7 +2103,7 @@ void 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
@@ -2146,14 +2146,14 @@ void 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 ) )
{
pViewData->GetView()->SelectionChanged();
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
@@ -2225,7 +2225,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bEEMouse && nButtonDown && !rMEvt.GetButtons())
{
- bEEMouse = FALSE;
+ bEEMouse = false;
nButtonDown = 0;
nMouseStatus = SC_GM_NONE;
return;
@@ -2267,7 +2267,7 @@ void 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 ))
{
@@ -2287,19 +2287,19 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if (bRFMouse)
{
- RFMouseMove( rMEvt, FALSE );
+ RFMouseMove( rMEvt, false );
return;
}
if (nPagebreakMouse)
{
- PagebreakMove( rMEvt, FALSE );
+ PagebreakMove( rMEvt, 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()) )
@@ -2320,7 +2320,7 @@ void 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() )
@@ -2331,29 +2331,29 @@ void 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 = 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 )
{
@@ -2380,25 +2380,25 @@ void 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, 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 ) );
@@ -2437,13 +2437,13 @@ void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseE
rEvent.X = rEvt.GetPosPixel().X();
rEvent.Y = rEvt.GetPosPixel().Y();
rEvent.ClickCount = rEvt.GetClicks();
- rEvent.PopupTrigger = sal_False;
+ rEvent.PopupTrigger = false;
}
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();
@@ -2502,24 +2502,24 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
if (!pViewData->GetView()->IsInActivatePart())
{
if (bDPMouse)
- bDPMouse = FALSE; // gezeichnet wird per bDragRect
+ bDPMouse = false; // gezeichnet wird per bDragRect
if (bDragRect)
{
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
if (bRFMouse)
{
- RFMouseMove( rMEvt, TRUE ); // richtig abbrechen geht dabei nicht...
- bRFMouse = FALSE;
+ RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht...
+ bRFMouse = 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 = false;
UpdateDragRectOverlay();
nPagebreakMouse = SC_PD_NONE;
}
@@ -2528,7 +2528,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(); // Dialog nicht verkleinert lassen
}
@@ -2554,7 +2554,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 ))
{
@@ -2565,7 +2565,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
// don't remove the edit view while switching views
ScModule* pScMod = SC_MOD();
- pScMod->SetInEditCommand( TRUE );
+ pScMod->SetInEditCommand( sal_True );
pEditView->Command( aDragEvent );
@@ -2573,7 +2573,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
if (pHdl)
pHdl->DataChanged();
- pScMod->SetInEditCommand( FALSE );
+ pScMod->SetInEditCommand( false );
if (!pViewData->IsActive()) // dropped to different view?
{
ScInputHandler* pViewHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
@@ -2593,7 +2593,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 );
@@ -2605,7 +2605,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
// menu from an inplace client is closed. Now we have the chance to
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
ScTabViewShell* pTabViewSh = pViewData->GetViewShell();
SfxInPlaceClient* pClient = pTabViewSh->GetIPClient();
if ( pClient &&
@@ -2624,7 +2624,7 @@ void 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
@@ -2654,7 +2654,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if ( pHdl )
{
- pHdl->InputCommand( rCEvt, TRUE );
+ pHdl->InputCommand( rCEvt, sal_True );
return; // done
}
@@ -2717,20 +2717,20 @@ void 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;
@@ -2775,12 +2775,12 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
SelectForContextMenu( aPosPixel, nCellX, nCellY );
}
- BOOL bDone = FALSE;
- BOOL bEdit = pViewData->HasEditView(eWhich);
+ sal_Bool bDone = 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
@@ -2826,7 +2826,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
Link aLink = LINK( this, ScGridWindow, PopupSpellingHdl );
pEditView->ExecuteSpellPopup( aMenuPos, &aLink );
- bDone = TRUE;
+ bDone = sal_True;
}
}
else if ( !bMouse )
@@ -2835,7 +2835,7 @@ void 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 );
@@ -2983,24 +2983,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
// look for existing selection
- BOOL bHitSelected = FALSE;
+ sal_Bool bHitSelected = 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 = false;
if ( pDrawView )
{
pDrawView->UnmarkAllObj();
@@ -3015,7 +3015,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( false ); // switch shells
}
}
}
@@ -3030,7 +3030,7 @@ static void ClearSingleSelection( ScViewData* pViewData )
return;
ScDocument* pClipDoc = pTransObj->GetDocument();
- pClipDoc->GetClipArea( nX, nY, TRUE );
+ pClipDoc->GetClipArea( nX, nY, true );
if (nX == 0 && nY == 0)
{
ScTabView* pView = pViewData->GetView();
@@ -3062,7 +3062,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
{
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
- ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, FALSE );
+ ScCellShell::PasteFromClipboard( pViewData, pTabViewShell, false );
ClearSingleSelection( pViewData );
uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
@@ -3089,7 +3089,7 @@ void 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())
@@ -3124,7 +3124,7 @@ void 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;
}
if (aCode.GetCode() == KEY_BRACKETLEFT && aCode.GetModifier() == KEY_MOD1)
@@ -3149,15 +3149,15 @@ void ScGridWindow::StopMarking()
if (nButtonDown)
{
- pViewData->GetMarkData().SetMarking(FALSE);
+ pViewData->GetMarkData().SetMarking(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
@@ -3172,7 +3172,7 @@ void ScGridWindow::UpdateInputContext()
// sensitiver Bereich (Pixel)
#define SCROLL_SENSITIVE 20
-BOOL ScGridWindow::DropScroll( const Point& rMousePos )
+sal_Bool ScGridWindow::DropScroll( const Point& rMousePos )
{
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -3203,15 +3203,15 @@ BOOL ScGridWindow::DropScroll( const Point& rMousePos )
pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) );
}
- return FALSE;
+ return 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 = false;
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
@@ -3219,7 +3219,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
@@ -3227,7 +3227,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange)
{
if(pDoc->HasScenarioRange(i, aDragRange))
{
- bReturn = TRUE;
+ bReturn = sal_True;
break;
}
}
@@ -3258,8 +3258,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
//--------------------------------------------------------
@@ -3267,7 +3267,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( rEvt.mbLeaving )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
return rEvt.mnAction;
}
@@ -3280,7 +3280,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3296,7 +3296,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect) // Rechteck loeschen
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
@@ -3309,7 +3309,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
}
@@ -3346,7 +3346,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if (bDragRect)
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3380,14 +3380,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;
@@ -3409,7 +3409,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// no valid sorting in a DataPilot table -> disallow
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3439,7 +3439,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( bDragRect )
{
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
}
return DND_ACTION_NONE;
@@ -3467,7 +3467,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;
UpdateDragRectOverlay();
@@ -3558,7 +3558,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 ) ||
@@ -3610,7 +3610,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;
@@ -3635,7 +3635,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 );
@@ -3653,7 +3653,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 ) )
@@ -3662,7 +3662,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 = false;
SotStorageStreamRef xStm;
TransferableObjectDescriptor aObjDesc;
if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) &&
@@ -3720,11 +3720,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 ) )
@@ -3751,7 +3751,7 @@ ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTra
sal_Int8 ScGridWindow::ExecutePrivateDrop( const ExecuteDropEvent& rEvt )
{
// hide drop marker
- bDragRect = FALSE;
+ bDragRect = false;
UpdateDragRectOverlay();
ScModule* pScMod = SC_MOD();
@@ -3772,10 +3772,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;
@@ -3785,7 +3785,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();
@@ -3826,7 +3826,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc);
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = false;
if (!bFiltered && pSourceDoc == pThisDoc)
{
@@ -3835,9 +3835,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
@@ -3849,10 +3849,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 ) )
{
@@ -3862,7 +3862,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 )
@@ -3870,11 +3870,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 )
@@ -3899,13 +3899,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*/ );
}
}
@@ -3924,8 +3924,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() )
@@ -3944,7 +3944,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( bDone )
{
- pView->MarkRange( aDest, FALSE, FALSE );
+ pView->MarkRange( aDest, false, false );
SCCOL nDCol = pViewData->GetCurX() - aSource.aStart.Col();
SCROW nDRow = pViewData->GetCurY() - aSource.aStart.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, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.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, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.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 = 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, false, false );
pView->InsertAreaLink( rData.aLinkDoc, EMPTY_STRING, EMPTY_STRING,
rData.aLinkArea, 0 );
@@ -4147,7 +4147,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
else
{
OSL_FAIL("drop with link: no sheet nor area");
- bOk = FALSE;
+ bOk = 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 = 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 = 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 = false;
+ pScMod->SetInExecuteDrop( false );
}
sal_Int8 nRet = bDone ? rEvt.mnAction : DND_ACTION_NONE;
@@ -4238,8 +4238,8 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
SdrView* pDrawView = pViewData->GetViewShell()->GetSdrView();
if (pDrawView)
{
- ULONG nCount = pDrawView->GetMarkedObjectCount();
- for (ULONG i = 0; i < nCount; ++i)
+ sal_uLong nCount = pDrawView->GetMarkedObjectCount();
+ for (sal_uLong i = 0; i < nCount; ++i)
{
SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i);
if (pObj && pObj->GetLogicRect().IsInside(aLogicPos))
@@ -4272,7 +4272,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
// 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(), false,
pDrawTransfer->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() );
}
}
@@ -4285,12 +4285,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 = false;
}
}
}
@@ -4311,10 +4311,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)
{
@@ -4328,8 +4328,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();
@@ -4345,7 +4345,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
ClickExtern();
HideNoteMarker();
- bIsInScroll = TRUE;
+ bIsInScroll = true;
SetMapMode(MAP_PIXEL);
Scroll( nDifX, nDifY, SCROLL_CHILDREN );
@@ -4354,7 +4354,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
UpdateEditViewPos();
DrawAfterScroll();
- bIsInScroll = FALSE;
+ bIsInScroll = false;
}
// Formeln neu zeichnen -------------------------------------------------
@@ -4369,7 +4369,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;
}
@@ -4396,7 +4396,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 );
if ( bLayoutRTL )
{
long nEndPixel = pViewData->GetScrPos( nX2+1, nPosY, eWhich ).X();
@@ -4411,7 +4411,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, false, false );
Fraction aZoomX = pViewData->GetZoomX();
Fraction aZoomY = pViewData->GetZoomY();
@@ -4431,7 +4431,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 ) )
{
@@ -4445,9 +4445,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;
@@ -4485,7 +4485,7 @@ void ScGridWindow::GetFocus()
{
ScTabViewShell* pViewShell = pViewData->GetViewShell();
pViewShell->GotFocus();
- pViewShell->SetFormShellAtTop( FALSE ); // focus in GridWindow -> FormShell no longer on top
+ pViewShell->SetFormShellAtTop( false ); // focus in GridWindow -> FormShell no longer on top
if (pViewShell->HasAccessibilityObjects())
pViewShell->BroadcastAccessibility(ScAccGridWinFocusGotHint(eWhich, GetAccessible()));
@@ -4519,10 +4519,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 = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (pHdl)
{
@@ -4532,7 +4532,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;
@@ -4541,25 +4541,25 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner,
// zusammengefasste (einzeln/Bereich) ???
ScAddress aAddr( nPosX, nPosY, nTab );
- Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, TRUE );
+ Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, 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;
@@ -4569,7 +4569,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;
}
@@ -4585,7 +4585,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
@@ -4595,19 +4595,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 = 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))
@@ -4615,7 +4615,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))
@@ -4623,7 +4623,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 )
@@ -4719,7 +4719,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)
@@ -4740,7 +4740,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp )
// Scrolling
- BOOL bTimer = FALSE;
+ sal_Bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
SCsCOL nDx = 0;
SCsROW nDy = 0;
@@ -4755,7 +4755,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)
@@ -4847,13 +4847,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( 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?
@@ -4866,24 +4866,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 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, false );
if (rPos.Y() < aEditRect.Top())
- return FALSE;
+ return false;
// vertikal kann (noch) nicht angeklickt werden:
if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
- return FALSE;
+ return 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->
@@ -4987,7 +4987,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
EditView aTempView( &aEngine, this );
aTempView.SetOutputArea( aLogicEdit );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
MapMode aOld = GetMapMode();
SetMapMode(aEditMode); // kein return mehr
@@ -5016,7 +5016,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
if (pTarget)
*pTarget = pURLField->GetTargetFrame();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -5027,22 +5027,22 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
return bRet;
}
- return FALSE;
+ return 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 false; // noch kein Button gezeichnet -> da ist auch keiner
long nBHeight = aButSize.Height();
long nHSpace = (long)( SC_SCENARIO_HSPACE * pViewData->GetPPTX() );
@@ -5050,9 +5050,9 @@ 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, false, SC_SCENARIO_SHOWFRAME );
ScRangeList aRanges;
- aMarks.FillRangeListWithMarks( &aRanges, FALSE );
+ aMarks.FillRangeListWithMarks( &aRanges, false );
size_t nRangeCount = aRanges.size();
@@ -5063,18 +5063,18 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
// 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 )
@@ -5086,12 +5086,12 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
if ( aButRect.IsInside( rPosPixel ) )
{
rScenRange = aRange;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return false;
}
// #114409#
@@ -5242,11 +5242,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;
@@ -5261,12 +5261,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
@@ -5435,9 +5435,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 );
@@ -5527,7 +5527,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)