summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-06 14:06:46 +0200
committerNoel Grandin <noel@peralex.com>2015-03-11 10:16:54 +0200
commit9853d0fa7ae50da40d384945afc8871b80194493 (patch)
treee238cea8581d22a352e831b2c6461861ed090858 /sfx2
parenta4f4a8cb00d8b5f7cadef02afa9025e823384860 (diff)
convert SfxDockingConfig to enum class
Change-Id: I2cfc9f2f165f970daa2dc42ec4d733dde968b55a
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx14
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx8
-rw-r--r--sfx2/source/inc/workwin.hxx10
4 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index d5e5cab33aef..5af1678b5924 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1720,7 +1720,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{
if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
{
- if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == SFX_TOGGLEFLOATMODE)
+ if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{
// DockingWindow was dragged out of a SplitWindow
pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
@@ -1734,7 +1734,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
SfxSplitWindow *pSplitWin = GetSplitWindow_Impl(pDockWin->GetAlignment());
// configure DockingWindow inside a SplitWindow
- if ( eConfig == SFX_TOGGLEFLOATMODE)
+ if ( eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{
// DockingWindow was dragged into a SplitWindow
pCW->pCli = 0;
@@ -1773,7 +1773,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
switch ( eConfig )
{
- case SFX_SETDOCKINGRECTS :
+ case SfxDockingConfig::SETDOCKINGRECTS :
{
if (nPos == USHRT_MAX || !pDockWin)
return;
@@ -1866,9 +1866,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
break;
}
- case SFX_MOVEDOCKINGWINDOW :
- case SFX_ALIGNDOCKINGWINDOW :
- case SFX_TOGGLEFLOATMODE:
+ case SfxDockingConfig::MOVEDOCKINGWINDOW :
+ case SfxDockingConfig::ALIGNDOCKINGWINDOW :
+ case SfxDockingConfig::TOGGLEFLOATMODE:
{
if ( nPos == USHRT_MAX && !pCW )
return;
@@ -1904,7 +1904,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
SfxChildWindowFlags nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pCW->pWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
- if ( eConfig != SFX_MOVEDOCKINGWINDOW )
+ if ( eConfig != SfxDockingConfig::MOVEDOCKINGWINDOW )
SaveStatus_Impl( pCW->pWin, pCW->aInfo);
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index a531433c896a..566227863f72 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
- GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+ GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
}
return 0;
}
@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask );
- GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+ GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
}
return 0;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 091dd313e42b..5e21f99bdce8 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -616,7 +616,7 @@ void SfxDockingWindow::ToggleFloatingMode()
pImp->SetDockAlignment(GetAlignment());
// Dock or undock SfxChildWindow correctly.
- pWorkWin->ConfigChild_Impl( eIdent, SFX_TOGGLEFLOATMODE, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::TOGGLEFLOATMODE, pMgr->GetType() );
}
@@ -637,7 +637,7 @@ void SfxDockingWindow::StartDocking()
if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::SETDOCKINGRECTS, pMgr->GetType() );
pImp->SetDockAlignment(GetAlignment());
if ( pImp->pSplitWin )
@@ -1864,7 +1864,7 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::SPLITWINDOW;
- pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
void SfxDockingWindow::Disappear_Impl()
@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
return 0;
}
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index e87e259b7bec..762a2ff002e4 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -139,12 +139,12 @@ enum class SfxChildIdentifier
SPLITWINDOW
};
-enum SfxDockingConfig
+enum class SfxDockingConfig
{
- SFX_SETDOCKINGRECTS,
- SFX_ALIGNDOCKINGWINDOW,
- SFX_TOGGLEFLOATMODE,
- SFX_MOVEDOCKINGWINDOW
+ SETDOCKINGRECTS,
+ ALIGNDOCKINGWINDOW,
+ TOGGLEFLOATMODE,
+ MOVEDOCKINGWINDOW
};
typedef std::vector<SfxChild_Impl*> SfxChildList_Impl;