summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-06 14:01:04 +0200
committerNoel Grandin <noel@peralex.com>2015-03-11 10:16:54 +0200
commita4f4a8cb00d8b5f7cadef02afa9025e823384860 (patch)
treea1dd11783e785479b15f300f17ff96f59db2542c /sfx2
parent5eea85ec4fa7c458785be749a0e370a0883ff693 (diff)
convert SfxChildIdentifier to enum class
Change-Id: I7fb7b76d0642653efb9f3cfe2b55e3a7c5972c5e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx8
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx16
-rw-r--r--sfx2/source/inc/workwin.hxx10
4 files changed, 19 insertions, 19 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 53c4b75dd939..d5e5cab33aef 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1693,7 +1693,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
vcl::Window *pWin=0;
SfxChildWin_Impl *pCW = 0;
- if ( eChild == SFX_CHILDWIN_OBJECTBAR )
+ if ( eChild == SfxChildIdentifier::OBJECTBAR )
return;
// configure direct childwindow
@@ -1718,9 +1718,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pDockWin )
{
- if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
+ if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
{
- if ( eChild == SFX_CHILDWIN_SPLITWINDOW && eConfig == SFX_TOGGLEFLOATMODE)
+ if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == SFX_TOGGLEFLOATMODE)
{
// DockingWindow was dragged out of a SplitWindow
pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
@@ -1878,7 +1878,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pCli && pDockWin )
{
eAlign = pDockWin->GetAlignment();
- if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW || eAlign == SFX_ALIGN_NOALIGNMENT)
+ if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || eAlign == SFX_ALIGN_NOALIGNMENT)
{
// configuration inside the SplitWindow, no change for the SplitWindows' configuration
pCli->bResize = true;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index cb175b0801eb..a531433c896a 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( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+ GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SFX_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( SFX_CHILDWIN_DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
+ GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
}
return 0;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 7d4f6b6dcd2f..091dd313e42b 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -556,9 +556,9 @@ void SfxDockingWindow::ToggleFloatingMode()
SfxChildAlignment eLastAlign = GetAlignment();
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable )
- eIdent = SFX_CHILDWIN_SPLITWINDOW;
+ eIdent = SfxChildIdentifier::SPLITWINDOW;
if (IsFloatingMode())
{
@@ -633,9 +633,9 @@ void SfxDockingWindow::StartDocking()
{
if ( !pImp->bConstructed || !pMgr )
return;
- SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable )
- eIdent = SFX_CHILDWIN_SPLITWINDOW;
+ eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
pImp->SetDockAlignment(GetAlignment());
@@ -1861,9 +1861,9 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
pImp->aSplitSize = rSize;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable )
- eIdent = SFX_CHILDWIN_SPLITWINDOW;
+ eIdent = SfxChildIdentifier::SPLITWINDOW;
pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
@@ -1926,9 +1926,9 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
if( !GetFloatingWindow()->IsRollUp() )
SetFloatingSize( GetOutputSizePixel() );
pImp->aWinState = GetFloatingWindow()->GetWindowState();
- SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable )
- eIdent = SFX_CHILDWIN_SPLITWINDOW;
+ eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 87a68d765ec0..e87e259b7bec 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -131,12 +131,12 @@ struct SfxChildWin_Impl
{}
};
-enum SfxChildIdentifier
+enum class SfxChildIdentifier
{
- SFX_CHILDWIN_STATBAR,
- SFX_CHILDWIN_OBJECTBAR,
- SFX_CHILDWIN_DOCKINGWINDOW,
- SFX_CHILDWIN_SPLITWINDOW
+ STATBAR,
+ OBJECTBAR,
+ DOCKINGWINDOW,
+ SPLITWINDOW
};
enum SfxDockingConfig