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

convert SfxDockingConfig to enum class

Change-Id: I2cfc9f2f165f970daa2dc42ec4d733dde968b55a
üst a4f4a8cb
...@@ -1720,7 +1720,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1720,7 +1720,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{ {
if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) 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 // 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());
...@@ -1734,7 +1734,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1734,7 +1734,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
SfxSplitWindow *pSplitWin = GetSplitWindow_Impl(pDockWin->GetAlignment()); SfxSplitWindow *pSplitWin = GetSplitWindow_Impl(pDockWin->GetAlignment());
// configure DockingWindow inside a SplitWindow // configure DockingWindow inside a SplitWindow
if ( eConfig == SFX_TOGGLEFLOATMODE) if ( eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{ {
// DockingWindow was dragged into a SplitWindow // DockingWindow was dragged into a SplitWindow
pCW->pCli = 0; pCW->pCli = 0;
...@@ -1773,7 +1773,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1773,7 +1773,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
switch ( eConfig ) switch ( eConfig )
{ {
case SFX_SETDOCKINGRECTS : case SfxDockingConfig::SETDOCKINGRECTS :
{ {
if (nPos == USHRT_MAX || !pDockWin) if (nPos == USHRT_MAX || !pDockWin)
return; return;
...@@ -1866,9 +1866,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1866,9 +1866,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
break; break;
} }
case SFX_MOVEDOCKINGWINDOW : case SfxDockingConfig::MOVEDOCKINGWINDOW :
case SFX_ALIGNDOCKINGWINDOW : case SfxDockingConfig::ALIGNDOCKINGWINDOW :
case SFX_TOGGLEFLOATMODE: case SfxDockingConfig::TOGGLEFLOATMODE:
{ {
if ( nPos == USHRT_MAX && !pCW ) if ( nPos == USHRT_MAX && !pCW )
return; return;
...@@ -1904,7 +1904,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1904,7 +1904,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
SfxChildWindowFlags nFlags = pCW->aInfo.nFlags; SfxChildWindowFlags nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pCW->pWin->GetInfo(); pCW->aInfo = pCW->pWin->GetInfo();
pCW->aInfo.nFlags |= nFlags; pCW->aInfo.nFlags |= nFlags;
if ( eConfig != SFX_MOVEDOCKINGWINDOW ) if ( eConfig != SfxDockingConfig::MOVEDOCKINGWINDOW )
SaveStatus_Impl( pCW->pWin, pCW->aInfo); SaveStatus_Impl( pCW->pWin, pCW->aInfo);
} }
......
...@@ -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( SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() ); GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::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( SfxChildIdentifier::DOCKINGWINDOW, SFX_ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() ); GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() );
} }
return 0; return 0;
} }
......
...@@ -616,7 +616,7 @@ void SfxDockingWindow::ToggleFloatingMode() ...@@ -616,7 +616,7 @@ void SfxDockingWindow::ToggleFloatingMode()
pImp->SetDockAlignment(GetAlignment()); pImp->SetDockAlignment(GetAlignment());
// Dock or undock SfxChildWindow correctly. // 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() ...@@ -637,7 +637,7 @@ void SfxDockingWindow::StartDocking()
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::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, SfxDockingConfig::SETDOCKINGRECTS, pMgr->GetType() );
pImp->SetDockAlignment(GetAlignment()); pImp->SetDockAlignment(GetAlignment());
if ( pImp->pSplitWin ) if ( pImp->pSplitWin )
...@@ -1864,7 +1864,7 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize ) ...@@ -1864,7 +1864,7 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW; SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::SPLITWINDOW; eIdent = SfxChildIdentifier::SPLITWINDOW;
pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() ); pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
} }
void SfxDockingWindow::Disappear_Impl() void SfxDockingWindow::Disappear_Impl()
...@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl) ...@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl)
if ( pImp->bSplitable ) if ( pImp->bSplitable )
eIdent = SfxChildIdentifier::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, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
} }
return 0; return 0;
} }
......
...@@ -139,12 +139,12 @@ enum class SfxChildIdentifier ...@@ -139,12 +139,12 @@ enum class SfxChildIdentifier
SPLITWINDOW SPLITWINDOW
}; };
enum SfxDockingConfig enum class SfxDockingConfig
{ {
SFX_SETDOCKINGRECTS, SETDOCKINGRECTS,
SFX_ALIGNDOCKINGWINDOW, ALIGNDOCKINGWINDOW,
SFX_TOGGLEFLOATMODE, TOGGLEFLOATMODE,
SFX_MOVEDOCKINGWINDOW MOVEDOCKINGWINDOW
}; };
typedef std::vector<SfxChild_Impl*> SfxChildList_Impl; typedef std::vector<SfxChild_Impl*> SfxChildList_Impl;
......
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