summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/tabcont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r--sc/source/ui/view/tabcont.cxx80
1 files changed, 40 insertions, 40 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 6014ded96e1e..6e41548dc31f 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -61,7 +61,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
pViewData( pData ),
nMouseClickPageId( TabBar::PAGE_NOT_FOUND ),
nSelPageIdByMouse( TabBar::PAGE_NOT_FOUND ),
- bErrorShown( FALSE )
+ bErrorShown( sal_False )
{
ScDocument* pDoc = pViewData->GetDocument();
@@ -100,9 +100,9 @@ ScTabControl::~ScTabControl()
{
}
-USHORT ScTabControl::GetMaxId() const
+sal_uInt16 ScTabControl::GetMaxId() const
{
- USHORT nVisCnt = GetPageCount();
+ sal_uInt16 nVisCnt = GetPageCount();
if (nVisCnt)
return GetPageId(nVisCnt-1);
@@ -111,7 +111,7 @@ USHORT ScTabControl::GetMaxId() const
SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
{
- USHORT nPos = ShowDropPos(rPos);
+ sal_uInt16 nPos = ShowDropPos(rPos);
SCTAB nRealPos = static_cast<SCTAB>(nPos);
@@ -121,7 +121,7 @@ SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos )
SCTAB nCount = pDoc->GetTableCount();
- USHORT nViewPos=0;
+ sal_uInt16 nViewPos=0;
nRealPos = nCount;
for (SCTAB i=0; i<nCount; i++)
{
@@ -187,7 +187,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
// Click in the area next to the existing tabs:
// #i70320# if several sheets are selected, deselect all ecxept the current sheet,
// otherwise add new sheet
- USHORT nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
+ sal_uInt16 nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE;
SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher();
pDispatcher->Execute( nSlot, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
// forget page ID, to be really sure that the dialog is not called twice
@@ -223,9 +223,9 @@ void ScTabControl::Select()
return;
}
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
+ sal_uInt16 nPage = nCurId - 1;
// OLE-inplace deaktivieren
if ( nPage != static_cast<sal_uInt16>(pViewData->GetTabNo()) )
@@ -233,7 +233,7 @@ void ScTabControl::Select()
// InputEnterHandler nur wenn nicht Referenzeingabe
- BOOL bRefMode = pScMod->IsFormulaMode();
+ sal_Bool bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
pScMod->InputEnterHandler();
@@ -241,7 +241,7 @@ void ScTabControl::Select()
rMark.SelectTable( i, IsPageSelected(static_cast<sal_uInt16>(i)+1) );
/* Markierungen werden per Default nicht pro Tabelle gehalten
- USHORT nSelCnt = GetSelectPageCount();
+ sal_uInt16 nSelCnt = GetSelectPageCount();
if (nSelCnt>1)
pDoc->ExtendMarksFromTable( nPage );
*/
@@ -289,7 +289,7 @@ void ScTabControl::UpdateStatus()
{
ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
- BOOL bActive = pViewData->IsActive();
+ sal_Bool bActive = pViewData->IsActive();
SCTAB nCount = pDoc->GetTableCount();
SCTAB i;
@@ -297,7 +297,7 @@ void ScTabControl::UpdateStatus()
SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) );
Color aTabBgColor;
- BOOL bModified = FALSE; // Tabellen-Namen
+ sal_Bool bModified = sal_False; // Tabellen-Namen
for (i=0; i<nMaxCnt && !bModified; i++)
{
if (pDoc->IsVisible(i))
@@ -311,7 +311,7 @@ void ScTabControl::UpdateStatus()
}
if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) )
- bModified = TRUE;
+ bModified = sal_True;
}
if (bModified)
@@ -340,10 +340,10 @@ void ScTabControl::UpdateStatus()
if (bActive)
{
- bModified = FALSE; // Selektion
+ bModified = sal_False; // Selektion
for (i=0; i<nMaxCnt && !bModified; i++)
if ( rMark.GetTableSelect(i) != IsPageSelected(static_cast<sal_uInt16>(i)+1) )
- bModified = TRUE;
+ bModified = sal_True;
// #i99576# the following loop is mis-optimized on unxsoli4 and the reason
// why this file is in NOOPTFILES.
@@ -356,7 +356,7 @@ void ScTabControl::UpdateStatus()
}
}
-void ScTabControl::ActivateView(BOOL bActivate)
+void ScTabControl::ActivateView(sal_Bool bActivate)
{
// ScDocument* pDoc = pViewData->GetDocument();
ScMarkData& rMark = pViewData->GetMarkData();
@@ -364,29 +364,29 @@ void ScTabControl::ActivateView(BOOL bActivate)
// ResetMark direkt in TabView
// pDoc->ResetMark();
- USHORT nCurId = GetCurPageId();
+ sal_uInt16 nCurId = GetCurPageId();
if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist
- USHORT nPage = nCurId - 1;
-// USHORT nCount = GetMaxId();
+ sal_uInt16 nPage = nCurId - 1;
+// sal_uInt16 nCount = GetMaxId();
/*
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<nCount; i++)
{
- SelectPage( i+1, FALSE );
+ SelectPage( i+1, sal_False );
if (bActivate)
- rMark.SelectTable( i, FALSE );
+ rMark.SelectTable( i, sal_False );
}
*/
if (bActivate)
{
- SelectPage( nPage+1, TRUE );
- rMark.SelectTable( static_cast<SCTAB>(nPage), TRUE );
+ SelectPage( nPage+1, sal_True );
+ rMark.SelectTable( static_cast<SCTAB>(nPage), sal_True );
}
Invalidate();
}
-void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL )
+void ScTabControl::SetSheetLayoutRTL( sal_Bool bSheetRTL )
{
SetEffectiveRTL( bSheetRTL );
nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND;
@@ -397,12 +397,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
{
ScModule* pScMod = SC_MOD();
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
// ViewFrame erstmal aktivieren (Bug 19493):
pViewSh->SetActive();
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
if (!bDisable)
@@ -410,19 +410,19 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
// #i18735# select the page that is under the mouse cursor
// if multiple tables are selected and the one under the cursor
// is not part of them then unselect them
- USHORT nId = GetPageId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() );
if (nId)
{
- BOOL bAlreadySelected = IsPageSelected( nId );
+ sal_Bool bAlreadySelected = IsPageSelected( nId );
//make the clicked page the current one
SetCurPageId( nId );
//change the selection when the current one is not already
//selected or part of a multi selection
if(!bAlreadySelected)
{
- USHORT nCount = GetMaxId();
+ sal_uInt16 nCount = GetMaxId();
- for (USHORT i=1; i<=nCount; i++)
+ for (sal_uInt16 i=1; i<=nCount; i++)
SelectPage( i, i==nId );
Select();
}
@@ -441,12 +441,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt )
void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel )
{
ScModule* pScMod = SC_MOD();
- BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
+ sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode();
if (!bDisable)
{
Region aRegion( Rectangle(0,0,0,0) );
- CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, TRUE ); // needed for StartDrag
+ CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, sal_True ); // needed for StartDrag
if (TabBar::StartDrag( aCEvt, aRegion ))
DoDrag( aRegion );
}
@@ -483,9 +483,9 @@ void ScTabControl::DoDrag( const Region& /* rRegion */ )
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
-USHORT lcl_DocShellNr( ScDocument* pDoc )
+sal_uInt16 lcl_DocShellNr( ScDocument* pDoc )
{
- USHORT nShellCnt = 0;
+ sal_uInt16 nShellCnt = 0;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( pShell )
{
@@ -529,7 +529,7 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
rData.pCellTransfer->SetDragWasInternal(); // don't delete
- return TRUE;
+ return sal_True;
}
else
Sound::Beep();
@@ -583,12 +583,12 @@ long ScTabControl::AllowRenaming()
DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" );
long nRet = TABBAR_RENAMING_CANCEL;
- USHORT nId = GetEditPageId();
+ sal_uInt16 nId = GetEditPageId();
if ( nId )
{
SCTAB nTab = nId - 1;
String aNewName = GetEditText();
- BOOL bDone = pViewSh->RenameTable( aNewName, nTab );
+ sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab );
if ( bDone )
nRet = TABBAR_RENAMING_YES;
else if ( bErrorShown )
@@ -607,9 +607,9 @@ long ScTabControl::AllowRenaming()
}
else
{
- bErrorShown = TRUE;
+ bErrorShown = sal_True;
pViewSh->ErrorMessage( STR_INVALIDTABNAME );
- bErrorShown = FALSE;
+ bErrorShown = sal_False;
nRet = TABBAR_RENAMING_NO;
}
}