diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-25 12:39:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-25 12:39:49 +0200 |
commit | 15b406f0736ad953aa79102bfa5949871c8c0213 (patch) | |
tree | 6323df578781137a65d6fa8e92298025333da61d /sfx2/source | |
parent | bc81d76567eb64e05f830499ef48c60caee13503 (diff) |
convert SFX_CHILDWIN constants to enum class
Change-Id: I8eb0c9bda0883bc08aed3acd7eaa72480848c6f3
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appreg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/childwin.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 56 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/partwnd.cxx | 2 |
6 files changed, 39 insertions, 39 deletions
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index 923016d01c94..dc25cc26be30 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -53,10 +53,10 @@ void SfxApplication::Registrations_Impl() // ChildWindows SfxRecordingFloatWrapper_Impl::RegisterChildWindow(); - SfxNavigatorWrapper::RegisterChildWindow( false, NULL, SFX_CHILDWIN_NEVERHIDE ); + SfxNavigatorWrapper::RegisterChildWindow( false, NULL, SfxChildWindowFlags::NEVERHIDE ); SfxPartChildWnd_Impl::RegisterChildWindow(); SfxDockingWrapper::RegisterChildWindow(); - SfxInfoBarContainerChild::RegisterChildWindow( true, NULL, SFX_CHILDWIN_NEVERHIDE ); + SfxInfoBarContainerChild::RegisterChildWindow( true, NULL, SfxChildWindowFlags::NEVERHIDE ); // Controller SfxToolBoxControl::RegisterControl(SID_REPEAT); diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 1e870c8a571b..90f5e428aa77 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -351,7 +351,7 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const } aInfo.bVisible = pImp->bVisible; - aInfo.nFlags = 0; + aInfo.nFlags = SfxChildWindowFlags::NONE; return aInfo; } @@ -416,12 +416,12 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI if ( nNextPos != -1 ) { // there is extra information - rInfo.nFlags = (sal_uInt16)aWinData.copy( nPos+1, nNextPos - nPos - 1 ).toInt32(); + rInfo.nFlags = static_cast<SfxChildWindowFlags>((sal_uInt16)aWinData.copy( nPos+1, nNextPos - nPos - 1 ).toInt32()); aWinData = aWinData.replaceAt( nPos, nNextPos-nPos+1, "" ); rInfo.aExtraString = aWinData; } else - rInfo.nFlags = (sal_uInt16)aWinData.copy( nPos+1 ).toInt32(); + rInfo.nFlags = static_cast<SfxChildWindowFlags>((sal_uInt16)aWinData.copy( nPos+1 ).toInt32()); } } } @@ -755,7 +755,7 @@ void SfxChildWindow::SetFrame( const ::com::sun::star::uno::Reference< ::com::su bool SfxChildWindow::CanGetFocus() const { - return !(pImp->pFact->aInfo.nFlags & SFX_CHILDWIN_CANTGETFOCUS); + return !(pImp->pFact->aInfo.nFlags & SfxChildWindowFlags::CANTGETFOCUS); } void SfxChildWindowContext::RegisterChildWindowContext(SfxModule* pMod, sal_uInt16 nId, SfxChildWinContextFactory* pFact) diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index db5d7da145a7..53c4b75dd939 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1061,8 +1061,8 @@ void SfxWorkWindow::ShowChildren_Impl() // Check flag SFX_CHILDWIN_NEVERHIDE that forces us to show // the child window even in situations where no child window is // visible. - sal_uInt16 nFlags = pCW->aInfo.nFlags; - bVisible = !bInvisible || (( nFlags & SFX_CHILDWIN_NEVERHIDE ) != 0 ); + SfxChildWindowFlags nFlags = pCW->aInfo.nFlags; + bVisible = !bInvisible || ( nFlags & SfxChildWindowFlags::NEVERHIDE ); } if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) && bVisible ) @@ -1419,7 +1419,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl() SfxChildWin_Impl *pCW = aChildWins[n]; SfxChildWindow *pChildWin = pCW->pWin; bool bCreate = false; - if ( pCW->nId && !pCW->bDisabled && (pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) ) + if ( pCW->nId && !pCW->bDisabled && (pCW->aInfo.nFlags & SfxChildWindowFlags::ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) ) { // In the context is an appropriate ChildWindow allowed; // it is also turned on? @@ -1432,7 +1432,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl() { // Special case for all non-floatable child windows. We have // to prevent the creation here! - bCreate = !( pCW->aInfo.nFlags & SFX_CHILDWIN_FORCEDOCK ); + bCreate = !( pCW->aInfo.nFlags & SfxChildWindowFlags::FORCEDOCK ); } else if ( !IsDockingAllowed() || bIsFullScreen ) // || !bInternalDocking ) { @@ -1573,7 +1573,7 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW ) SfxChildWindow *pChildWin = pCW->pWin; // Save the information in the INI file - sal_uInt16 nFlags = pCW->aInfo.nFlags; + SfxChildWindowFlags nFlags = pCW->aInfo.nFlags; pCW->aInfo = pChildWin->GetInfo(); pCW->aInfo.nFlags |= nFlags; SaveStatus_Impl(pChildWin, pCW->aInfo); @@ -1901,7 +1901,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, if ( pCW && pCW->pWin ) { // store changed configuration - sal_uInt16 nFlags = pCW->aInfo.nFlags; + SfxChildWindowFlags nFlags = pCW->aInfo.nFlags; pCW->aInfo = pCW->pWin->GetInfo(); pCW->aInfo.nFlags |= nFlags; if ( eConfig != SFX_MOVEDOCKINGWINDOW ) @@ -1959,7 +1959,7 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, bool bEnabled, s pCW = new SfxChildWin_Impl( lId ); pCW->nId = nId; InitializeChild_Impl( pCW ); - if ( pWork && !( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) ) + if ( pWork && !( pCW->aInfo.nFlags & SfxChildWindowFlags::TASK ) ) pWork->aChildWins.push_back( pCW ); else aChildWins.push_back( pCW ); @@ -1995,7 +1995,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16 nId, bool bSetFocus) { // Special case for all non-floatable child windows. We have // to prevent the creation here! - bCreationAllowed = !( pCW->aInfo.nFlags & SFX_CHILDWIN_FORCEDOCK ); + bCreationAllowed = !( pCW->aInfo.nFlags & SfxChildWindowFlags::FORCEDOCK ); } if ( bCreationAllowed ) @@ -2151,7 +2151,7 @@ bool SfxWorkWindow::IsFloating( sal_uInt16 nId ) pCW->nId = 0; pCW->nVisibility = 0; InitializeChild_Impl( pCW ); - if ( pWork && !( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) ) + if ( pWork && !( pCW->aInfo.nFlags & SfxChildWindowFlags::TASK ) ) pWork->aChildWins.push_back( pCW ); else aChildWins.push_back( pCW ); @@ -2180,7 +2180,7 @@ bool SfxWorkWindow::KnowsChildWindow_Impl(sal_uInt16 nId) if (n<nCount) { - if ( !(pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE) && !IsVisible_Impl( pCW->nVisibility ) ) + if ( !(pCW->aInfo.nFlags & SfxChildWindowFlags::ALWAYSAVAILABLE) && !IsVisible_Impl( pCW->nVisibility ) ) return false; return pCW->bEnable; } @@ -2233,7 +2233,7 @@ void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, bool bOn, bool bSetFocus // the Parent pCW = new SfxChildWin_Impl( nId ); InitializeChild_Impl( pCW ); - if ( !pWork || pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) + if ( !pWork || pCW->aInfo.nFlags & SfxChildWindowFlags::TASK ) pWork = this; pWork->aChildWins.push_back( pCW ); } @@ -2297,7 +2297,7 @@ void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, bool bVisible, bool bSe if ( pChildWin ) { pChildWin->SetVisible_Impl( bVisible ); - sal_uInt16 nFlags = pCW->aInfo.nFlags; + SfxChildWindowFlags nFlags = pCW->aInfo.nFlags; pCW->aInfo = pChildWin->GetInfo(); pCW->aInfo.nFlags |= nFlags; if ( !pCW->bCreate ) @@ -2434,13 +2434,13 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW) SfxChildWindow::InitializeChildWinFactory_Impl( pCW->nSaveId, pCW->aInfo); pCW->bCreate = pCW->aInfo.bVisible; - sal_uInt16 nFlags = pFact->aInfo.nFlags; - if ( nFlags & SFX_CHILDWIN_TASK ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK; - if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_CANTGETFOCUS; - if ( nFlags & SFX_CHILDWIN_FORCEDOCK ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_FORCEDOCK; + SfxChildWindowFlags nFlags = pFact->aInfo.nFlags; + if ( nFlags & SfxChildWindowFlags::TASK ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::TASK; + if ( nFlags & SfxChildWindowFlags::CANTGETFOCUS ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::CANTGETFOCUS; + if ( nFlags & SfxChildWindowFlags::FORCEDOCK ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::FORCEDOCK; pFact->aInfo = pCW->aInfo; return; } @@ -2463,15 +2463,15 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW) SfxChildWindow::InitializeChildWinFactory_Impl( pCW->nSaveId, pCW->aInfo); pCW->bCreate = pCW->aInfo.bVisible; - sal_uInt16 nFlags = pFact->aInfo.nFlags; - if ( nFlags & SFX_CHILDWIN_TASK ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK; - if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_CANTGETFOCUS; - if ( nFlags & SFX_CHILDWIN_FORCEDOCK ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_FORCEDOCK; - if ( nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE ) - pCW->aInfo.nFlags |= SFX_CHILDWIN_ALWAYSAVAILABLE; + SfxChildWindowFlags nFlags = pFact->aInfo.nFlags; + if ( nFlags & SfxChildWindowFlags::TASK ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::TASK; + if ( nFlags & SfxChildWindowFlags::CANTGETFOCUS ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::CANTGETFOCUS; + if ( nFlags & SfxChildWindowFlags::FORCEDOCK ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::FORCEDOCK; + if ( nFlags & SfxChildWindowFlags::ALWAYSAVAILABLE ) + pCW->aInfo.nFlags |= SfxChildWindowFlags::ALWAYSAVAILABLE; pFact->aInfo = pCW->aInfo; return; } diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 8be4a17b9370..be56e6c8516b 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -403,7 +403,7 @@ void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const { rInfo.aSize = aSize; if ( IsRollUp() ) - rInfo.nFlags |= SFX_CHILDWIN_ZOOMIN; + rInfo.nFlags |= SfxChildWindowFlags::ZOOMIN; } @@ -611,7 +611,7 @@ void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const { rInfo.aSize = aSize; if ( IsRollUp() ) - rInfo.nFlags |= SFX_CHILDWIN_ZOOMIN; + rInfo.nFlags |= SfxChildWindowFlags::ZOOMIN; } // SfxSingleTabDialog ---------------------------------------------------- diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index e0d73638559d..f7367ed0fbef 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -217,7 +217,7 @@ vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* p return pWin; } -void SfxDockingWrapper::RegisterChildWindow (bool bVis, SfxModule *pMod, sal_uInt16 nFlags) +void SfxDockingWrapper::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) { // pre-register a couple of docking windows for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ ) @@ -1007,7 +1007,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo) return; } - if (pInfo && (pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK)) + if (pInfo && (pInfo->nFlags & SfxChildWindowFlags::FORCEDOCK)) pImp->bDockingPrevented = true; pImp->aSplitSize = GetOutputSizePixel(); diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 6420558452e8..beddb3391512 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -63,7 +63,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl eChildAlignment = SFX_ALIGN_TOP; assert(pInfo); - pInfo->nFlags |= SFX_CHILDWIN_FORCEDOCK; + pInfo->nFlags |= SfxChildWindowFlags::FORCEDOCK; static_cast<SfxDockingWindow*>(pWindow)->SetFloatingSize( Size( 175, 175 ) ); pWindow->SetSizePixel( Size( 175, 175 ) ); |