Kaydet (Commit) a4f4a8cb authored tarafından Noel Grandin's avatar Noel Grandin

convert SfxChildIdentifier to enum class

Change-Id: I7fb7b76d0642653efb9f3cfe2b55e3a7c5972c5e
üst 5eea85ec
......@@ -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;
......
......@@ -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;
}
......
......@@ -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() );
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment