summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-09 08:40:43 +0200
committerNoel Grandin <noel@peralex.com>2015-04-09 08:41:12 +0200
commitcfab2fd725276e99fb6fa8b619ca5b2ac3bd025a (patch)
tree5a4734260635c750c32b788f1fa74117224b7348 /sfx2
parent502a7662555bfa66ab6be84b7d2d11b049ed7a4e (diff)
convert SFX_SHELL constants to scoped enum
Change-Id: If1649e8f3b9d200b0b176bef7deea41445bd3f2f
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appquit.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx16
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewsh.cxx2
4 files changed, 13 insertions, 13 deletions
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 <SfxShell> 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();