summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-23 15:42:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-24 08:05:55 +0200
commit5af0071d42e5962ed849261134ef0630c7ec3b45 (patch)
tree8ad2451b56585454c1cefea96dcf44721fe6a979
parent0e04b531448d7915b40c59dccef7a9313bd28c11 (diff)
convert SFX_VISIBILITY constants to scoped enum
* split the position and the flags information * remove unused DESKTOP constant Change-Id: Ibfccb44c7567e89d4527bfd36b3915a73682e6e2
-rw-r--r--include/sfx2/objface.hxx5
-rw-r--r--include/sfx2/shell.hxx23
-rw-r--r--sc/source/ui/app/scmod.cxx3
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx3
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx3
-rw-r--r--sc/source/ui/drawfunc/drformsh.cxx3
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx3
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx3
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx2
-rw-r--r--sc/source/ui/drawfunc/oleobjsh.cxx3
-rw-r--r--sc/source/ui/view/cellsh.cxx3
-rw-r--r--sc/source/ui/view/formatsh.cxx3
-rw-r--r--sc/source/ui/view/prevwsh.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh.cxx3
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
-rw-r--r--sd/source/ui/view/presvish.cxx8
-rw-r--r--sfx2/source/appl/workwin.cxx61
-rw-r--r--sfx2/source/control/dispatch.cxx35
-rw-r--r--sfx2/source/control/objface.cxx51
-rw-r--r--sfx2/source/inc/workwin.hxx26
-rw-r--r--sfx2/source/view/viewfrm.cxx4
-rw-r--r--starmath/source/view.cxx3
-rw-r--r--svx/source/form/fmshell.cxx12
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx3
-rw-r--r--sw/source/uibase/shells/annotsh.cxx2
-rw-r--r--sw/source/uibase/shells/beziersh.cxx2
-rw-r--r--sw/source/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/uibase/shells/drformsh.cxx2
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/listsh.cxx2
-rw-r--r--sw/source/uibase/shells/mediash.cxx2
-rw-r--r--sw/source/uibase/shells/olesh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx3
-rw-r--r--sw/source/uibase/uiview/srcview.cxx3
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/web/wformsh.cxx2
-rw-r--r--sw/source/uibase/web/wfrmsh.cxx2
-rw-r--r--sw/source/uibase/web/wgrfsh.cxx2
-rw-r--r--sw/source/uibase/web/wlistsh.cxx2
-rw-r--r--sw/source/uibase/web/wolesh.cxx2
-rw-r--r--sw/source/uibase/web/wtabsh.cxx2
-rw-r--r--sw/source/uibase/web/wtextsh.cxx2
-rw-r--r--sw/source/uibase/web/wview.cxx2
49 files changed, 179 insertions, 143 deletions
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index ac93da6b270d..3805d2fe0fb3 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -64,13 +64,14 @@ public:
const SfxInterface* GetGenoType() const { return pGenoType; }
- void RegisterObjectBar(sal_uInt16, sal_uInt32 nResId);
- void RegisterObjectBar(sal_uInt16, sal_uInt32 nResId, SfxShellFeature nFeature);
+ void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId);
+ void RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature);
void RegisterChildWindow(sal_uInt16, bool bContext = false);
void RegisterChildWindow(sal_uInt16, bool bContext, SfxShellFeature nFeature);
void RegisterStatusBar(sal_uInt32 nResId);
sal_uInt32 GetObjectBarId(sal_uInt16 nNo) const;
sal_uInt16 GetObjectBarPos( sal_uInt16 nNo ) const;
+ SfxVisibilityFlags GetObjectBarFlags( sal_uInt16 nNo ) const;
SfxShellFeature GetObjectBarFeature(sal_uInt16 nNo) const;
sal_uInt16 GetObjectBarCount() const;
bool IsObjectBarVisible( sal_uInt16 nNo) const;
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index a337aed0289d..4c7d12fd7049 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -581,17 +581,18 @@ SFX_TMPL_INTERFACE(Class,SuperClass,false) \
#define SFX_IMPL_SUPERCLASS_INTERFACE(Class,SuperClass) \
SFX_TMPL_INTERFACE(Class,SuperClass,true) \
-#define SFX_POSITION_MASK 0x000F
-#define SFX_VISIBILITY_MASK 0xFFF0
-#define SFX_VISIBILITY_UNVISIBLE 0x0000 // Never visible
-#define SFX_VISIBILITY_VIEWER 0x0040
-#define SFX_VISIBILITY_READONLYDOC 0x0400
-#define SFX_VISIBILITY_DESKTOP 0x0800
-#define SFX_VISIBILITY_STANDARD 0x1000
-#define SFX_VISIBILITY_FULLSCREEN 0x2000
-#define SFX_VISIBILITY_CLIENT 0x4000
-#define SFX_VISIBILITY_SERVER 0x8000
-
+enum class SfxVisibilityFlags {
+ Invisible = 0x0000, // Never visible
+ Viewer = 0x0040,
+ ReadonlyDoc = 0x0400,
+ Standard = 0x1000,
+ FullScreen = 0x2000,
+ Client = 0x4000,
+ Server = 0x8000,
+};
+namespace o3tl {
+ template<> struct typed_flags<SfxVisibilityFlags> : is_typed_flags<SfxVisibilityFlags, 0xf440> {};
+}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index bfbe59d72710..435a00b560d4 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -125,7 +125,8 @@ SFX_IMPL_INTERFACE(ScModule, SfxShell)
void ScModule::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer,
RID_OBJECTBAR_APP);
GetStaticInterface()->RegisterStatusBar(SCCFG_STATUSBAR);
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index b07f8b93f9c2..5f7e494e44d8 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -49,7 +49,8 @@ SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell)
void ScChartShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_DRAW_OBJECTBAR);
GetStaticInterface()->RegisterPopupMenu("chart");
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 3b38a264610c..b172abeeea84 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -65,7 +65,8 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
void ScDrawShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_DRAW_OBJECTBAR);
GetStaticInterface()->RegisterPopupMenu("draw");
diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx
index 28b5e4fa880f..cbfc149ba7a1 100644
--- a/sc/source/ui/drawfunc/drformsh.cxx
+++ b/sc/source/ui/drawfunc/drformsh.cxx
@@ -44,7 +44,8 @@ SFX_IMPL_INTERFACE(ScDrawFormShell, ScDrawShell)
void ScDrawFormShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_OBJECTBAR_FORMAT);
GetStaticInterface()->RegisterPopupMenu("form");
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 7521afb942f7..a8c8b34718e3 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -87,7 +87,8 @@ SFX_IMPL_INTERFACE(ScDrawTextObjectBar, SfxShell)
void ScDrawTextObjectBar::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_TEXT_TOOLBOX);
GetStaticInterface()->RegisterPopupMenu("drawtext");
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 254cb0649a4d..d1875e7b4a49 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -46,7 +46,8 @@ SFX_IMPL_INTERFACE(ScGraphicShell, ScDrawShell)
void ScGraphicShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_GRAPHIC_OBJECTBAR);
GetStaticInterface()->RegisterPopupMenu("graphic");
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 4ddeec4c2abd..546afd9aaff8 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -39,7 +39,7 @@ SFX_IMPL_INTERFACE(ScMediaShell, ScDrawShell)
void ScMediaShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_MEDIA_OBJECTBAR);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_MEDIA_OBJECTBAR);
GetStaticInterface()->RegisterPopupMenu("media");
}
diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx
index e3096ebb3815..a108cdce45e9 100644
--- a/sc/source/ui/drawfunc/oleobjsh.cxx
+++ b/sc/source/ui/drawfunc/oleobjsh.cxx
@@ -44,7 +44,8 @@ SFX_IMPL_INTERFACE(ScOleObjectShell, ScDrawShell)
void ScOleObjectShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_DRAW_OBJECTBAR);
GetStaticInterface()->RegisterPopupMenu("oleobject");
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index cb2f79995cde..50628caadfcc 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -67,7 +67,8 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell)
void ScCellShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_OBJECTBAR_FORMAT);
GetStaticInterface()->RegisterPopupMenu("cell");
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 28f3fd6e46c0..1d81306d8d74 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -125,7 +125,8 @@ SFX_IMPL_INTERFACE(ScFormatShell, SfxShell)
void ScFormatShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_OBJECTBAR_FORMAT);
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index b27d5355ba45..7311751d4bfc 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -88,7 +88,8 @@ SFX_IMPL_INTERFACE(ScPreviewShell, SfxViewShell)
void ScPreviewShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER|SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server|SfxVisibilityFlags::ReadonlyDoc,
RID_OBJECTBAR_PREVIEW);
GetStaticInterface()->RegisterPopupMenu("preview");
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index ccf681b47248..bb18b4beffab 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -53,7 +53,8 @@ SFX_IMPL_INTERFACE(ScTabViewShell, SfxViewShell)
void ScTabViewShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
RID_OBJECTBAR_TOOLS);
GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index e9ab3e560e7b..6794791877b7 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -112,9 +112,9 @@ void OutlineViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("outline");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
RID_OUTLINE_TOOLBOX);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER | SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer | SfxVisibilityFlags::ReadonlyDoc,
RID_DRAW_VIEWER_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index cf83969ba7ba..fd1c5c23f0ac 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -64,13 +64,13 @@ SFX_IMPL_INTERFACE(PresentationViewShell, DrawViewShell)
void PresentationViewShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
RID_DRAW_TOOLBOX);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER | SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer | SfxVisibilityFlags::ReadonlyDoc,
RID_DRAW_VIEWER_TOOLBOX);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OPTIONS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OPTIONS, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_DRAW_OPTIONS_TOOLBOX);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_COMMONTASK | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_COMMONTASK, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
RID_DRAW_COMMONTASK_TOOLBOX);
}
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 61a688ce6f4e..a8ad4dbf45a2 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -467,9 +467,9 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxFrame *pFrm, SfxFrame* pMast
pWorkWin (pWin),
pConfigShell( nullptr ),
pActiveChild( nullptr ),
- nUpdateMode(SFX_VISIBILITY_STANDARD),
+ nUpdateMode(SfxVisibilityFlags::Standard),
nChildren( 0 ),
- nOrigMode( 0 ),
+ nOrigMode( SfxVisibilityFlags::Invisible ),
bSorted( true ),
bDockingAllowed(true),
bInternalDockingAllowed(true),
@@ -527,8 +527,8 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxFrame *pFrm, SfxFrame* pMast
pSplit[n] = pSplitWin;
}
- nOrigMode = SFX_VISIBILITY_STANDARD;
- nUpdateMode = SFX_VISIBILITY_STANDARD;
+ nOrigMode = SfxVisibilityFlags::Standard;
+ nUpdateMode = SfxVisibilityFlags::Standard;
}
@@ -993,24 +993,22 @@ void SfxWorkWindow::ResetObjectBars_Impl()
aChildWins[n]->nId = 0;
}
-void SfxWorkWindow::SetObjectBar_Impl(sal_uInt16 nPos, sal_uInt32 nResId,
+void SfxWorkWindow::SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId,
SfxInterface* pIFace)
{
- DBG_ASSERT( (nPos & SFX_POSITION_MASK) < SFX_OBJECTBAR_MAX,
- "object bar position overflow" );
+ DBG_ASSERT( nPos < SFX_OBJECTBAR_MAX, "object bar position overflow" );
- sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
- if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
+ if ( pParent && IsAppWorkWinToolbox_Impl( nPos ) )
{
- pParent->SetObjectBar_Impl(nPos, nResId, pIFace);
+ pParent->SetObjectBar_Impl(nPos, nFlags, nResId, pIFace);
return;
}
SfxObjectBar_Impl aObjBar;
aObjBar.pIFace = pIFace;
aObjBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
- aObjBar.nPos = nRealPos;
- aObjBar.nMode = (nPos & SFX_VISIBILITY_MASK);
+ aObjBar.nPos = nPos;
+ aObjBar.nMode = nFlags;
for (SfxObjectBar_Impl & rBar : aObjBarList)
{
@@ -1033,13 +1031,12 @@ bool SfxWorkWindow::KnowsObjectBar_Impl( sal_uInt16 nPos ) const
*/
{
- sal_uInt16 nRealPos = nPos & SFX_POSITION_MASK;
- if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
+ if ( pParent && IsAppWorkWinToolbox_Impl( nPos ) )
return pParent->KnowsObjectBar_Impl( nPos );
for (const SfxObjectBar_Impl& rBar : aObjBarList)
{
- if ( rBar.nPos == nRealPos )
+ if ( rBar.nPos == nPos )
return true;
}
@@ -1047,20 +1044,20 @@ bool SfxWorkWindow::KnowsObjectBar_Impl( sal_uInt16 nPos ) const
}
-bool SfxWorkWindow::IsVisible_Impl( sal_uInt16 nMode ) const
+bool SfxWorkWindow::IsVisible_Impl( SfxVisibilityFlags nMode ) const
{
switch( nUpdateMode )
{
- case SFX_VISIBILITY_STANDARD:
+ case SfxVisibilityFlags::Standard:
return true;
- case SFX_VISIBILITY_UNVISIBLE:
+ case SfxVisibilityFlags::Invisible:
return false;
- case SFX_VISIBILITY_CLIENT:
- case SFX_VISIBILITY_SERVER:
+ case SfxVisibilityFlags::Client:
+ case SfxVisibilityFlags::Server:
return !!(nMode & nUpdateMode);
default:
return !!(nMode & nOrigMode ) ||
- nOrigMode == SFX_VISIBILITY_STANDARD;
+ nOrigMode == SfxVisibilityFlags::Standard;
}
}
@@ -1203,14 +1200,13 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
bool bDestroy = aObjBarList[n].bDestroy;
// Determine the valid mode for the ToolBox
- sal_uInt16 nTbxMode = aObjBarList[n].nMode;
- bool bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
- ( nTbxMode & SFX_VISIBILITY_FULLSCREEN );
- nTbxMode &= ~SFX_VISIBILITY_FULLSCREEN;
- nTbxMode &= ~SFX_VISIBILITY_VIEWER;
+ SfxVisibilityFlags nTbxMode = aObjBarList[n].nMode;
+ bool bFullScreenTbx( nTbxMode & SfxVisibilityFlags::FullScreen );
+ nTbxMode &= ~SfxVisibilityFlags::FullScreen;
+ nTbxMode &= ~SfxVisibilityFlags::Viewer;
// Is a ToolBox required in this context ?
- bool bModesMatching = ( nUpdateMode && ( nTbxMode & nUpdateMode) == nUpdateMode );
+ bool bModesMatching = (nUpdateMode != SfxVisibilityFlags::Invisible) && ((nTbxMode & nUpdateMode) == nUpdateMode);
if ( bDestroy )
{
OUString aTbxId( m_aTbxTypeName );
@@ -1483,9 +1479,9 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
void SfxWorkWindow::MakeVisible_Impl( bool bVis )
{
if ( bVis )
- nOrigMode = SFX_VISIBILITY_STANDARD;
+ nOrigMode = SfxVisibilityFlags::Standard;
else
- nOrigMode = SFX_VISIBILITY_UNVISIBLE;
+ nOrigMode = SfxVisibilityFlags::Invisible;
if ( nOrigMode != nUpdateMode)
nUpdateMode = nOrigMode;
@@ -1493,7 +1489,7 @@ void SfxWorkWindow::MakeVisible_Impl( bool bVis )
bool SfxWorkWindow::IsVisible_Impl()
{
- return nOrigMode != SFX_VISIBILITY_UNVISIBLE;
+ return nOrigMode != SfxVisibilityFlags::Invisible;
}
@@ -1755,7 +1751,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
}
-void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, bool bEnabled, sal_uInt16 nMode )
+void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, bool bEnabled, SfxVisibilityFlags nMode )
{
sal_uInt16 nInter = (sal_uInt16) ( lId >> 16 );
sal_uInt16 nId = (sal_uInt16) ( lId & 0xFFFF );
@@ -1810,7 +1806,6 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, bool bEnabled, s
pCW->nInterfaceId = nInter;
pCW->nVisibility = nMode;
pCW->bEnable = bEnabled;
- pCW->nVisibility = nMode;
}
@@ -1978,7 +1973,7 @@ bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
pCW = new SfxChildWin_Impl( nId );
pCW->bEnable = false;
pCW->nId = 0;
- pCW->nVisibility = 0;
+ pCW->nVisibility = SfxVisibilityFlags::Invisible;
InitializeChild_Impl( pCW );
if ( pWork && !( pCW->aInfo.nFlags & SfxChildWindowFlags::TASK ) )
pWork->aChildWins.push_back( pCW );
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 71cd48bd5466..96ae44a6f77a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -95,11 +95,12 @@ struct SfxToDo_Impl
struct SfxObjectBars_Impl
{
- sal_uInt32 nResId; // Resource - and ConfigId of the Toolbox
- sal_uInt16 nMode; // special visibility flags
- SfxInterface* pIFace;
+ sal_uInt32 nResId; // Resource - and ConfigId of the Toolbox
+ sal_uInt16 nPos;
+ SfxVisibilityFlags nFlags; // special visibility flags
+ SfxInterface* pIFace;
- SfxObjectBars_Impl() : nResId(0), nMode(0), pIFace(nullptr) {}
+ SfxObjectBars_Impl() : nResId(0), nPos(0), nFlags(SfxVisibilityFlags::Invisible), pIFace(nullptr) {}
};
struct SfxDispatcher_Impl
@@ -1377,7 +1378,8 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
for ( nNo = 0; pIFace && nNo<pIFace->GetObjectBarCount(); ++nNo )
{
sal_uInt16 nPos = pIFace->GetObjectBarPos(nNo);
- if ( bReadOnlyShell && !( nPos & SFX_VISIBILITY_READONLYDOC ) )
+ SfxVisibilityFlags nFlags = pIFace->GetObjectBarFlags(nNo);
+ if ( bReadOnlyShell && !( nFlags & SfxVisibilityFlags::ReadonlyDoc ) )
continue;
// check whether toolbar needs activation of a special feature
@@ -1388,7 +1390,7 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
// check for toolboxes that are exclusively for a viewer
if ( xImp->pFrame)
{
- bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER );
+ bool bViewerTbx( nFlags & SfxVisibilityFlags::Viewer );
SfxObjectShell* pSh = xImp->pFrame->GetObjectShell();
const SfxBoolItem* pItem = SfxItemSet::GetItem<SfxBoolItem>(pSh->GetMedium()->GetItemSet(), SID_VIEWONLY, false);
bool bIsViewer = pItem && pItem->GetValue();
@@ -1399,16 +1401,17 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
// always register toolbars, allows to switch them on
bool bVisible = pIFace->IsObjectBarVisible(nNo);
if ( !bVisible )
- nPos &= SFX_POSITION_MASK;
+ nFlags = SfxVisibilityFlags::Invisible;
- SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos & SFX_POSITION_MASK];
- rBar.nMode = nPos;
+ SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos];
+ rBar.nPos = nPos;
+ rBar.nFlags = nFlags;
rBar.nResId = pIFace->GetObjectBarId(nNo);
rBar.pIFace = pIFace;
if ( bUIActive || bIsActive )
{
- pWorkWin->SetObjectBar_Impl(nPos, rBar.nResId, rBar.pIFace);
+ pWorkWin->SetObjectBar_Impl(nPos, nFlags, rBar.nResId, rBar.pIFace);
}
if ( !bVisible )
@@ -1432,18 +1435,18 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
continue;
// slot decides whether a ChildWindow is shown when document is OLE server or OLE client
- sal_uInt16 nMode = SFX_VISIBILITY_STANDARD;
+ SfxVisibilityFlags nMode = SfxVisibilityFlags::Standard;
if( pSlot )
{
if ( pSlot->IsMode(SfxSlotMode::CONTAINER) )
{
- if ( pWorkWin->IsVisible_Impl( SFX_VISIBILITY_CLIENT ) )
- nMode |= SFX_VISIBILITY_CLIENT;
+ if ( pWorkWin->IsVisible_Impl( SfxVisibilityFlags::Client ) )
+ nMode |= SfxVisibilityFlags::Client;
}
else
{
- if ( pWorkWin->IsVisible_Impl( SFX_VISIBILITY_SERVER ) )
- nMode |= SFX_VISIBILITY_SERVER;
+ if ( pWorkWin->IsVisible_Impl( SfxVisibilityFlags::Server ) )
+ nMode |= SfxVisibilityFlags::Server;
}
}
@@ -1471,7 +1474,7 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
{
SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos];
rBar = rFixed;
- pWorkWin->SetObjectBar_Impl(rFixed.nMode,
+ pWorkWin->SetObjectBar_Impl(rFixed.nPos, rFixed.nFlags,
rFixed.nResId, rFixed.pIFace);
}
}
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 495374b16065..68d229dbd470 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -53,13 +53,15 @@ SfxCompareSlots_bsearch( const void* pSmaller, const void* pBigger )
struct SfxObjectUI_Impl
{
- sal_uInt16 nPos;
- sal_uInt32 nResId;
- bool bContext;
- SfxShellFeature nFeature;
+ sal_uInt16 nPos;
+ SfxVisibilityFlags nFlags;
+ sal_uInt32 nResId;
+ bool bContext;
+ SfxShellFeature nFeature;
- SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, SfxShellFeature nFeat) :
+ SfxObjectUI_Impl(sal_uInt16 n, SfxVisibilityFlags f, sal_uInt32 nId, SfxShellFeature nFeat) :
nPos(n),
+ nFlags(f),
nResId(nId),
bContext(false),
nFeature(nFeat)
@@ -95,7 +97,7 @@ struct SfxInterface_Impl
}
};
-static SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, SfxShellFeature nFeature);
+static SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature);
// constuctor, registeres a new unit
SfxInterface::SfxInterface( const char *pClassName,
@@ -360,24 +362,24 @@ void SfxInterface::RegisterPopupMenu( const OUString& rResourceName )
pImplData->aPopupName = rResourceName;
}
-void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, sal_uInt32 nResId)
+void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId)
{
- RegisterObjectBar(nPos, nResId, SfxShellFeature::NONE);
+ RegisterObjectBar(nPos, nFlags, nResId, SfxShellFeature::NONE);
}
-void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, sal_uInt32 nResId, SfxShellFeature nFeature)
+void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature)
{
- SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl(nPos, nResId, nFeature);
+ SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl(nPos, nFlags, nResId, nFeature);
if ( pUI )
pImplData->aObjectBars.push_back(pUI);
}
-SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, SfxShellFeature nFeature)
+SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature)
{
- if ((nPos & SFX_VISIBILITY_MASK) == 0)
- nPos |= SFX_VISIBILITY_STANDARD;
+ if (nFlags == SfxVisibilityFlags::Invisible)
+ nFlags |= SfxVisibilityFlags::Standard;
- return new SfxObjectUI_Impl(nPos, nResId, nFeature);
+ return new SfxObjectUI_Impl(nPos, nFlags, nResId, nFeature);
}
sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
@@ -418,6 +420,25 @@ sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
return pImplData->aObjectBars[nNo]->nPos;
}
+SfxVisibilityFlags SfxInterface::GetObjectBarFlags( sal_uInt16 nNo ) const
+{
+ bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
+ if ( bGenoType )
+ {
+ // Are there toolbars in the super class?
+ sal_uInt16 nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // The Super class comes first
+ return pGenoType->GetObjectBarFlags( nNo );
+ else
+ nNo = nNo - nBaseCount;
+ }
+
+ assert( nNo<pImplData->aObjectBars.size() );
+
+ return pImplData->aObjectBars[nNo]->nFlags;
+}
+
sal_uInt16 SfxInterface::GetObjectBarCount() const
{
if (pGenoType && pGenoType->UseAsSuperClass())
@@ -433,7 +454,7 @@ void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext)
void SfxInterface::RegisterChildWindow(sal_uInt16 nId, bool bContext, SfxShellFeature nFeature)
{
- SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, nFeature);
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, SfxVisibilityFlags::Invisible, nId, nFeature);
pUI->bContext = bContext;
pImplData->aChildWindows.push_back(pUI);
}
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index bf2cabb62ed1..a612b82baef3 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -46,15 +46,15 @@ class SfxWorkWindow;
// This struct makes all relevant Information available of Toolboxes
struct SfxObjectBar_Impl
{
- sal_uInt16 nId; // Resource - and ConfigId of Toolbox
- sal_uInt16 nMode; // special visibility flags
- sal_uInt16 nPos;
- bool bDestroy;
- SfxInterface* pIFace;
+ sal_uInt16 nId; // Resource - and ConfigId of Toolbox
+ SfxVisibilityFlags nMode; // special visibility flags
+ sal_uInt16 nPos;
+ bool bDestroy;
+ SfxInterface* pIFace;
SfxObjectBar_Impl() :
nId(0),
- nMode(0),
+ nMode(SfxVisibilityFlags::Invisible),
nPos(0),
bDestroy(false),
pIFace(nullptr)
@@ -116,7 +116,7 @@ struct SfxChildWin_Impl
bool bCreate;
SfxChildWinInfo aInfo;
SfxChild_Impl* pCli; // != 0 at direct Children
- sal_uInt16 nVisibility;
+ SfxVisibilityFlags nVisibility;
bool bEnable;
SfxChildWin_Impl( sal_uInt32 nID ) :
@@ -126,7 +126,7 @@ struct SfxChildWin_Impl
pWin(nullptr),
bCreate(false),
pCli(nullptr),
- nVisibility( SFX_VISIBILITY_UNVISIBLE ),
+ nVisibility( SfxVisibilityFlags::Invisible ),
bEnable( true )
{}
};
@@ -206,9 +206,9 @@ class SfxWorkWindow final
VclPtr<vcl::Window> pWorkWin;
SfxShell* pConfigShell;
VclPtr<vcl::Window> pActiveChild;
- sal_uInt16 nUpdateMode;
+ SfxVisibilityFlags nUpdateMode;
sal_uInt16 nChildren;
- sal_uInt16 nOrigMode;
+ SfxVisibilityFlags nOrigMode;
bool bSorted : 1;
bool bDockingAllowed : 1;
bool bInternalDockingAllowed : 1;
@@ -275,7 +275,7 @@ public:
void UpdateObjectBars_Impl();
void UpdateObjectBars_Impl2();
void ResetObjectBars_Impl();
- void SetObjectBar_Impl(sal_uInt16 nPos, sal_uInt32 nResId,
+ void SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId,
SfxInterface *pIFace);
bool KnowsObjectBar_Impl( sal_uInt16 nPos ) const;
bool IsVisible_Impl();
@@ -285,7 +285,7 @@ public:
// Methods for ChildWindows
void UpdateChildWindows_Impl();
void ResetChildWindows_Impl();
- void SetChildWindowVisible_Impl( sal_uInt32, bool, sal_uInt16 );
+ void SetChildWindowVisible_Impl( sal_uInt32, bool, SfxVisibilityFlags );
void ToggleChildWindow_Impl(sal_uInt16,bool);
bool HasChildWindow_Impl(sal_uInt16);
bool KnowsChildWindow_Impl(sal_uInt16);
@@ -295,7 +295,7 @@ public:
void InitializeChild_Impl(SfxChildWin_Impl*);
SfxSplitWindow* GetSplitWindow_Impl(SfxChildAlignment);
- bool IsVisible_Impl( sal_uInt16 nMode ) const;
+ bool IsVisible_Impl( SfxVisibilityFlags nMode ) const;
bool IsFloating( sal_uInt16 nId );
void SetActiveChild_Impl( vcl::Window *pChild );
const VclPtr<vcl::Window>& GetActiveChild_Impl() const { return pActiveChild; }
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3586a9ac3559..c9585d41007e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -149,8 +149,8 @@ void SfxViewFrame::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(SID_BROWSER);
GetStaticInterface()->RegisterChildWindow(SID_RECORDING_FLOATWINDOW);
#if HAVE_FEATURE_DESKTOP
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_FULLSCREEN | SFX_VISIBILITY_FULLSCREEN, RID_FULLSCREENTOOLBOX);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_STANDARD, RID_ENVTOOLBOX );
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_FULLSCREEN, SfxVisibilityFlags::FullScreen, RID_FULLSCREENTOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard, RID_ENVTOOLBOX );
#endif
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 61895fbf3cf5..2456fb2ec1dc 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -873,7 +873,8 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SmViewShell, SfxViewShell)
void SmViewShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
RID_MATH_TOOLBOX);
//Dummy-Objectbar, to avoid quiver while activating
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index e44a926ca671..2b21ee76f259 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -158,15 +158,15 @@ SFX_IMPL_INTERFACE(FmFormShell, SfxShell)
void FmFormShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION, SfxVisibilityFlags::Standard|SfxVisibilityFlags::ReadonlyDoc,
RID_SVXTBX_FORM_NAVIGATION,
SfxShellFeature::FormShowDatabaseBar);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION, SfxVisibilityFlags::Standard|SfxVisibilityFlags::ReadonlyDoc,
RID_SVXTBX_FORM_FILTER,
SfxShellFeature::FormShowFilterBar);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard | SfxVisibilityFlags::ReadonlyDoc,
RID_SVXTBX_TEXT_CONTROL_ATTRIBUTES,
SfxShellFeature::FormShowTextControlBar);
@@ -176,15 +176,15 @@ void FmFormShell::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(SID_FM_FILTER_NAVIGATOR, false, SfxShellFeature::FormShowFilterNavigator);
GetStaticInterface()->RegisterChildWindow(SID_FM_SHOW_DATANAVIGATOR, false, SfxShellFeature::FormShowDataNavigator);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
RID_SVXTBX_CONTROLS,
SfxShellFeature::FormTBControls);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
RID_SVXTBX_MORECONTROLS,
SfxShellFeature::FormTBMoreControls);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
RID_SVXTBX_FORMDESIGN,
SfxShellFeature::FormTBDesign);
}
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 4f25576861c4..2d41d8f03570 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -58,7 +58,7 @@ SFX_IMPL_INTERFACE(ExtrusionBar, SfxShell)
void ExtrusionBar::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_SVX_EXTRUSION_BAR);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_SVX_EXTRUSION_BAR);
}
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index a148de31cf13..f8632057d4a5 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -179,7 +179,7 @@ SFX_IMPL_INTERFACE(FontworkBar, SfxShell)
void FontworkBar::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_SVX_FONTWORK_BAR);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_SVX_FONTWORK_BAR);
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 270711fac3d4..9de333208729 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -138,7 +138,8 @@ void SwModule::InitInterface_Impl()
{
GetStaticInterface()->RegisterStatusBar(CFG_STATUSBAR);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION,
+ SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer,
RID_MODULE_TOOLBOX);
}
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index c5f01de15e7d..dde917cf0c45 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -140,7 +140,7 @@ SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell)
void SwAnnotationShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
GetStaticInterface()->RegisterPopupMenu("annotation");
}
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index b05c39313cc3..088197253f0b 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -49,7 +49,7 @@ void SwBezierShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("draw");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_BEZIER_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_BEZIER_TOOLBOX);
}
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index d9aad7fb1c7a..fc424d73bbbc 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -75,7 +75,7 @@ void SwDrawShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("draw");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_DRAW_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_DRAW_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
}
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index 634f37a7aef1..8d4c678ca8c3 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -63,7 +63,7 @@ void SwDrawFormShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("form");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
}
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 2dde2604376f..b2520f5980f1 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -88,7 +88,7 @@ void SwDrawTextShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("drawtext");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_DRAW_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_DRAW_TEXT_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
}
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 2a6ad96916c8..1fe81f86709a 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -112,7 +112,7 @@ void SwFrameShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("frame");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_FRAME_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_FRAME_TOOLBOX);
}
void SwFrameShell::Execute(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 8553c3ed8f38..6d9b706ad0b3 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -114,7 +114,7 @@ void SwGrfShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("graphic");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_GRAFIK_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_GRAFIK_TOOLBOX);
}
void SwGrfShell::Execute(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx
index 38d26fb7f9bd..995dac23a58f 100644
--- a/sw/source/uibase/shells/listsh.cxx
+++ b/sw/source/uibase/shells/listsh.cxx
@@ -55,7 +55,7 @@ SFX_IMPL_INTERFACE(SwListShell, SwBaseShell)
void SwListShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_NUM_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_NUM_TOOLBOX);
}
diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx
index ccf4e5aef73d..51f18658990e 100644
--- a/sw/source/uibase/shells/mediash.cxx
+++ b/sw/source/uibase/shells/mediash.cxx
@@ -75,7 +75,7 @@ void SwMediaShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("media");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_MEDIA_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_MEDIA_TOOLBOX);
}
void SwMediaShell::ExecMedia(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/olesh.cxx b/sw/source/uibase/shells/olesh.cxx
index 160c34af04ba..ae67572a2775 100644
--- a/sw/source/uibase/shells/olesh.cxx
+++ b/sw/source/uibase/shells/olesh.cxx
@@ -43,7 +43,7 @@ void SwOleShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("oleobject");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_OLE_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_OLE_TOOLBOX);
}
SwOleShell::SwOleShell(SwView &_rView) :
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 3a43c67efbde..b2286fa09538 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -97,7 +97,7 @@ SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell)
void SwTableShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("table");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TABLE_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TABLE_TOOLBOX);
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index e8c51072e43f..ca6dc13eaf39 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -121,7 +121,7 @@ void SwTextShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("text");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(FN_EDIT_FORMULA);
GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD);
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 9b89c3965000..72dc3936ad2e 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -94,7 +94,8 @@ SFX_IMPL_INTERFACE(SwPagePreview, SfxViewShell)
void SwPagePreview::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("preview");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_CLIENT|SFX_VISIBILITY_FULLSCREEN|SFX_VISIBILITY_READONLYDOC,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
+ SfxVisibilityFlags::Standard|SfxVisibilityFlags::Client|SfxVisibilityFlags::FullScreen|SfxVisibilityFlags::ReadonlyDoc,
RID_PVIEW_TOOLBOX);
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 44ef7fb1ac81..4903d09d0446 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -118,7 +118,8 @@ void SwSrcView::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("source");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
+ SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
RID_WEBTOOLS_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 419fbea415f0..a61baec60ac3 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -112,7 +112,7 @@ void SwView::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, SfxShellFeature::SwChildWindowLabel);
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
RID_TOOLS_TOOLBOX);
#endif
}
diff --git a/sw/source/uibase/web/wformsh.cxx b/sw/source/uibase/web/wformsh.cxx
index 225c033788e8..7b11b3afe027 100644
--- a/sw/source/uibase/web/wformsh.cxx
+++ b/sw/source/uibase/web/wformsh.cxx
@@ -45,7 +45,7 @@ void SwWebDrawFormShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("form");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
}
diff --git a/sw/source/uibase/web/wfrmsh.cxx b/sw/source/uibase/web/wfrmsh.cxx
index befc4f60aca0..cfb71bdde0e5 100644
--- a/sw/source/uibase/web/wfrmsh.cxx
+++ b/sw/source/uibase/web/wfrmsh.cxx
@@ -43,7 +43,7 @@ void SwWebFrameShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("frame");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_WEBFRAME_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBFRAME_TOOLBOX);
}
diff --git a/sw/source/uibase/web/wgrfsh.cxx b/sw/source/uibase/web/wgrfsh.cxx
index 717a3d6e0f1c..527e443b202e 100644
--- a/sw/source/uibase/web/wgrfsh.cxx
+++ b/sw/source/uibase/web/wgrfsh.cxx
@@ -47,7 +47,7 @@ void SwWebGrfShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("graphic");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_WEBGRAPHIC_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBGRAPHIC_TOOLBOX);
}
diff --git a/sw/source/uibase/web/wlistsh.cxx b/sw/source/uibase/web/wlistsh.cxx
index b58861a844aa..088e25f97e8e 100644
--- a/sw/source/uibase/web/wlistsh.cxx
+++ b/sw/source/uibase/web/wlistsh.cxx
@@ -41,7 +41,7 @@ SFX_IMPL_INTERFACE(SwWebListShell, SwListShell)
void SwWebListShell::InitInterface_Impl()
{
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_NUM_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_NUM_TOOLBOX);
}
diff --git a/sw/source/uibase/web/wolesh.cxx b/sw/source/uibase/web/wolesh.cxx
index 5c384af02ec6..37c8bd2abeef 100644
--- a/sw/source/uibase/web/wolesh.cxx
+++ b/sw/source/uibase/web/wolesh.cxx
@@ -41,7 +41,7 @@ void SwWebOleShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("oleobject");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_WEBOLE_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBOLE_TOOLBOX);
}
SwWebOleShell::SwWebOleShell(SwView &_rView) :
diff --git a/sw/source/uibase/web/wtabsh.cxx b/sw/source/uibase/web/wtabsh.cxx
index ef0b704b06a1..eedc6c390492 100644
--- a/sw/source/uibase/web/wtabsh.cxx
+++ b/sw/source/uibase/web/wtabsh.cxx
@@ -46,7 +46,7 @@ SFX_IMPL_INTERFACE(SwWebTableShell, SwTableShell)
void SwWebTableShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("table");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TABLE_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TABLE_TOOLBOX);
}
diff --git a/sw/source/uibase/web/wtextsh.cxx b/sw/source/uibase/web/wtextsh.cxx
index 319b9e8f9c4a..dc2131b1a38a 100644
--- a/sw/source/uibase/web/wtextsh.cxx
+++ b/sw/source/uibase/web/wtextsh.cxx
@@ -49,7 +49,7 @@ void SwWebTextShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu("text");
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, RID_TEXT_TOOLBOX);
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
GetStaticInterface()->RegisterChildWindow(FN_EDIT_FORMULA);
GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD);
diff --git a/sw/source/uibase/web/wview.cxx b/sw/source/uibase/web/wview.cxx
index 8d298b7cf03d..9b0cb5c073be 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -82,7 +82,7 @@ void SwWebView::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
RID_WEBTOOLS_TOOLBOX);
}