summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-02-23 16:13:04 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-02-23 16:13:04 -0500
commit7bd2bb8838c4c4c2f268a289276d351503869664 (patch)
tree52da98abf46580d6ac0da87fb12b98516868322a /sc/source/ui
parentc5066e9c3d1cef4e5a27ad6511e2cbb2154f7bc9 (diff)
calctabcolor: Use static constant values instead of macro define for more type safety.
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/view/tabcont.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 39f2937a3e59..2dbdf9802d50 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -62,8 +62,8 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
DropTargetHelper( this ),
DragSourceHelper( this ),
pViewData( pData ),
- nMouseClickPageId( TABBAR_PAGE_NOTFOUND ),
- nSelPageIdByMouse( TABBAR_PAGE_NOTFOUND ),
+ nMouseClickPageId( TabBar::PAGE_NOT_FOUND ),
+ nSelPageIdByMouse( TabBar::PAGE_NOT_FOUND ),
bErrorShown( FALSE )
{
ScDocument* pDoc = pViewData->GetDocument();
@@ -166,7 +166,7 @@ void ScTabControl::MouseButtonDown( const MouseEvent& rMEvt )
if( rMEvt.IsLeft() && (rMEvt.GetModifier() == 0) )
nMouseClickPageId = GetPageId( rMEvt.GetPosPixel() );
else
- nMouseClickPageId = TABBAR_PAGE_NOTFOUND;
+ nMouseClickPageId = TabBar::PAGE_NOT_FOUND;
TabBar::MouseButtonDown( rMEvt );
}
@@ -177,7 +177,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
// mouse button down and up on same page?
if( nMouseClickPageId != GetPageId( aPos ) )
- nMouseClickPageId = TABBAR_PAGE_NOTFOUND;
+ nMouseClickPageId = TabBar::PAGE_NOT_FOUND;
if ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() && nMouseClickPageId != 0 && nMouseClickPageId != TAB_PAGE_NOTFOUND )
{
@@ -194,7 +194,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
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
- nMouseClickPageId = TABBAR_PAGE_NOTFOUND;
+ nMouseClickPageId = TabBar::PAGE_NOT_FOUND;
}
TabBar::MouseButtonUp( rMEvt );
@@ -206,7 +206,7 @@ void ScTabControl::Select()
nSelPageIdByMouse = nMouseClickPageId;
/* Reset nMouseClickPageId, so that next Select() call may invalidate
nSelPageIdByMouse (i.e. if called from keyboard). */
- nMouseClickPageId = TABBAR_PAGE_NOTFOUND;
+ nMouseClickPageId = TabBar::PAGE_NOT_FOUND;
ScModule* pScMod = SC_MOD();
ScDocument* pDoc = pViewData->GetDocument();
@@ -392,7 +392,7 @@ void ScTabControl::ActivateView(BOOL bActivate)
void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL )
{
SetEffectiveRTL( bSheetRTL );
- nSelPageIdByMouse = TABBAR_PAGE_NOTFOUND;
+ nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND;
}
@@ -628,12 +628,12 @@ void ScTabControl::EndRenaming()
void ScTabControl::Mirror()
{
TabBar::Mirror();
- if( nSelPageIdByMouse != TABBAR_PAGE_NOTFOUND )
+ if( nSelPageIdByMouse != TabBar::PAGE_NOT_FOUND )
{
Rectangle aRect( GetPageRect( GetCurPageId() ) );
if( !aRect.IsEmpty() )
SetPointerPosPixel( aRect.Center() );
- nSelPageIdByMouse = TABBAR_PAGE_NOTFOUND; // only once after a Select()
+ nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND; // only once after a Select()
}
}