From cfab2fd725276e99fb6fa8b619ca5b2ac3bd025a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Apr 2015 08:40:43 +0200 Subject: convert SFX_SHELL constants to scoped enum Change-Id: If1649e8f3b9d200b0b176bef7deea41445bd3f2f --- sfx2/source/appl/appquit.cxx | 2 +- sfx2/source/control/dispatch.cxx | 16 ++++++++-------- sfx2/source/view/viewfrm.cxx | 6 +++--- sfx2/source/view/viewsh.cxx | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index e49675d7f4a9..641392b008fc 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -85,7 +85,7 @@ void SfxApplication::Deinitialize() "existing SfxViewFrame after Execute" ); DBG_ASSERT( !SfxObjectShell::GetFirst(), "existing SfxObjectShell after Execute" ); - pAppData_Impl->pAppDispat->Pop( *this, SFX_SHELL_POP_UNTIL ); + pAppData_Impl->pAppDispat->Pop( *this, SfxDispatcherPopFlags::POP_UNTIL ); pAppData_Impl->pAppDispat->Flush(); pAppData_Impl->bDowning = true; pAppData_Impl->pAppDispat->DoDeactivate_Impl( true, NULL ); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 081d1a635383..987ef969b0ef 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -169,7 +169,7 @@ void SfxDispatcher::Flush() void SfxDispatcher::Push(SfxShell& rShell) { - Pop( rShell, SFX_SHELL_PUSH ); + Pop( rShell, SfxDispatcherPopFlags::PUSH ); } /** This method checks whether a particular instance is @@ -411,25 +411,25 @@ SfxDispatcher::~SfxDispatcher() SfxShell cancel each other out. @param rShell the stack to take the SfxShell instance. - @param nMode SFX_SHELL_POP_UNTIL + @param nMode SfxDispatcherPopFlags::POP_UNTIL Also all 'rShell' of SfxShells are taken from the stack. - SFX_SHELL_POP_DELETE + SfxDispatcherPopFlags::POP_DELETE All SfxShells actually taken from the stack will be deleted. - SFX_SHELL_PUSH (InPlace use only) + SfxDispatcherPopFlags::PUSH (InPlace use only) The Shell is pushed. */ -void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode) +void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode) { DBG_ASSERT( rShell.GetInterface(), "pushing SfxShell without previous RegisterInterface()" ); - bool bDelete = (nMode & SFX_SHELL_POP_DELETE) == SFX_SHELL_POP_DELETE; - bool bUntil = (nMode & SFX_SHELL_POP_UNTIL) == SFX_SHELL_POP_UNTIL; - bool bPush = (nMode & SFX_SHELL_PUSH) == SFX_SHELL_PUSH; + bool bDelete = bool(nMode & SfxDispatcherPopFlags::POP_DELETE); + bool bUntil = bool(nMode & SfxDispatcherPopFlags::POP_UNTIL); + bool bPush = bool(nMode & SfxDispatcherPopFlags::PUSH); SfxApplication *pSfxApp = SfxGetpApp(); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index c36076b522a1..434b387dc50e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1028,9 +1028,9 @@ void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell ) SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 ); if ( pSubShell == i_rViewShell.GetSubShell() ) // "real" sub shells will be deleted elsewhere - pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL ); + pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL ); else - pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE ); + pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL | SfxDispatcherPopFlags::POP_DELETE ); } pDispatcher->Pop( i_rViewShell ); pDispatcher->Flush(); @@ -1519,7 +1519,7 @@ void SfxViewFrame::KillDispatcher_Impl() if ( pDispatcher ) { if( pModule ) - pDispatcher->Pop( *pModule, SFX_SHELL_POP_UNTIL ); + pDispatcher->Pop( *pModule, SfxDispatcherPopFlags::POP_UNTIL ); else pDispatcher->Pop( *this ); DELETEZ(pDispatcher); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index e27660c64014..abfbbbce1591 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1474,7 +1474,7 @@ void SfxViewShell::PushSubShells_Impl( bool bPush ) { SfxShell& rPopUntil = *pImp->aArr[0]; if ( pDisp->GetShellLevel( rPopUntil ) != USHRT_MAX ) - pDisp->Pop( rPopUntil, SFX_SHELL_POP_UNTIL ); + pDisp->Pop( rPopUntil, SfxDispatcherPopFlags::POP_UNTIL ); } pDisp->Flush(); -- cgit