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, ...@@ -1693,7 +1693,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
vcl::Window *pWin=0; vcl::Window *pWin=0;
SfxChildWin_Impl *pCW = 0; SfxChildWin_Impl *pCW = 0;
if ( eChild == SFX_CHILDWIN_OBJECTBAR ) if ( eChild == SfxChildIdentifier::OBJECTBAR )
return; return;
// configure direct childwindow // configure direct childwindow
...@@ -1718,9 +1718,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1718,9 +1718,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pDockWin ) 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 // DockingWindow was dragged out of a SplitWindow
pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus()); pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
...@@ -1878,7 +1878,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1878,7 +1878,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pCli && pDockWin ) if ( pCli && pDockWin )
{ {
eAlign = pDockWin->GetAlignment(); 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 // configuration inside the SplitWindow, no change for the SplitWindows' configuration
pCli->bResize = true; pCli->bResize = true;
......
...@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl) ...@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl)
if ( GetStyle() & WB_SIZEABLE ) if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ); nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask ); 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; return 0;
} }
...@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl) ...@@ -562,7 +562,7 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl)
if ( GetStyle() & WB_SIZEABLE ) if ( GetStyle() & WB_SIZEABLE )
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ); nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
pImp->aWinState = GetWindowState( nMask ); 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; return 0;
} }
......
...@@ -556,9 +556,9 @@ void SfxDockingWindow::ToggleFloatingMode() ...@@ -556,9 +556,9 @@ void SfxDockingWindow::ToggleFloatingMode()
SfxChildAlignment eLastAlign = GetAlignment(); SfxChildAlignment eLastAlign = GetAlignment();
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW; SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SFX_CHILDWIN_SPLITWINDOW; eIdent = SfxChildIdentifier::SPLITWINDOW;
if (IsFloatingMode()) if (IsFloatingMode())
{ {
...@@ -633,9 +633,9 @@ void SfxDockingWindow::StartDocking() ...@@ -633,9 +633,9 @@ void SfxDockingWindow::StartDocking()
{ {
if ( !pImp->bConstructed || !pMgr ) if ( !pImp->bConstructed || !pMgr )
return; return;
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW; SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SFX_CHILDWIN_SPLITWINDOW; eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() ); pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
pImp->SetDockAlignment(GetAlignment()); pImp->SetDockAlignment(GetAlignment());
...@@ -1861,9 +1861,9 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize ) ...@@ -1861,9 +1861,9 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
pImp->aSplitSize = rSize; pImp->aSplitSize = rSize;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW; SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SFX_CHILDWIN_SPLITWINDOW; eIdent = SfxChildIdentifier::SPLITWINDOW;
pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() ); pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
} }
...@@ -1926,9 +1926,9 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl) ...@@ -1926,9 +1926,9 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
if( !GetFloatingWindow()->IsRollUp() ) if( !GetFloatingWindow()->IsRollUp() )
SetFloatingSize( GetOutputSizePixel() ); SetFloatingSize( GetOutputSizePixel() );
pImp->aWinState = GetFloatingWindow()->GetWindowState(); pImp->aWinState = GetFloatingWindow()->GetWindowState();
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW; SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SFX_CHILDWIN_SPLITWINDOW; eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() ); pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
} }
......
...@@ -131,12 +131,12 @@ struct SfxChildWin_Impl ...@@ -131,12 +131,12 @@ struct SfxChildWin_Impl
{} {}
}; };
enum SfxChildIdentifier enum class SfxChildIdentifier
{ {
SFX_CHILDWIN_STATBAR, STATBAR,
SFX_CHILDWIN_OBJECTBAR, OBJECTBAR,
SFX_CHILDWIN_DOCKINGWINDOW, DOCKINGWINDOW,
SFX_CHILDWIN_SPLITWINDOW SPLITWINDOW
}; };
enum SfxDockingConfig 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