[Libreoffice-commits] core.git: basctl/inc basctl/source include/sfx2 include/svx sc/inc sc/source sd/inc sd/source sfx2/inc sfx2/source starmath/inc starmath/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Wed May 31 13:07:50 UTC 2017


 basctl/inc/basidesh.hrc                |    2 
 basctl/source/basicide/basidesh.src    |    4 
 include/sfx2/dispatch.hxx              |    3 
 include/sfx2/objface.hxx               |    7 -
 include/sfx2/toolbarids.hxx            |   76 ++++++++++++++
 include/svx/fmresids.hrc               |    8 -
 sc/inc/sc.hrc                          |    8 -
 sc/source/ui/app/scmod.cxx             |    2 
 sc/source/ui/drawfunc/chartsh.cxx      |    2 
 sc/source/ui/drawfunc/drawsh.cxx       |    2 
 sc/source/ui/drawfunc/drformsh.cxx     |    2 
 sc/source/ui/drawfunc/drtxtob.cxx      |    2 
 sc/source/ui/drawfunc/graphsh.cxx      |    2 
 sc/source/ui/drawfunc/mediash.cxx      |    2 
 sc/source/ui/drawfunc/oleobjsh.cxx     |    2 
 sc/source/ui/view/cellsh.cxx           |    2 
 sc/source/ui/view/formatsh.cxx         |    2 
 sc/source/ui/view/prevwsh.cxx          |    2 
 sc/source/ui/view/tabvwsh.cxx          |    2 
 sd/inc/helpids.h                       |    6 -
 sd/source/ui/app/strings.src           |   45 --------
 sd/source/ui/app/toolbox.src           |    5 
 sd/source/ui/func/futext.cxx           |    4 
 sd/source/ui/inc/ShellFactory.hxx      |    5 
 sd/source/ui/inc/ToolBarManager.hxx    |   28 ++---
 sd/source/ui/inc/cfgids.hxx            |   14 --
 sd/source/ui/inc/strings.hrc           |   20 ---
 sd/source/ui/view/FormShellManager.cxx |    6 -
 sd/source/ui/view/ToolBarManager.cxx   |   47 +++++----
 sd/source/ui/view/ViewShellManager.cxx |    2 
 sd/source/ui/view/drviews7.cxx         |    2 
 sd/source/ui/view/outlnvsh.cxx         |    4 
 sd/source/ui/view/presvish.cxx         |    8 -
 sd/source/ui/view/viewshel.cxx         |   14 +-
 sfx2/inc/app.hrc                       |    3 
 sfx2/source/appl/workwin.cxx           |  170 ++++++++++++++++-----------------
 sfx2/source/appl/workwin.hrc           |   91 -----------------
 sfx2/source/control/dispatch.cxx       |   24 ++--
 sfx2/source/control/objface.cxx        |   24 ++--
 sfx2/source/inc/workwin.hxx            |    7 -
 sfx2/source/view/viewfrm.cxx           |    4 
 starmath/inc/starmath.hrc              |    2 
 starmath/source/view.cxx               |    2 
 svx/source/form/fmshell.cxx            |   12 +-
 svx/source/toolbars/extrusionbar.cxx   |    2 
 svx/source/toolbars/fontworkbar.cxx    |    2 
 sw/source/ui/web/web.src               |   11 --
 sw/source/uibase/app/apphdl.cxx        |    2 
 sw/source/uibase/config/barcfg.cxx     |    4 
 sw/source/uibase/inc/barcfg.hxx        |    3 
 sw/source/uibase/inc/shells.hrc        |   18 ---
 sw/source/uibase/inc/web.hrc           |    5 
 sw/source/uibase/shells/annotsh.cxx    |    2 
 sw/source/uibase/shells/beziersh.cxx   |    2 
 sw/source/uibase/shells/drawsh.cxx     |    2 
 sw/source/uibase/shells/drformsh.cxx   |    2 
 sw/source/uibase/shells/drwtxtsh.cxx   |    2 
 sw/source/uibase/shells/frmsh.cxx      |    2 
 sw/source/uibase/shells/grfsh.cxx      |    2 
 sw/source/uibase/shells/listsh.cxx     |    2 
 sw/source/uibase/shells/mediash.cxx    |    2 
 sw/source/uibase/shells/olesh.cxx      |    2 
 sw/source/uibase/shells/tabsh.cxx      |    2 
 sw/source/uibase/shells/textsh.cxx     |    2 
 sw/source/uibase/uiview/pview.cxx      |    2 
 sw/source/uibase/uiview/srcview.cxx    |    2 
 sw/source/uibase/uiview/view.cxx       |    6 -
 sw/source/uibase/uiview/view.hrc       |    1 
 sw/source/uibase/uiview/view.src       |    8 -
 sw/source/uibase/uiview/view0.cxx      |    2 
 sw/source/uibase/web/wformsh.cxx       |    2 
 sw/source/uibase/web/wfrmsh.cxx        |    2 
 sw/source/uibase/web/wgrfsh.cxx        |    2 
 sw/source/uibase/web/wlistsh.cxx       |    2 
 sw/source/uibase/web/wolesh.cxx        |    2 
 sw/source/uibase/web/wtabsh.cxx        |    2 
 sw/source/uibase/web/wtextsh.cxx       |    2 
 sw/source/uibase/web/wview.cxx         |    8 -
 78 files changed, 317 insertions(+), 478 deletions(-)

New commits:
commit 490e9dbade4f9d69cab4b1ec435944c9b4d2f6c2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 30 16:50:18 2017 +0100

    disambiguate dual use of toolbar ids
    
    for toolbar title string resource and identifier (for config)
    
    Change-Id: I2657c3cbb586a62d8075db7cb43cc064b2030f28
    Reviewed-on: https://gerrit.libreoffice.org/38274
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 60a2f0fa903e..1c58557dddcc 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -22,8 +22,6 @@
 
 #include <svx/svxids.hrc>
 
-#define RID_BASICIDE_OBJECTBAR          ( RID_BASICIDE_START +  0 )
-
 #define RID_STR_SEARCHALLMODULES        ( RID_BASICIDE_START +  1 )
 #define RID_STR_SEARCHFROMSTART         ( RID_BASICIDE_START +  2 )
 #define RID_STR_NOMODULE                ( RID_BASICIDE_START +  3 )
diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src
index 1aa3f828e3b4..3986ae749737 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src
@@ -155,10 +155,6 @@ String RID_STR_COLUMN
      // Abbreviation for 'column'
     Text [ en-US ] = "Col" ;
 };
-String RID_BASICIDE_OBJECTBAR
-{
-    Text [ en-US ] = "Macro Bar" ;
-};
 String RID_STR_CANNOTCLOSE
 {
     Text [ en-US ] = "The window cannot be closed while BASIC is running." ;
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index cde10c2929fb..b089764713e9 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -22,6 +22,7 @@
 #include <memory>
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
+#include <sfx2/toolbarids.hxx>
 #include <sal/types.h>
 
 #include <sfx2/bindings.hxx>
@@ -161,7 +162,7 @@ public:
                                        sal_uInt16 nCount = 0, const sal_uInt16 *pSIDs = nullptr );
 
     void                HideUI( bool bHide = true );
-    sal_uInt32          GetObjectBarId( sal_uInt16 nPos ) const;
+    ToolbarId           GetObjectBarId( sal_uInt16 nPos ) const;
 
     SfxItemState        QueryState( sal_uInt16 nSID, const SfxPoolItem* &rpState );
     SfxItemState        QueryState( sal_uInt16 nSID, css::uno::Any& rAny );
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index aa0056332916..e8b12ec54cec 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -25,6 +25,7 @@
 #include <sal/types.h>
 #include <sfx2/dllapi.h>
 #include <sfx2/msg.hxx>
+#include <sfx2/toolbarids.hxx>
 #include <tools/resid.hxx>
 
 struct SfxInterface_Impl;
@@ -65,12 +66,12 @@ public:
 
     const SfxInterface*     GetGenoType() const { return pGenoType; }
 
-    void                    RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId);
-    void                    RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature);
+    void                    RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, ToolbarId eId);
+    void                    RegisterObjectBar(sal_uInt16, SfxVisibilityFlags nFlags, ToolbarId eId, 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;
+    ToolbarId               GetObjectBarId(sal_uInt16 nNo) const;
     sal_uInt16              GetObjectBarPos( sal_uInt16 nNo ) const;
     SfxVisibilityFlags      GetObjectBarFlags( sal_uInt16 nNo ) const;
     SfxShellFeature         GetObjectBarFeature(sal_uInt16 nNo) const;
diff --git a/include/sfx2/toolbarids.hxx b/include/sfx2/toolbarids.hxx
new file mode 100644
index 000000000000..ae112c0ce493
--- /dev/null
+++ b/include/sfx2/toolbarids.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SFX2_TOOLBARIDS_HXX
+#define INCLUDED_SFX2_TOOLBARIDS_HXX
+
+//these numbers end up in the configuration to identify toolbars
+//so don't blindly change their numbers
+enum class ToolbarId : sal_uInt32
+{
+    None = 0,
+    FullScreenToolbox = 558,
+    EnvToolbox = 560,
+    Svx_Extrusion_Bar = 10986,
+    Svx_Fontwork_Bar = 10987,
+    Basicide_Objectbar = 14850,
+    SvxTbx_Form_Navigation = 18001,
+    SvxTbx_Form_Filter = 18002,
+    SvxTbx_Text_Control_Attributes = 18003,
+    SvxTbx_Controls = 18004,
+    SvxTbx_MoreControls = 18005,
+    SvxTbx_FormDesign = 18006,
+    Math_Toolbox = 20050,
+    Webtools_Toolbox = 20402,
+    Webtext_Toolbox = 20403,
+    Webframe_Toolbox = 20408,
+    Webgraphic_Toolbox = 20410,
+    Webole_Toolbox = 20411,
+    Draw_Toolbox_Sd = 23011,
+    Slide_Toolbox = 23012,
+    Draw_Obj_Toolbox = 23013,
+    Slide_Obj_Toolbox = 23014,
+    Bezier_Toolbox_Sd = 23015,
+    Draw_Text_Toolbox_Sd = 23016,
+    Outline_Toolbox = 23017,
+    Draw_Table_Toolbox = 23018,
+    Gluepoints_Toolbox = 23019,
+    Draw_Options_Toolbox = 23020,
+    Draw_CommonTask_Toolbox = 23021,
+    FormLayer_Toolbox = 23022,
+    Draw_Viewer_Toolbox = 23023,
+    Graphic_Obj_Toolbox = 23027,
+    Draw_Graf_Toolbox = 23030,
+    Draw_Media_Toolbox = 23031,
+    Text_Toolbox_Sw = 23265,
+    Table_Toolbox = 23266,
+    Frame_Toolbox = 23267,
+    Grafik_Toolbox = 23268,
+    Draw_Toolbox_Sw = 23269,
+    Draw_Text_Toolbox_Sw = 23270,
+    Num_Toolbox = 23271,
+    Ole_Toolbox = 23272,
+    Tools_Toolbox = 23273,
+    PView_Toolbox = 23281,
+    Bezier_Toolbox_Sw = 23283,
+    Module_Toolbox = 23310,
+    Media_Toolbox = 23311,
+    Objectbar_App = 25000,
+    Objectbar_Format = 25001,
+    Text_Toolbox_Sc = 25005,
+    Objectbar_Preview = 25006,
+    Objectbar_Tools = 25035,
+    Draw_Objectbar = 25053,
+    Graphic_Objectbar = 25054,
+    Media_Objectbar = 25060
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index 499d2913de5b..ab86f858a531 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -21,14 +21,6 @@
 
 #include <svl/solar.hrc>
 
-// Toolbars ------------------------------------------------------------
-#define RID_SVXTBX_FORM_NAVIGATION                  (RID_FORMS_START +  1)
-#define RID_SVXTBX_FORM_FILTER                      (RID_FORMS_START +  2)
-#define RID_SVXTBX_TEXT_CONTROL_ATTRIBUTES          (RID_FORMS_START +  3)
-#define RID_SVXTBX_CONTROLS                         (RID_FORMS_START +  4)
-#define RID_SVXTBX_MORECONTROLS                     (RID_FORMS_START +  5)
-#define RID_SVXTBX_FORMDESIGN                       (RID_FORMS_START +  6)
-
 // String-Id's -----------------------------------------------------------
 #define RID_STR_INVALID_XMLNAME                     (RID_FORMS_START + 1)
 #define RID_STR_INVALID_XMLPREFIX                   (RID_FORMS_START + 2)
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 9af51c9f6f29..2d72a4a09a76 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -647,20 +647,12 @@
 
 // resources
 
-#define RID_OBJECTBAR_APP       (SC_RESOURCE_START)
-#define RID_OBJECTBAR_FORMAT    (SC_RESOURCE_START+1)
-#define RID_TEXT_TOOLBOX        (SC_RESOURCE_START+5)
-#define RID_OBJECTBAR_PREVIEW   (SC_RESOURCE_START+6)
 #define SID_DATA_FORM           (SC_RESOURCE_START+15) // menu (in Data menu)
 #define SID_INSERT_CURRENT_DATE (SC_RESOURCE_START+16)
 #define SID_INSERT_CURRENT_TIME (SC_RESOURCE_START+17)
 #define FID_TAB_TOGGLE_GRID     (SC_RESOURCE_START+18) // toggle sheet grid
 #define WID_SIMPLE_REF          (SC_RESOURCE_START+20)
 #define RID_ERRHDLSC            (SC_RESOURCE_START+23)
-#define RID_OBJECTBAR_TOOLS     (SC_RESOURCE_START+35)
-#define RID_DRAW_OBJECTBAR      (SC_RESOURCE_START+53)
-#define RID_GRAPHIC_OBJECTBAR   (SC_RESOURCE_START+54)
-#define RID_MEDIA_OBJECTBAR     (SC_RESOURCE_START+60)
 #define RID_FUNCTION_CATEGORIES (SC_RESOURCE_START+62)
 
 #endif
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 584b073d8bb1..eedfdb4c08a4 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -128,7 +128,7 @@ void ScModule::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer,
-                                            RID_OBJECTBAR_APP);
+                                            ToolbarId::Objectbar_App);
 
     GetStaticInterface()->RegisterStatusBar(SCCFG_STATUSBAR);
 }
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 089793769315..e82cbfe4fa6e 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -51,7 +51,7 @@ void ScChartShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_DRAW_OBJECTBAR);
+                                            ToolbarId::Draw_Objectbar);
 
     GetStaticInterface()->RegisterPopupMenu("chart");
 }
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 1befc0f56d29..7d28bfe733f4 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -67,7 +67,7 @@ void ScDrawShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_DRAW_OBJECTBAR);
+                                            ToolbarId::Draw_Objectbar);
 
     GetStaticInterface()->RegisterPopupMenu("draw");
 
diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx
index 938eb992c14c..4ac230a36941 100644
--- a/sc/source/ui/drawfunc/drformsh.cxx
+++ b/sc/source/ui/drawfunc/drformsh.cxx
@@ -46,7 +46,7 @@ void ScDrawFormShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_OBJECTBAR_FORMAT);
+                                            ToolbarId::Objectbar_Format);
 
     GetStaticInterface()->RegisterPopupMenu("form");
 }
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 06d8db9c3796..8dcf933461f6 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -88,7 +88,7 @@ void ScDrawTextObjectBar::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_TEXT_TOOLBOX);
+                                            ToolbarId::Text_Toolbox_Sc);
 
     GetStaticInterface()->RegisterPopupMenu("drawtext");
 
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 9c1dfe325e49..418347d190fd 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -48,7 +48,7 @@ void ScGraphicShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_GRAPHIC_OBJECTBAR);
+                                            ToolbarId::Graphic_Objectbar);
 
     GetStaticInterface()->RegisterPopupMenu("graphic");
 }
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 80544989e8a2..1d15b8cb720f 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -40,7 +40,7 @@ SFX_IMPL_INTERFACE(ScMediaShell, ScDrawShell)
 
 void ScMediaShell::InitInterface_Impl()
 {
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_MEDIA_OBJECTBAR);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Media_Objectbar);
 
     GetStaticInterface()->RegisterPopupMenu("media");
 }
diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx
index cd0c83e53e63..4f200a47a1d8 100644
--- a/sc/source/ui/drawfunc/oleobjsh.cxx
+++ b/sc/source/ui/drawfunc/oleobjsh.cxx
@@ -46,7 +46,7 @@ void ScOleObjectShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_DRAW_OBJECTBAR);
+                                            ToolbarId::Draw_Objectbar);
 
     GetStaticInterface()->RegisterPopupMenu("oleobject");
 }
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 52785f4fc883..3a6a46e03e0b 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -70,7 +70,7 @@ void ScCellShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_OBJECTBAR_FORMAT);
+                                            ToolbarId::Objectbar_Format);
 
     GetStaticInterface()->RegisterPopupMenu("cell");
 }
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index cef3eab48bc3..14e6405d9ecf 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -128,7 +128,7 @@ void ScFormatShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_OBJECTBAR_FORMAT);
+                                            ToolbarId::Objectbar_Format);
 }
 
 ScFormatShell::ScFormatShell(ScViewData* pData) :
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 37097ed5474e..3bd8aed1684f 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -90,7 +90,7 @@ void ScPreviewShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server|SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_OBJECTBAR_PREVIEW);
+                                            ToolbarId::Objectbar_Preview);
 
     GetStaticInterface()->RegisterPopupMenu("preview");
 }
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index bb18b4beffab..1c934ffa14dc 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -55,7 +55,7 @@ void ScTabViewShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
-                                            RID_OBJECTBAR_TOOLS);
+                                            ToolbarId::Objectbar_Tools);
 
     GetStaticInterface()->RegisterChildWindow(FID_INPUTLINE_STATUS);
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index 75adfa211381..daedcf1634db 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -23,12 +23,6 @@
 #define HID_SDGRAPHICVIEWSHELL                                  "SD_HID_SDGRAPHICVIEWSHELL"
 #define HID_SDOUTLINEVIEWSHELL                                  "SD_HID_SDOUTLINEVIEWSHELL"
 
-// tool boxes
-#define HID_SD_DRAW_TOOLBOX                                     "SD_HID_SD_DRAW_TOOLBOX"
-#define HID_SD_DRAW_OBJ_TOOLBOX                                 "SD_HID_SD_DRAW_OBJ_TOOLBOX"
-#define HID_SD_DRAW_OPTIONS_TOOLBOX                             "SD_HID_SD_DRAW_OPTIONS_TOOLBOX"
-#define HID_SD_TEXT_TOOLBOX                                     "SD_HID_SD_TEXT_TOOLBOX"
-
 #define HID_SD_NAVIGATOR_MENU1                                  "SD_HID_SD_NAVIGATOR_MENU1"
 #define HID_SD_NAVIGATOR_MENU2                                  "SD_HID_SD_NAVIGATOR_MENU2"
 #define HID_SD_NAVIGATOR_MENU3                                  "SD_HID_SD_NAVIGATOR_MENU3"
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 89b9b00dd9bb..d1d9566cdf9f 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -20,46 +20,6 @@
 #include "glob.hrc"
 #include "helpids.h"
 
-String STR_DRAW_TOOLBOX
-{
-    Text [ en-US ] = "Drawings Toolbar" ;
-};
-String STR_SLIDE_TOOLBOX
-{
-    Text [ en-US ] = "Slide Bar" ;
-};
-String STR_OUTLINE_TOOLBOX
-{
-    Text [ en-US ] = "Outline Bar" ;
-};
-String STR_DRAW_OBJ_TOOLBOX
-{
-    Text [ en-US ] = "Draw Object Bar" ;
-};
-String STR_GRAPHIC_OBJ_TOOLBOX
-{
-    Text [ en-US ] = "Draw Object Bar/Image" ;
-};
-String STR_DRAW_OPTIONS_TOOLBOX
-{
-    Text [ en-US ] = "Options Bar" ;
-};
-String STR_DRAW_COMMONTASK_TOOLBOX
-{
-    Text [ en-US ] = "Presentation" ;
-};
-String STR_SLIDE_OBJ_TOOLBOX
-{
-    Text [ en-US ] = "Slide Object Bar" ;
-};
-String STR_GLUEPOINTS_TOOLBOX
-{
-    Text [ en-US ] = "Glue Point Object Bar" ;
-};
-String STR_DRAW_TEXT_TOOLBOX
-{
-    Text [ en-US ] = "Text Object Bar" ;
-};
 String STR_NULL
 {
     Text [ en-US ] = "None" ;
@@ -871,11 +831,6 @@ String STR_PRES_PAUSE
     Text [ en-US ] = "Pause..." ;
 };
 
-String STR_DRAW_GRAF_TOOLBOX
-{
-    Text [ en-US ] = "Image Object Bar" ;
-};
-
 String STR_UNDO_APPLY_3D_FAVOURITE
 {
     Text [ en-US ] = "Apply 3D favorite";
diff --git a/sd/source/ui/app/toolbox.src b/sd/source/ui/app/toolbox.src
index f0f7c6a479ad..30158180382c 100644
--- a/sd/source/ui/app/toolbox.src
+++ b/sd/source/ui/app/toolbox.src
@@ -21,11 +21,6 @@
 #include "cfgids.hxx"
 #include <svx/svxids.hrc>
 
-String RID_DRAW_VIEWER_TOOLBOX
-{
-    Text [ en-US ] = "Function Bar (viewing mode)" ;
-};
-
 String RID_DRAW_MEDIA_TOOLBOX
 {
     Text [ en-US ] = "Media Playback" ;
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 6d8549de5d79..647a67db86aa 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -186,7 +186,7 @@ void FuText::DoExecute( SfxRequest& )
 {
     mpViewShell->GetViewShellBase().GetToolBarManager()->SetToolBarShell(
         ToolBarManager::ToolBarGroup::Function,
-        RID_DRAW_TEXT_TOOLBOX);
+        ToolbarId::Draw_Text_Toolbox_Sd);
 
     mpView->SetCurrentObj(OBJ_TEXT);
     mpView->SetEditMode(SdrViewEditMode::Edit);
@@ -224,7 +224,7 @@ void FuText::DoExecute( SfxRequest& )
             SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
             if( pObj && (pObj->GetObjInventor() == SdrInventor::Default ) && (pObj->GetObjIdentifier() == OBJ_TABLE) )
             {
-                mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBarShell( ToolBarManager::ToolBarGroup::Function, RID_DRAW_TABLE_TOOLBOX );
+                mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Draw_Table_Toolbox);
             }
         }
     }
diff --git a/sd/source/ui/inc/ShellFactory.hxx b/sd/source/ui/inc/ShellFactory.hxx
index 9b8d5f8258ac..4681df0e6b23 100644
--- a/sd/source/ui/inc/ShellFactory.hxx
+++ b/sd/source/ui/inc/ShellFactory.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SD_SOURCE_UI_INC_SHELLFACTORY_HXX
 
 #include <sal/types.h>
+#include <sfx2/toolbarids.hxx>
 
 namespace vcl { class Window; }
 
@@ -28,9 +29,7 @@ namespace sd {
 
 class FrameView;
 
-typedef sal_Int32 ShellId;
-// This shell id is a reserved value and does not specify any valid shell.
-static const sal_Int32 snInvalidShellId = -1;
+typedef ToolbarId ShellId;
 
 template<class ShellType>
 class ShellFactory
diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx
index 4ec1928d4935..1fb29620d4ac 100644
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -101,21 +101,21 @@ public:
 
     /** The set of tool bars that are handled by this manager class.
     */
-    const static OUString msToolBar;                  // RID_DRAW_TOOLBOX, 23011
-    const static OUString msOptionsToolBar;           // RID_DRAW_OPTIONS_TOOLBOX, 23020
-    const static OUString msCommonTaskToolBar;        // RID_DRAW_COMMONTASK_TOOLBOX, 23021
-    const static OUString msViewerToolBar;            // RID_DRAW_VIEWER_TOOLBOX, 23023
-    const static OUString msSlideSorterToolBar;       // RID_SLIDE_TOOLBOX, 23012
-    const static OUString msSlideSorterObjectBar;     // RID_SLIDE_OBJ_TOOLBOX, 23014
-    const static OUString msOutlineToolBar;           // RID_OUTLINE_TOOLBOX, 23017
+    const static OUString msToolBar;                  // Draw_Toolbox_Sd, 23011
+    const static OUString msOptionsToolBar;           // Draw_Options_Toolbox, 23020
+    const static OUString msCommonTaskToolBar;        // Draw_CommonTask_Toolbox, 23021
+    const static OUString msViewerToolBar;            // Draw_Viewer_Toolbox, 23023
+    const static OUString msSlideSorterToolBar;       // Slide_Toolbox, 23012
+    const static OUString msSlideSorterObjectBar;     // Slide_Obj_Toolbox, 23014
+    const static OUString msOutlineToolBar;           // Outline_Toolbox, 23017
     const static OUString msMasterViewToolBar;        // SID_MASTERPAGE, 27053
-    const static OUString msDrawingObjectToolBar;     // RID_DRAW_OBJ_TOOLBOX, 23013
-    const static OUString msGluePointsToolBar;        // RID_GLUEPOINTS_TOOLBOX, 23019
-    const static OUString msTextObjectBar;            // RID_DRAW_TEXT_TOOLBOX, 23016
-    const static OUString msBezierObjectBar;          // RID_BEZIER_TOOLBOX, 23015
-    const static OUString msGraphicObjectBar;         // RID_DRAW_GRAF_TOOLBOX, 23030
-    const static OUString msMediaObjectBar;           // RID_DRAW_MEDIA_TOOLBOX, 23031
-    const static OUString msTableObjectBar;           // RID_DRAW_TABLE_TOOLBOX
+    const static OUString msDrawingObjectToolBar;     // Draw_Obj_Toolbox, 23013
+    const static OUString msGluePointsToolBar;        // Gluepoints_Toolbox, 23019
+    const static OUString msTextObjectBar;            // Draw_Text_Toolbox_Sd, 23016
+    const static OUString msBezierObjectBar;          // Bezier_Toolbox_Sd, 23015
+    const static OUString msGraphicObjectBar;         // Draw_Graf_Toolbox, 23030
+    const static OUString msMediaObjectBar;           // Draw_Media_Toolbox, 23031
+    const static OUString msTableObjectBar;           // Draw_Table_Toolbox, 23018
 
     /** The set of tool bar groups.
     */
diff --git a/sd/source/ui/inc/cfgids.hxx b/sd/source/ui/inc/cfgids.hxx
index c53771d06bb6..5b86cad4d6c8 100644
--- a/sd/source/ui/inc/cfgids.hxx
+++ b/sd/source/ui/inc/cfgids.hxx
@@ -30,21 +30,7 @@
 #define RID_DRAW_STATUSBAR          (SFX_ITEMTYPE_SD_BEGIN + 7)
 
 // Toolbars
-#define RID_DRAW_TOOLBOX            (SFX_ITEMTYPE_SD_BEGIN + 11)
-#define RID_SLIDE_TOOLBOX           (SFX_ITEMTYPE_SD_BEGIN + 12)
-#define RID_DRAW_OBJ_TOOLBOX        (SFX_ITEMTYPE_SD_BEGIN + 13)
-#define RID_SLIDE_OBJ_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 14)
-#define RID_BEZIER_TOOLBOX          (SFX_ITEMTYPE_SD_BEGIN + 15)
-#define RID_DRAW_TEXT_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 16)
-#define RID_OUTLINE_TOOLBOX         (SFX_ITEMTYPE_SD_BEGIN + 17)
 #define RID_DRAW_TABLE_TOOLBOX      (SFX_ITEMTYPE_SD_BEGIN + 18)
-#define RID_GLUEPOINTS_TOOLBOX      (SFX_ITEMTYPE_SD_BEGIN + 19)
-#define RID_DRAW_OPTIONS_TOOLBOX    (SFX_ITEMTYPE_SD_BEGIN + 20)
-#define RID_DRAW_COMMONTASK_TOOLBOX (SFX_ITEMTYPE_SD_BEGIN + 21)
-#define RID_FORMLAYER_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 22)
-#define RID_DRAW_VIEWER_TOOLBOX     (SFX_ITEMTYPE_SD_BEGIN + 23)
-#define RID_GRAPHIC_OBJ_TOOLBOX     (SFX_ITEMTYPE_SD_BEGIN + 27)
-#define RID_DRAW_GRAF_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 30)
 #define RID_DRAW_MEDIA_TOOLBOX      (SFX_ITEMTYPE_SD_BEGIN + 31)
 
 #endif
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 500ad5012010..fccad3a6c8a9 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -99,26 +99,6 @@
 
 #define STR_IMPRESS_DOCUMENT_FULLTYPE_60  (RID_APP_START+170)
 
-/*
- *  Do not change ResourceID's for toolboxes, without assigning strings in
- *  strings.hrc to the same  ID (a toolbox and its
- *  configurations string should have identical ResourceID's!).
- */
-
-#define STR_DRAW_TOOLBOX            RID_DRAW_TOOLBOX
-#define STR_SLIDE_TOOLBOX           RID_SLIDE_TOOLBOX
-#define STR_DRAW_OBJ_TOOLBOX        RID_DRAW_OBJ_TOOLBOX
-#define STR_SLIDE_OBJ_TOOLBOX       RID_SLIDE_OBJ_TOOLBOX
-#define STR_DRAW_TEXT_TOOLBOX       RID_DRAW_TEXT_TOOLBOX
-#define STR_OUTLINE_TOOLBOX         RID_OUTLINE_TOOLBOX
-#define STR_GLUEPOINTS_TOOLBOX      RID_GLUEPOINTS_TOOLBOX
-#define STR_DRAW_OPTIONS_TOOLBOX    RID_DRAW_OPTIONS_TOOLBOX
-#define STR_DRAW_COMMONTASK_TOOLBOX RID_DRAW_COMMONTASK_TOOLBOX
-
-#define STR_GRAPHIC_OBJ_TOOLBOX     RID_GRAPHIC_OBJ_TOOLBOX
-
-#define STR_DRAW_GRAF_TOOLBOX       RID_DRAW_GRAF_TOOLBOX
-
 // IDs for presentation slides
 #define STR_AUTOLAYOUT_NONE                     (RID_APP_START+210)
 #define STR_AUTOLAYOUT_ONLY_TITLE               (RID_APP_START+211)
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index c5b324aede8b..23136ba66b2b 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -149,7 +149,7 @@ void FormShellManager::RegisterAtCenterPane()
     OSL_ASSERT(mpSubShellFactory.get()==nullptr);
     mpSubShellFactory.reset(new FormShellManagerFactory(*pShell, *this));
     mrBase.GetViewShellManager()->AddSubShellFactory(pShell,mpSubShellFactory);
-    mrBase.GetViewShellManager()->ActivateSubShell(*pShell, RID_FORMLAYER_TOOLBOX);
+    mrBase.GetViewShellManager()->ActivateSubShell(*pShell, ToolbarId::FormLayer_Toolbox);
 }
 
 void FormShellManager::UnregisterAtCenterPane()
@@ -172,7 +172,7 @@ void FormShellManager::UnregisterAtCenterPane()
     ViewShell* pShell = mrBase.GetMainViewShell().get();
     if (pShell != nullptr)
     {
-        mrBase.GetViewShellManager()->DeactivateSubShell(*pShell,  RID_FORMLAYER_TOOLBOX);
+        mrBase.GetViewShellManager()->DeactivateSubShell(*pShell,  ToolbarId::FormLayer_Toolbox);
         mrBase.GetViewShellManager()->RemoveSubShellFactory(pShell, mpSubShellFactory);
     }
 
@@ -293,7 +293,7 @@ FmFormShell* FormShellManagerFactory::CreateShell( ::sd::ShellId nId )
     FmFormShell* pShell = nullptr;
 
     ::sd::View* pView = mrViewShell.GetView();
-    if (nId == RID_FORMLAYER_TOOLBOX)
+    if (nId == ToolbarId::FormLayer_Toolbox)
     {
         pShell = new FmFormShell(&mrViewShell.GetViewShellBase(), pView);
         mrFormShellManager.SetFormShell(pShell);
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index c4e2e6fd6561..f7143d945d9d 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -34,6 +34,7 @@
 #include <sfx2/docfile.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/toolbarids.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/eitem.hxx>
 #include <svx/dialogs.hrc>
@@ -1006,7 +1007,7 @@ void ToolBarRules::MainViewShellChanged (ViewShell::ShellType nShellType)
                 ToolBarManager::ToolBarGroup::Permanent,
                 ToolBarManager::msViewerToolBar);
             mpToolBarManager->AddToolBarShell(
-                ToolBarManager::ToolBarGroup::Permanent, RID_DRAW_TEXT_TOOLBOX);
+                ToolBarManager::ToolBarGroup::Permanent, ToolbarId::Draw_Text_Toolbox_Sd);
             break;
 
         case ViewShell::ST_SLIDE_SORTER:
@@ -1076,16 +1077,16 @@ void ToolBarRules::SelectionHasChanged (
     {
         case SdrViewContext::Graphic:
             if( !bTextEdit )
-                mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_DRAW_GRAF_TOOLBOX);
+                mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Draw_Graf_Toolbox);
             break;
 
         case SdrViewContext::Media:
             if( !bTextEdit )
-                mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_DRAW_MEDIA_TOOLBOX);
+                mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Draw_Media_Toolbox);
             break;
 
         case SdrViewContext::Table:
-            mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_DRAW_TABLE_TOOLBOX);
+            mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Draw_Table_Toolbox);
             bTextEdit = true;
             break;
 
@@ -1111,20 +1112,20 @@ void ToolBarRules::SelectionHasChanged (
     }
 
     if( bTextEdit )
-        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_DRAW_TEXT_TOOLBOX);
+        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Draw_Text_Toolbox_Sd);
 
     SdrView* pView = &const_cast<SdrView&>(rView);
     // Check if the extrusion tool bar and the fontwork tool bar have to
     // be activated.
     if (svx::checkForSelectedCustomShapes(pView, true /* bOnlyExtruded */ ))
-        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_SVX_EXTRUSION_BAR);
+        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Svx_Extrusion_Bar);
     sal_uInt32 nCheckStatus = 0;
     if (svx::checkForSelectedFontWork(pView, nCheckStatus))
-        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_SVX_FONTWORK_BAR);
+        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Svx_Fontwork_Bar);
 
     // Switch on additional context-sensitive tool bars.
     if (rView.GetContext() == SdrViewContext::PointEdit)
-        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, RID_BEZIER_TOOLBOX);
+        mpToolBarManager->AddToolBarShell(ToolBarManager::ToolBarGroup::Function, ToolbarId::Bezier_Toolbox_Sd);
 }
 
 void ToolBarRules::SubShellAdded (
@@ -1135,25 +1136,28 @@ void ToolBarRules::SubShellAdded (
     // actual tool bar here.
     switch (nShellId)
     {
-        case RID_DRAW_GRAF_TOOLBOX:
+        case ToolbarId::Draw_Graf_Toolbox:
             mpToolBarManager->AddToolBar(eGroup, ToolBarManager::msGraphicObjectBar);
             break;
 
-        case RID_DRAW_MEDIA_TOOLBOX:
+        case ToolbarId::Draw_Media_Toolbox:
             mpToolBarManager->AddToolBar(eGroup, ToolBarManager::msMediaObjectBar);
             break;
 
-        case RID_DRAW_TEXT_TOOLBOX:
+        case ToolbarId::Draw_Text_Toolbox_Sd:
             mpToolBarManager->AddToolBar(eGroup, ToolBarManager::msTextObjectBar);
             break;
 
-        case RID_BEZIER_TOOLBOX:
+        case ToolbarId::Bezier_Toolbox_Sd:
             mpToolBarManager->AddToolBar(eGroup, ToolBarManager::msBezierObjectBar);
             break;
 
-        case RID_DRAW_TABLE_TOOLBOX:
+        case ToolbarId::Draw_Table_Toolbox:
             mpToolBarManager->AddToolBar(eGroup, ToolBarManager::msTableObjectBar);
             break;
+
+        default:
+            break;
     }
 }
 
@@ -1165,25 +1169,28 @@ void ToolBarRules::SubShellRemoved (
     // actual tool bar here.
     switch (nShellId)
     {
-        case RID_DRAW_GRAF_TOOLBOX:
+        case ToolbarId::Draw_Graf_Toolbox:
             mpToolBarManager->RemoveToolBar(eGroup, ToolBarManager::msGraphicObjectBar);
             break;
 
-        case RID_DRAW_MEDIA_TOOLBOX:
+        case ToolbarId::Draw_Media_Toolbox:
             mpToolBarManager->RemoveToolBar(eGroup, ToolBarManager::msMediaObjectBar);
             break;
 
-        case RID_DRAW_TEXT_TOOLBOX:
+        case ToolbarId::Draw_Text_Toolbox_Sd:
             mpToolBarManager->RemoveToolBar(eGroup, ToolBarManager::msTextObjectBar);
             break;
 
-        case RID_BEZIER_TOOLBOX:
+        case ToolbarId::Bezier_Toolbox_Sd:
             mpToolBarManager->RemoveToolBar(eGroup, ToolBarManager::msBezierObjectBar);
             break;
 
-        case RID_DRAW_TABLE_TOOLBOX:
+        case ToolbarId::Draw_Table_Toolbox:
             mpToolBarManager->RemoveToolBar(eGroup, ToolBarManager::msTableObjectBar);
             break;
+
+        default:
+            break;
     }
 }
 
@@ -1399,7 +1406,7 @@ void ToolBarShellList::UpdateShells (
             std::insert_iterator<GroupedShellList>(aList,aList.begin()));
         for (GroupedShellList::iterator iShell=aList.begin(); iShell!=aList.end(); ++iShell)
         {
-            SAL_INFO("sd.view", OSL_THIS_FUNC << ": deactivating tool bar shell " << iShell->mnId);
+            SAL_INFO("sd.view", OSL_THIS_FUNC << ": deactivating tool bar shell " << (sal_uInt32)iShell->mnId);
             rpManager->DeactivateSubShell(*rpMainViewShell, iShell->mnId);
         }
 
@@ -1411,7 +1418,7 @@ void ToolBarShellList::UpdateShells (
             std::insert_iterator<GroupedShellList>(aList,aList.begin()));
         for (GroupedShellList::iterator iShell=aList.begin(); iShell!=aList.end(); ++iShell)
         {
-            SAL_INFO("sd.view", OSL_THIS_FUNC << ": activating tool bar shell " << iShell->mnId);
+            SAL_INFO("sd.view", OSL_THIS_FUNC << ": activating tool bar shell " << (sal_uInt32)iShell->mnId);
             rpManager->ActivateSubShell(*rpMainViewShell, iShell->mnId);
         }
 
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 8990f5aa76ef..c53179bb9cd2 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -1207,7 +1207,7 @@ namespace {
 
 ShellDescriptor::ShellDescriptor()
     : mpShell(nullptr),
-      mnId(0),
+      mnId(ToolbarId::None),
       mpFactory(),
       mbIsListenerAddedToWindow(false)
 {
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 098dab8c016e..37ae7934408d 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -943,7 +943,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
     }
 
     // EditText active
-    if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != nullptr)
+    if (GetViewShellBase().GetViewShellManager()->GetShell(ToolbarId::Draw_Text_Toolbox_Sd) != nullptr)
     {
         sal_uInt16 nCurrentSId = SID_ATTR_CHAR;
 
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index b478e81354e0..0ce3e37e7631 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, SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
-                                            RID_OUTLINE_TOOLBOX);
+                                            ToolbarId::Outline_Toolbox);
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer | SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_DRAW_VIEWER_TOOLBOX);
+                                            ToolbarId::Draw_Viewer_Toolbox);
 
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
     GetStaticInterface()->RegisterChildWindow(SvxHlinkDlgWrapper::GetChildWindowId());
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index fac288dd9258..392ec7619ef5 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -61,13 +61,13 @@ SFX_IMPL_INTERFACE(PresentationViewShell, DrawViewShell)
 void PresentationViewShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
-                                            RID_DRAW_TOOLBOX);
+                                            ToolbarId::Draw_Toolbox_Sd);
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer | SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_DRAW_VIEWER_TOOLBOX);
+                                            ToolbarId::Draw_Viewer_Toolbox);
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OPTIONS, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_DRAW_OPTIONS_TOOLBOX);
+                                            ToolbarId::Draw_Options_Toolbox);
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_COMMONTASK, SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
-                                            RID_DRAW_COMMONTASK_TOOLBOX);
+                                            ToolbarId::Draw_CommonTask_Toolbox);
 }
 
 
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index b741231d7986..61dd557f5d07 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1639,33 +1639,33 @@ SfxShell* ViewShellObjectBarFactory::CreateShell( ::sd::ShellId nId )
         ::sd::View* pView = mrViewShell.GetView();
         switch (nId)
         {
-            case RID_BEZIER_TOOLBOX:
+            case ToolbarId::Bezier_Toolbox_Sd:
                 pShell = new ::sd::BezierObjectBar(&mrViewShell, pView);
                 break;
 
-            case RID_DRAW_TEXT_TOOLBOX:
+            case ToolbarId::Draw_Text_Toolbox_Sd:
                 pShell = new ::sd::TextObjectBar(
                     &mrViewShell, mrViewShell.GetDoc()->GetPool(), pView);
                 break;
 
-            case RID_DRAW_GRAF_TOOLBOX:
+            case ToolbarId::Draw_Graf_Toolbox:
                 pShell = new ::sd::GraphicObjectBar(&mrViewShell, pView);
                 break;
 
-            case RID_DRAW_MEDIA_TOOLBOX:
+            case ToolbarId::Draw_Media_Toolbox:
                 pShell = new ::sd::MediaObjectBar(&mrViewShell, pView);
                 break;
 
-            case RID_DRAW_TABLE_TOOLBOX:
+            case ToolbarId::Draw_Table_Toolbox:
                 pShell = ::sd::ui::table::CreateTableObjectBar( mrViewShell, pView );
                 break;
 
-            case RID_SVX_EXTRUSION_BAR:
+            case ToolbarId::Svx_Extrusion_Bar:
                 pShell = new svx::ExtrusionBar(
                     &mrViewShell.GetViewShellBase());
                 break;
 
-            case RID_SVX_FONTWORK_BAR:
+            case ToolbarId::Svx_Fontwork_Bar:
                 pShell = new svx::FontworkBar(
                     &mrViewShell.GetViewShellBase());
                 break;
diff --git a/sfx2/inc/app.hrc b/sfx2/inc/app.hrc
index 24eba24c2dbc..2a6f592816a4 100644
--- a/sfx2/inc/app.hrc
+++ b/sfx2/inc/app.hrc
@@ -24,9 +24,6 @@
 #define STR_NO_WEBBROWSER_FOUND                 (RID_SFX_APP_START+7)
 #define STR_NO_ABS_URI_REF                      (RID_SFX_APP_START+8)
 
-#define RID_FULLSCREENTOOLBOX                   (RID_SFX_APP_START+42)
-#define RID_ENVTOOLBOX                          (RID_SFX_APP_START+44)
-
 #define STR_QUITAPP                             (RID_SFX_APP_START+59)
 
 #define RID_STR_HLPFILENOTEXIST                 (RID_SFX_APP_START+68)
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 3147151e116e..a07b1daa8b73 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -20,8 +20,6 @@
 #include <config_features.h>
 #include <comphelper/processfactory.hxx>
 
-#include "workwin.hrc"
-
 #include <sfx2/docfile.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/app.hxx>
@@ -36,6 +34,7 @@
 #include <sfx2/msgpool.hxx>
 #include <sfx2/sfxresid.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/toolbarids.hxx>
 #include <vcl/taskpanelist.hxx>
 #include <vcl/toolbox.hxx>
 #include <tools/rcid.h>
@@ -55,6 +54,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
+#include <type_traits>
 #include <unordered_map>
 
 using namespace ::com::sun::star;
@@ -62,78 +62,72 @@ using namespace ::com::sun::star::uno;
 
 struct ResIdToResName
 {
-    sal_uInt16      nId;
+    ToolbarId   eId;
     const char* pName;
 };
 
 static const ResIdToResName pToolBarResToName[] =
 {
-    { RID_FULLSCREENTOOLBOX,       "fullscreenbar"        },
-    { RID_ENVTOOLBOX,              "standardbar",         },
-    { RID_SVXTBX_FORM_NAVIGATION,  "formsnavigationbar"   },
-    { RID_SVXTBX_FORM_FILTER,      "formsfilterbar"       },
-    { RID_SVXTBX_TEXT_CONTROL_ATTRIBUTES, "formtextobjectbar"    },
-    { RID_SVXTBX_CONTROLS,         "formcontrols"         },
-    { RID_SVXTBX_MORECONTROLS,     "moreformcontrols"     },
-    { RID_SVXTBX_FORMDESIGN,       "formdesign"           },
-    { RID_MATH_TOOLBOX,            "toolbar"              },      //math
-    { RID_TEXT_TOOLBOX_SC,         "textobjectbar"        },      //calc
-    { RID_DRAW_OBJECTBAR,          "drawobjectbar"        },
-    { RID_GRAPHIC_OBJECTBAR,       "graphicobjectbar"     },
-    { RID_OBJECTBAR_FORMAT,        "formatobjectbar"      },
-    { RID_OBJECTBAR_PREVIEW,       "previewbar"           },
-    { RID_OBJECTBAR_TOOLS,         "toolbar"              },      //calc
-    { RID_BEZIER_TOOLBOX_SD,       "bezierobjectbar"      },      //draw/impress
-    { RID_GLUEPOINTS_TOOLBOX,      "gluepointsobjectbar"  },
-    { RID_DRAW_GRAF_TOOLBOX,       "graphicobjectbar"     },
-    { RID_DRAW_OBJ_TOOLBOX,        "drawingobjectbar"     },      //impress
-    { RID_DRAW_TEXT_TOOLBOX_SD,    "textobjectbar"        },      //impress
-    { RID_DRAW_TOOLBOX_SD,         "toolbar"              },      //impress
-    { RID_DRAW_OPTIONS_TOOLBOX,    "optionsbar"           },
-    { RID_DRAW_COMMONTASK_TOOLBOX, "commontaskbar"        },
-    { RID_GRAPHIC_OBJ_TOOLBOX,     "drawingobjectbar"     },      //draw
-    { RID_OUTLINE_TOOLBOX,         "outlinetoolbar"       },      //impress
-    { RID_SLIDE_TOOLBOX,           "slideviewtoolbar"     },
-    { RID_SLIDE_OBJ_TOOLBOX,       "slideviewobjectbar"   },
-    { RID_BEZIER_TOOLBOX_SW,       "bezierobjectbar"      },
-    { RID_DRAW_TOOLBOX_SW,         "drawingobjectbar"     },
-    { RID_DRAW_TEXT_TOOLBOX_SW,    "drawtextobjectbar"    },
-    { RID_FRAME_TOOLBOX,           "frameobjectbar"       },
-    { RID_GRAFIK_TOOLBOX,          "graphicobjectbar"     },
-    { RID_NUM_TOOLBOX,             "numobjectbar"         },
-    { RID_OLE_TOOLBOX,             "oleobjectbar"         },
-    { RID_TABLE_TOOLBOX,           "tableobjectbar"       },
-    { RID_TEXT_TOOLBOX_SW,         "textobjectbar"        },
-    { RID_PVIEW_TOOLBOX,           "previewobjectbar"     },      //writer
-    { RID_WEBTOOLS_TOOLBOX,        "toolbar"              },      //web
-    { RID_WEBTEXT_TOOLBOX,         "textobjectbar"        },
-    { RID_TOOLS_TOOLBOX,           "toolbar"              },      //writer
-    { RID_WEBFRAME_TOOLBOX,        "frameobjectbar"       },      //web
-    { RID_WEBGRAPHIC_TOOLBOX,      "graphicobjectbar"     },
-    { RID_WEBOLE_TOOLBOX,          "oleobjectbar"         },
-    { RID_BASICIDE_OBJECTBAR,      "macrobar"             },
-    { RID_SVX_FONTWORK_BAR,        "fontworkobjectbar"    },      //global
-    { RID_SVX_EXTRUSION_BAR,       "extrusionobjectbar"   },
-    { RID_FORMLAYER_TOOLBOX,       "formsobjectbar"       },
-    { RID_MODULE_TOOLBOX,          "viewerbar"            },      //writer (plugin)
-    { RID_OBJECTBAR_APP,           "viewerbar"            },      //calc   (plugin)
-    { RID_DRAW_VIEWER_TOOLBOX,     "viewerbar"            },      //impress(plugin)
-    { RID_DRAW_MEDIA_TOOLBOX,      "mediaobjectbar"       },      //draw/impress
-    { RID_MEDIA_OBJECTBAR,         "mediaobjectbar"       },      //calc
-    { RID_MEDIA_TOOLBOX,           "mediaobjectbar"       },      //writer
-    { 0,                           ""                     }
+    { ToolbarId::FullScreenToolbox,       "fullscreenbar"        },
+    { ToolbarId::EnvToolbox,              "standardbar",         },
+    { ToolbarId::SvxTbx_Form_Navigation,  "formsnavigationbar"   },
+    { ToolbarId::SvxTbx_Form_Filter,      "formsfilterbar"       },
+    { ToolbarId::SvxTbx_Text_Control_Attributes, "formtextobjectbar"    },
+    { ToolbarId::SvxTbx_Controls,         "formcontrols"         },
+    { ToolbarId::SvxTbx_MoreControls,     "moreformcontrols"     },
+    { ToolbarId::SvxTbx_FormDesign,       "formdesign"           },
+    { ToolbarId::Math_Toolbox,            "toolbar"              },      //math
+    { ToolbarId::Text_Toolbox_Sc,         "textobjectbar"        },      //calc
+    { ToolbarId::Draw_Objectbar,          "drawobjectbar"        },
+    { ToolbarId::Graphic_Objectbar,       "graphicobjectbar"     },
+    { ToolbarId::Objectbar_Format,        "formatobjectbar"      },
+    { ToolbarId::Objectbar_Preview,       "previewbar"           },
+    { ToolbarId::Objectbar_Tools,         "toolbar"              },      //calc
+    { ToolbarId::Bezier_Toolbox_Sd,       "bezierobjectbar"      },      //draw/impress
+    { ToolbarId::Gluepoints_Toolbox,      "gluepointsobjectbar"  },
+    { ToolbarId::Draw_Graf_Toolbox,       "graphicobjectbar"     },
+    { ToolbarId::Draw_Obj_Toolbox,        "drawingobjectbar"     },      //impress
+    { ToolbarId::Draw_Text_Toolbox_Sd,    "textobjectbar"        },      //impress
+    { ToolbarId::Draw_Toolbox_Sd,         "toolbar"              },      //impress
+    { ToolbarId::Draw_Options_Toolbox,    "optionsbar"           },
+    { ToolbarId::Draw_CommonTask_Toolbox, "commontaskbar"        },
+    { ToolbarId::Graphic_Obj_Toolbox,     "drawingobjectbar"     },      //draw
+    { ToolbarId::Outline_Toolbox,         "outlinetoolbar"       },      //impress
+    { ToolbarId::Slide_Toolbox,           "slideviewtoolbar"     },
+    { ToolbarId::Slide_Obj_Toolbox,       "slideviewobjectbar"   },
+    { ToolbarId::Bezier_Toolbox_Sw,       "bezierobjectbar"      },
+    { ToolbarId::Draw_Toolbox_Sw,         "drawingobjectbar"     },
+    { ToolbarId::Draw_Text_Toolbox_Sw,    "drawtextobjectbar"    },
+    { ToolbarId::Frame_Toolbox,           "frameobjectbar"       },
+    { ToolbarId::Grafik_Toolbox,          "graphicobjectbar"     },
+    { ToolbarId::Num_Toolbox,             "numobjectbar"         },
+    { ToolbarId::Ole_Toolbox,             "oleobjectbar"         },
+    { ToolbarId::Table_Toolbox,           "tableobjectbar"       },
+    { ToolbarId::Text_Toolbox_Sw,         "textobjectbar"        },
+    { ToolbarId::PView_Toolbox,           "previewobjectbar"     },      //writer
+    { ToolbarId::Webtools_Toolbox,        "toolbar"              },      //web
+    { ToolbarId::Webtext_Toolbox,         "textobjectbar"        },
+    { ToolbarId::Tools_Toolbox,           "toolbar"              },      //writer
+    { ToolbarId::Webframe_Toolbox,        "frameobjectbar"       },      //web
+    { ToolbarId::Webgraphic_Toolbox,      "graphicobjectbar"     },
+    { ToolbarId::Webole_Toolbox,          "oleobjectbar"         },
+    { ToolbarId::Basicide_Objectbar,      "macrobar"             },
+    { ToolbarId::Svx_Fontwork_Bar,        "fontworkobjectbar"    },      //global
+    { ToolbarId::Svx_Extrusion_Bar,       "extrusionobjectbar"   },
+    { ToolbarId::FormLayer_Toolbox,       "formsobjectbar"       },
+    { ToolbarId::Module_Toolbox,          "viewerbar"            },      //writer (plugin)
+    { ToolbarId::Objectbar_App,           "viewerbar"            },      //calc   (plugin)
+    { ToolbarId::Draw_Viewer_Toolbox,     "viewerbar"            },      //impress(plugin)
+    { ToolbarId::Draw_Media_Toolbox,      "mediaobjectbar"       },      //draw/impress
+    { ToolbarId::Media_Objectbar,         "mediaobjectbar"       },      //calc
+    { ToolbarId::Media_Toolbox,           "mediaobjectbar"       },      //writer
+    { ToolbarId::None,                           ""                     }
 };
 
-//SV_IMPL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl );
-
-
 // Sort the Children according their alignment
 // The order corresponds to the enum SfxChildAlignment (->CHILDWIN.HXX).
 
-
 // Help to make changes to the alignment compatible!
-
-
 LayoutManagerListener::LayoutManagerListener(
     SfxWorkWindow* pWrkWin ) :
     m_bHasFrame( false ),
@@ -297,27 +291,35 @@ void SAL_CALL LayoutManagerListener::layoutEvent(
 
 namespace
 {
+    struct ToolbarIdHash
+    {
+        size_t operator()(ToolbarId t) const
+        {
+            typedef std::underlying_type<ToolbarId>::type underlying_type;
+            return std::hash<underlying_type>()(static_cast<underlying_type>(t));
+        }
+    };
+
     class FilledToolBarResIdToResourceURLMap
     {
     private:
-        typedef std::unordered_map< sal_Int32, OUString > ToolBarResIdToResourceURLMap;
+        typedef std::unordered_map<ToolbarId, OUString, ToolbarIdHash> ToolBarResIdToResourceURLMap;
         ToolBarResIdToResourceURLMap m_aResIdToResourceURLMap;
     public:
         FilledToolBarResIdToResourceURLMap()
         {
             sal_Int32 nIndex( 0 );
-            while ( pToolBarResToName[nIndex].nId != 0 )
+            while (pToolBarResToName[nIndex].eId != ToolbarId::None)
             {
                 OUString aResourceURL( OUString::createFromAscii( pToolBarResToName[nIndex].pName ));
-                m_aResIdToResourceURLMap.insert( ToolBarResIdToResourceURLMap::value_type(
-                                                    sal_Int32( pToolBarResToName[nIndex].nId ), aResourceURL ));
+                m_aResIdToResourceURLMap.insert(ToolBarResIdToResourceURLMap::value_type(pToolBarResToName[nIndex].eId, aResourceURL));
                 ++nIndex;
             }
         }
 
-        OUString findURL(sal_uInt16 nResId) const
+        OUString findURL(ToolbarId eId) const
         {
-            ToolBarResIdToResourceURLMap::const_iterator aIter = m_aResIdToResourceURLMap.find( nResId );
+            ToolBarResIdToResourceURLMap::const_iterator aIter = m_aResIdToResourceURLMap.find(eId);
             if ( aIter != m_aResIdToResourceURLMap.end() )
                 return aIter->second;
             return OUString();
@@ -331,9 +333,9 @@ namespace
     };
 }
 
-static OUString GetResourceURLFromResId( sal_uInt16 nResId )
+static OUString GetResourceURLFromToolbarId(ToolbarId eId)
 {
-    return theFilledToolBarResIdToResourceURLMap::get().findURL(nResId);
+    return theFilledToolBarResIdToResourceURLMap::get().findURL(eId);
 }
 
 bool IsAppWorkWinToolbox_Impl( sal_uInt16 nPos )
@@ -639,9 +641,9 @@ void SfxWorkWindow::DeleteControllers_Impl()
         for (SfxObjectBar_Impl & i : aObjBarList)
         {
             // Not every position must be occupied
-            sal_uInt16 nId = i.nId;
-            if ( nId )
-                i.nId = 0;
+            ToolbarId eId = i.eId;
+            if (eId != ToolbarId::None)
+                i.eId = ToolbarId::None;
         }
     }
 
@@ -987,26 +989,26 @@ void SfxWorkWindow::ResetObjectBars_Impl()
         n->nId = 0;
 }
 
-void SfxWorkWindow::SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId,
+void SfxWorkWindow::SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId,
             SfxInterface* pIFace)
 {
     DBG_ASSERT( nPos < SFX_OBJECTBAR_MAX, "object bar position overflow" );
 
     if ( pParent && IsAppWorkWinToolbox_Impl( nPos ) )
     {
-        pParent->SetObjectBar_Impl(nPos, nFlags, nResId, pIFace);
+        pParent->SetObjectBar_Impl(nPos, nFlags, eId, pIFace);
         return;
     }
 
     SfxObjectBar_Impl aObjBar;
     aObjBar.pIFace = pIFace;
-    aObjBar.nId = sal::static_int_cast<sal_uInt16>(nResId);
+    aObjBar.eId = eId;
     aObjBar.nPos = nPos;
     aObjBar.nMode = nFlags;
 
     for (SfxObjectBar_Impl & rBar : aObjBarList)
     {
-        if ( rBar.nId == aObjBar.nId )
+        if ( rBar.eId == aObjBar.eId )
         {
             rBar = aObjBar;
             return;
@@ -1186,7 +1188,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
     xLayoutManager->lock();
     for ( auto const & n: aObjBarList )
     {
-        sal_uInt16      nId      = n.nId;
+        ToolbarId eId = n.eId;
         bool    bDestroy = n.bDestroy;
 
         // Determine the valid mode for the ToolBox
@@ -1200,14 +1202,14 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
         if ( bDestroy )
         {
             OUString aTbxId( m_aTbxTypeName );
-            aTbxId += GetResourceURLFromResId( nId );
+            aTbxId += GetResourceURLFromToolbarId(eId);
             xLayoutManager->destroyElement( aTbxId );
         }
-        else if ( nId != 0 && ( ( bModesMatching && !bIsFullScreen ) ||
+        else if ( eId != ToolbarId::None && ( ( bModesMatching && !bIsFullScreen ) ||
                                 ( bIsFullScreen && bFullScreenTbx ) ) )
         {
             OUString aTbxId( m_aTbxTypeName );
-            aTbxId += GetResourceURLFromResId( nId );
+            aTbxId += GetResourceURLFromToolbarId(eId);
             if ( !IsDockingAllowed() && !xLayoutManager->isElementFloating( aTbxId ))
                 xLayoutManager->destroyElement( aTbxId );
             else
@@ -1217,11 +1219,11 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
                     xLayoutManager->lockWindow( aTbxId );
             }
         }
-        else if ( nId != 0 )
+        else if ( eId != ToolbarId::None )
         {
             // Delete the Toolbox at this Position if possible
             OUString aTbxId( m_aTbxTypeName );
-            aTbxId += GetResourceURLFromResId( nId );
+            aTbxId += GetResourceURLFromToolbarId(eId);
             xLayoutManager->destroyElement( aTbxId );
         }
     }
diff --git a/sfx2/source/appl/workwin.hrc b/sfx2/source/appl/workwin.hrc
deleted file mode 100644
index 0384ff5b3efe..000000000000
--- a/sfx2/source/appl/workwin.hrc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include "app.hrc"
-#include <svx/fmresids.hrc>
-#include <svx/dialogs.hrc>
-
-//starmath/inc/starmath.hrc
-#define RID_MATH_TOOLBOX            (RID_APP_START + 50)
-
-//sc/inc/sc.hrc
-#define SC_RESOURCE_START           (RID_APP_START+5000)
-#define RID_OBJECTBAR_APP           (SC_RESOURCE_START)
-#define RID_OBJECTBAR_FORMAT        (SC_RESOURCE_START+1)
-#define RID_TEXT_TOOLBOX_SC         (SC_RESOURCE_START+5) /* RID_TEXT_TOOLBOX */
-#define RID_OBJECTBAR_PREVIEW       (SC_RESOURCE_START+6)
-#define RID_OBJECTBAR_TOOLS         (SC_RESOURCE_START+35)
-#define RID_DRAW_OBJECTBAR          (SC_RESOURCE_START+53)
-#define RID_GRAPHIC_OBJECTBAR       (SC_RESOURCE_START+54)
-#define RID_MEDIA_OBJECTBAR         (SC_RESOURCE_START+60)
-
-//basctl/inc/basidesh.hrc
-#define RID_BASICIDE_OBJECTBAR      (RID_BASICIDE_START +  0)
-
-//sw/inc/rcid.hrc
-#define RC_BASE                      RID_SW_START //20000 include/svl/solar.hrc
-#define RC_WEB                      (RC_BASE + 400)
-#define RC_VIEW                     (RC_BASE + 600)
-#define RC_SHELLS                   (RC_BASE + 3250)
-#define RC_WEB_BEGIN                 RC_WEB
-#define RC_VIEW_BEGIN                RC_VIEW
-#define RC_SHELLS_BEGIN              RC_SHELLS
-//sw/source/uibase/inc/shells.hrc
-#define RID_TEXT_TOOLBOX_SW         (RC_SHELLS_BEGIN +  15) /* RID_TEXT_TOOLBOX */
-#define RID_TABLE_TOOLBOX           (RC_SHELLS_BEGIN +  16)
-#define RID_FRAME_TOOLBOX           (RC_SHELLS_BEGIN +  17)
-#define RID_GRAFIK_TOOLBOX          (RC_SHELLS_BEGIN +  18)
-#define RID_DRAW_TOOLBOX_SW         (RC_SHELLS_BEGIN +  19) /* RID_DRAW_TOOLBOX */
-#define RID_DRAW_TEXT_TOOLBOX_SW    (RC_SHELLS_BEGIN +  20) /* RID_DRAW_TEXT_TOOLBOX */
-#define RID_NUM_TOOLBOX             (RC_SHELLS_BEGIN +  21)
-#define RID_OLE_TOOLBOX             (RC_SHELLS_BEGIN +  22)
-#define RID_TOOLS_TOOLBOX           (RC_SHELLS_BEGIN +  23)
-#define RID_BEZIER_TOOLBOX_SW       (RC_SHELLS_BEGIN +  33) /* RID_BEZIER_TOOLBOX */
-#define RID_MODULE_TOOLBOX          (RC_SHELLS_BEGIN + 60)
-#define RID_MEDIA_TOOLBOX           (RC_SHELLS_BEGIN + 61)
-
-//sw/source/uibase/inc/web.hrc
-#define RID_WEBTOOLS_TOOLBOX        (RC_WEB_BEGIN + 2)
-#define RID_WEBTEXT_TOOLBOX         (RC_WEB_BEGIN + 3)
-#define RID_WEBFRAME_TOOLBOX        (RC_WEB_BEGIN + 8)
-#define RID_WEBGRAPHIC_TOOLBOX      (RC_WEB_BEGIN + 10)
-#define RID_WEBOLE_TOOLBOX          (RC_WEB_BEGIN + 11)
-
-//sw/source/uibase/uiview/view.hrc
-#define RID_PVIEW_TOOLBOX           (RC_VIEW_BEGIN + 31)
-
-//sd/source/ui/inc/cfgids.hxx
-#define RID_DRAW_TOOLBOX_SD         (SFX_ITEMTYPE_SD_BEGIN + 11) /* RID_DRAW_TOOLBOX */
-#define RID_SLIDE_TOOLBOX           (SFX_ITEMTYPE_SD_BEGIN + 12)
-#define RID_DRAW_OBJ_TOOLBOX        (SFX_ITEMTYPE_SD_BEGIN + 13)
-#define RID_SLIDE_OBJ_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 14)
-#define RID_BEZIER_TOOLBOX_SD       (SFX_ITEMTYPE_SD_BEGIN + 15) /* RID_BEZIER_TOOLBOX */
-#define RID_DRAW_TEXT_TOOLBOX_SD    (SFX_ITEMTYPE_SD_BEGIN + 16) /* RID_DRAW_TEXT_TOOLBOX */
-#define RID_OUTLINE_TOOLBOX         (SFX_ITEMTYPE_SD_BEGIN + 17)
-#define RID_GLUEPOINTS_TOOLBOX      (SFX_ITEMTYPE_SD_BEGIN + 19)
-#define RID_DRAW_OPTIONS_TOOLBOX    (SFX_ITEMTYPE_SD_BEGIN + 20)
-#define RID_DRAW_COMMONTASK_TOOLBOX (SFX_ITEMTYPE_SD_BEGIN + 21)
-#define RID_FORMLAYER_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 22)
-#define RID_DRAW_VIEWER_TOOLBOX     (SFX_ITEMTYPE_SD_BEGIN + 23)
-#define RID_GRAPHIC_OBJ_TOOLBOX     (SFX_ITEMTYPE_SD_BEGIN + 27)
-#define RID_DRAW_GRAF_TOOLBOX       (SFX_ITEMTYPE_SD_BEGIN + 30)
-#define RID_DRAW_MEDIA_TOOLBOX      (SFX_ITEMTYPE_SD_BEGIN + 31)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 53e2fe30dab6..9c4a0edcab0e 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -95,12 +95,12 @@ struct SfxToDo_Impl
 
 struct SfxObjectBars_Impl
 {
-    sal_uInt32         nResId;  // Resource - and ConfigId of the Toolbox
+    ToolbarId          eId;      // ConfigId of the Toolbox
     sal_uInt16         nPos;
     SfxVisibilityFlags nFlags;   // special visibility flags
     SfxInterface*      pIFace;
 
-    SfxObjectBars_Impl() : nResId(0), nPos(0), nFlags(SfxVisibilityFlags::Invisible), pIFace(nullptr) {}
+    SfxObjectBars_Impl() : eId(ToolbarId::None), nPos(0), nFlags(SfxVisibilityFlags::Invisible), pIFace(nullptr) {}
 };
 
 struct SfxDispatcher_Impl
@@ -431,7 +431,7 @@ void SfxDispatcher::Construct_Impl()
     xImp->bInvalidateOnUnlock = false;
 
     for (SfxObjectBars_Impl & rObjBar : xImp->aObjBars)
-        rObjBar.nResId = 0;
+        rObjBar.eId = ToolbarId::None;
 
     Link<SfxRequest*,void> aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) );
 
@@ -1325,7 +1325,7 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
         xImp->pParent->Update_Impl_( bUIActive, bIsMDIApp, bIsIPOwner, pTaskWin );
 
     for (SfxObjectBars_Impl & rObjBar : xImp->aObjBars)
-        rObjBar.nResId = 0;
+        rObjBar.eId = ToolbarId::None;
     xImp->aChildWins.clear();
 
     // bQuiet: own shells aren't considered for UI and SlotServer
@@ -1376,16 +1376,16 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
             SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos];
             rBar.nPos = nPos;
             rBar.nFlags = nFlags;
-            rBar.nResId = pIFace->GetObjectBarId(nNo);
+            rBar.eId = pIFace->GetObjectBarId(nNo);
             rBar.pIFace = pIFace;
 
             if ( bUIActive || bIsActive )
             {
-                pWorkWin->SetObjectBar_Impl(nPos, nFlags, rBar.nResId, rBar.pIFace);
+                pWorkWin->SetObjectBar_Impl(nPos, nFlags, rBar.eId, rBar.pIFace);
             }
 
             if ( !bVisible )
-                rBar.nResId = 0;
+                rBar.eId = ToolbarId::None;
         }
 
         for ( nNo=0; pIFace && nNo<pIFace->GetChildWindowCount(); nNo++ )
@@ -1439,12 +1439,12 @@ void SfxDispatcher::Update_Impl_( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
     for ( sal_uInt16 nPos=0; nPos<SFX_OBJECTBAR_MAX; nPos++ )
     {
         SfxObjectBars_Impl& rFixed = xImp->aFixedObjBars[nPos];
-        if ( rFixed.nResId )
+        if (rFixed.eId != ToolbarId::None)
         {
             SfxObjectBars_Impl& rBar = xImp->aObjBars[nPos];
             rBar = rFixed;
             pWorkWin->SetObjectBar_Impl(rFixed.nPos, rFixed.nFlags,
-                rFixed.nResId, rFixed.pIFace);
+                rFixed.eId, rFixed.pIFace);
         }
     }
 
@@ -1600,7 +1600,7 @@ void SfxDispatcher::FlushImpl()
         GetBindings()->DLEAVEREGISTRATIONS();
 
     for (SfxObjectBars_Impl & rFixedObjBar : xImp->aFixedObjBars)
-        rFixedObjBar.nResId = 0;
+        rFixedObjBar.eId = ToolbarId::None;
 
     SAL_INFO("sfx.control", "SfxDispatcher(" << this << ")::Flush() done");
 }
@@ -1999,9 +1999,9 @@ void SfxDispatcher::Lock( bool bLock )
     }
 }
 
-sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const
+ToolbarId SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const
 {
-    return xImp->aObjBars[nPos].nResId;
+    return xImp->aObjBars[nPos].eId;
 }
 
 void SfxDispatcher::HideUI( bool bHide )
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 04831c234b23..39ebcc96eb55 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -55,14 +55,14 @@ struct SfxObjectUI_Impl
 {
     sal_uInt16         nPos;
     SfxVisibilityFlags nFlags;
-    sal_uInt32         nResId;
+    sal_uInt32         nObjId;
     bool               bContext;
     SfxShellFeature    nFeature;
 
     SfxObjectUI_Impl(sal_uInt16 n, SfxVisibilityFlags f, sal_uInt32 nId, SfxShellFeature nFeat) :
         nPos(n),
         nFlags(f),
-        nResId(nId),
+        nObjId(nId),
         bContext(false),
         nFeature(nFeat)
     {
@@ -97,7 +97,7 @@ struct SfxInterface_Impl
     }
 };
 
-static SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature);
+static SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId, SfxShellFeature nFeature);
 
 // constuctor, registeres a new unit
 SfxInterface::SfxInterface( const char *pClassName,
@@ -288,27 +288,27 @@ void SfxInterface::RegisterPopupMenu( const OUString& rResourceName )
     pImplData->aPopupName = rResourceName;
 }
 
-void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId)
+void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId)
 {
-    RegisterObjectBar(nPos, nFlags, nResId, SfxShellFeature::NONE);
+    RegisterObjectBar(nPos, nFlags, eId, SfxShellFeature::NONE);
 }
 
-void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature)
+void SfxInterface::RegisterObjectBar(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId, SfxShellFeature nFeature)
 {
-    SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl(nPos, nFlags, nResId, nFeature);
+    SfxObjectUI_Impl* pUI = CreateObjectBarUI_Impl(nPos, nFlags, eId, nFeature);
     if ( pUI )
         pImplData->aObjectBars.push_back(pUI);
 }
 
-SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId, SfxShellFeature nFeature)
+SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId, SfxShellFeature nFeature)
 {
     if (nFlags == SfxVisibilityFlags::Invisible)
         nFlags |= SfxVisibilityFlags::Standard;
 
-    return new SfxObjectUI_Impl(nPos, nFlags, nResId, nFeature);
+    return new SfxObjectUI_Impl(nPos, nFlags, (sal_uInt32)eId, nFeature);
 }
 
-sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
+ToolbarId SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
 {
     bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
     if ( bGenoType )
@@ -324,7 +324,7 @@ sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
 
     assert( nNo<pImplData->aObjectBars.size() );
 
-    return pImplData->aObjectBars[nNo]->nResId;
+    return (ToolbarId)pImplData->aObjectBars[nNo]->nObjId;
 }
 
 sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
@@ -405,7 +405,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (sal_uInt16 nNo) const
 
     assert( nNo<pImplData->aChildWindows.size() );
 
-    sal_uInt32 nRet = pImplData->aChildWindows[nNo]->nResId;
+    sal_uInt32 nRet = pImplData->aChildWindows[nNo]->nObjId;
     if ( pImplData->aChildWindows[nNo]->bContext )
         nRet += sal_uInt16( nClassId ) << 16;
     return nRet;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 95f4f9fbea6e..58d31f2951dc 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -37,6 +37,7 @@
 #include <sfx2/childwin.hxx>
 #include <sfx2/shell.hxx>
 #include <sfx2/ctrlitem.hxx>
+#include <sfx2/toolbarids.hxx>
 #include <sfx2/viewfrm.hxx>
 
 class SfxSplitWindow;
@@ -46,14 +47,14 @@ class SfxWorkWindow;
 // This struct makes all relevant Information available of Toolboxes
 struct SfxObjectBar_Impl
 {
-    sal_uInt16         nId;   // Resource - and ConfigId of Toolbox
+    ToolbarId          eId;   // ConfigId of Toolbox
     SfxVisibilityFlags nMode; // special visibility flags
     sal_uInt16         nPos;
     bool               bDestroy;
     SfxInterface*      pIFace;
 
     SfxObjectBar_Impl() :
-        nId(0),
+        eId(ToolbarId::None),
         nMode(SfxVisibilityFlags::Invisible),
         nPos(0),
         bDestroy(false),
@@ -273,7 +274,7 @@ public:
     void                    UpdateObjectBars_Impl();
     void                    UpdateObjectBars_Impl2();
     void                    ResetObjectBars_Impl();
-    void                    SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, sal_uInt32 nResId,
+    void                    SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId,
                                     SfxInterface *pIFace);
     bool                    KnowsObjectBar_Impl( sal_uInt16 nPos ) const;
     bool                    IsVisible_Impl();
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index aafff1ff21b6..0b41dd8ef095 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, SfxVisibilityFlags::FullScreen, RID_FULLSCREENTOOLBOX);
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard, RID_ENVTOOLBOX );
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_FULLSCREEN, SfxVisibilityFlags::FullScreen, ToolbarId::FullScreenToolbox);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard, ToolbarId::EnvToolbox);
 #endif
 }
 
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 5ec6852f5ef8..7775cb9fab64 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -82,8 +82,6 @@
 #define RID_PRINTUIOPT_FITTOPAGE    (RID_APP_START + 18)
 #define RID_PRINTUIOPT_SCALING      (RID_APP_START + 19)
 
-#define RID_MATH_TOOLBOX            (RID_APP_START + 50)
-
 #define RID_FONTREGULAR             (RID_APP_START + 804)
 #define RID_FONTITALIC              (RID_APP_START + 805)
 #define RID_FONTBOLD                (RID_APP_START + 806)
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index af8ffbe9bf7a..c1dfacf8570f 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -869,7 +869,7 @@ void SmViewShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::FullScreen | SfxVisibilityFlags::Server,
-                                            RID_MATH_TOOLBOX);
+                                            ToolbarId::Math_Toolbox);
     //Dummy-Objectbar, to avoid quiver while activating
 
     GetStaticInterface()->RegisterChildWindow(SmCmdBoxWrapper::GetChildWindowId());
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 63827dd3b7db..a0f119211fc5 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -159,15 +159,15 @@ SFX_IMPL_INTERFACE(FmFormShell, SfxShell)
 void FmFormShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION, SfxVisibilityFlags::Standard|SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_SVXTBX_FORM_NAVIGATION,
+                                            ToolbarId::SvxTbx_Form_Navigation,
                                             SfxShellFeature::FormShowDatabaseBar);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_NAVIGATION, SfxVisibilityFlags::Standard|SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_SVXTBX_FORM_FILTER,
+                                            ToolbarId::SvxTbx_Form_Filter,
                                             SfxShellFeature::FormShowFilterBar);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard | SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_SVXTBX_TEXT_CONTROL_ATTRIBUTES,
+                                            ToolbarId::SvxTbx_Text_Control_Attributes,
                                             SfxShellFeature::FormShowTextControlBar);
 
     GetStaticInterface()->RegisterChildWindow(SID_FM_ADD_FIELD, false, SfxShellFeature::FormShowField);
@@ -177,15 +177,15 @@ void FmFormShell::InitInterface_Impl()
     GetStaticInterface()->RegisterChildWindow(SID_FM_SHOW_DATANAVIGATOR, false, SfxShellFeature::FormShowDataNavigator);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
-                                            RID_SVXTBX_CONTROLS,
+                                            ToolbarId::SvxTbx_Controls,
                                             SfxShellFeature::FormTBControls);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
-                                            RID_SVXTBX_MORECONTROLS,
+                                            ToolbarId::SvxTbx_MoreControls,
                                             SfxShellFeature::FormTBMoreControls);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Standard,
-                                            RID_SVXTBX_FORMDESIGN,
+                                            ToolbarId::SvxTbx_FormDesign,
                                             SfxShellFeature::FormTBDesign);
 }
 
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 89b2a0fa7a10..6e0d6aaefc89 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, SfxVisibilityFlags::Invisible, RID_SVX_EXTRUSION_BAR);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Svx_Extrusion_Bar);
 }
 
 
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 2a0cdc451ac9..e92a65e9dfe1 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, SfxVisibilityFlags::Invisible, RID_SVX_FONTWORK_BAR);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Svx_Fontwork_Bar);
 }
 
 
diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src
index ea2035d21dee..9e3730b94d4a 100644
--- a/sw/source/ui/web/web.src
+++ b/sw/source/ui/web/web.src
@@ -32,16 +32,5 @@ String STR_WRITER_WEBDOC_FULLTYPE
 {
     Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION HTML Document";
 };
-String RID_WEBTOOLS_TOOLBOX
-{
-    Text [ en-US ] = "Main Toolbar/Web" ;
-};
-
-// Text bar
-
-String RID_WEBTEXT_TOOLBOX
-{
-    Text [ en-US ] = "Text Object Bar/Web" ;
-};
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 23b9b5bdec25..959a60efa235 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -122,7 +122,7 @@ void SwModule::InitInterface_Impl()
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION,
                                             SfxVisibilityFlags::Standard | SfxVisibilityFlags::Client | SfxVisibilityFlags::Viewer,
-                                            RID_MODULE_TOOLBOX);
+                                            ToolbarId::Module_Toolbox);
 }
 
 // other states
diff --git a/sw/source/uibase/config/barcfg.cxx b/sw/source/uibase/config/barcfg.cxx
index 7fc2569348a9..61e12d64e723 100644
--- a/sw/source/uibase/config/barcfg.cxx
+++ b/sw/source/uibase/config/barcfg.cxx
@@ -81,12 +81,12 @@ static sal_Int32 lcl_getArrayIndex(SelectionType nSelType)
     return nRet;
 }
 
-void SwToolbarConfigItem::SetTopToolbar( SelectionType nSelType, sal_Int32 nBarId )
+void SwToolbarConfigItem::SetTopToolbar(SelectionType nSelType, ToolbarId eBarId)
 {
     sal_Int32 nProp = lcl_getArrayIndex(nSelType);
     if(nProp >= 0)
     {
-        aTbxIdArray[nProp] = nBarId;
+        aTbxIdArray[nProp] = (sal_Int32)eBarId;
         SetModified();
     }
 }
diff --git a/sw/source/uibase/inc/barcfg.hxx b/sw/source/uibase/inc/barcfg.hxx
index 0982c3c44ee9..f40f2c7d1516 100644
--- a/sw/source/uibase/inc/barcfg.hxx
+++ b/sw/source/uibase/inc/barcfg.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_BARCFG_HXX
 #define INCLUDED_SW_SOURCE_UIBASE_INC_BARCFG_HXX
 
+#include <sfx2/toolbarids.hxx>
 #include <unotools/configitem.hxx>
 
 enum class SelectionType : sal_Int32;
@@ -37,7 +38,7 @@ public:
 
     virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
 
-    void        SetTopToolbar( SelectionType nSelType, sal_Int32 nBarId );
+    void        SetTopToolbar(SelectionType nSelType, ToolbarId eBarId);
 };
 
 #endif
diff --git a/sw/source/uibase/inc/shells.hrc b/sw/source/uibase/inc/shells.hrc
index 67ab5527da60..80a4b0118a01 100644
--- a/sw/source/uibase/inc/shells.hrc
+++ b/sw/source/uibase/inc/shells.hrc
@@ -34,18 +34,6 @@
 #define STR_REDLINE_DELETED        (RC_SHELLS_BEGIN + 13)
 #define STR_REDLINE_FMTCOLLSET     (RC_SHELLS_BEGIN + 14)
 
-#define RID_TEXT_TOOLBOX           (RC_SHELLS_BEGIN +  15)
-#define RID_TABLE_TOOLBOX          (RC_SHELLS_BEGIN +  16)
-#define RID_FRAME_TOOLBOX          (RC_SHELLS_BEGIN +  17)
-#define RID_GRAFIK_TOOLBOX         (RC_SHELLS_BEGIN +  18)
-#define RID_DRAW_TOOLBOX           (RC_SHELLS_BEGIN +  19)
-#define RID_DRAW_TEXT_TOOLBOX      (RC_SHELLS_BEGIN +  20)
-#define RID_NUM_TOOLBOX            (RC_SHELLS_BEGIN +  21)
-#define RID_OLE_TOOLBOX            (RC_SHELLS_BEGIN +  22)
-#define RID_TOOLS_TOOLBOX          (RC_SHELLS_BEGIN +  23)
-
-#define RID_BEZIER_TOOLBOX         (RC_SHELLS_BEGIN +  33)
-
 #define STR_SWBG_PARAGRAPH         (RC_SHELLS_BEGIN +  37)
 #define STR_SWBG_GRAPHIC           (RC_SHELLS_BEGIN +  38)
 #define STR_SWBG_OLE               (RC_SHELLS_BEGIN +  39)
@@ -68,11 +56,7 @@
 #define STR_REDLINE_EDIT            (RC_SHELLS_BEGIN + 56)
 #define STR_REDLINE_AUTOFMT         (RC_SHELLS_BEGIN + 57)
 
-#define RID_MODULE_TOOLBOX          (RC_SHELLS_BEGIN + 60)
-
-#define RID_MEDIA_TOOLBOX           (RC_SHELLS_BEGIN + 61)
-
-#define SHELLS_ACT_END              RID_MEDIA_TOOLBOX
+#define SHELLS_ACT_END              STR_REDLINE_AUTOFMT
 
 #if SHELLS_ACT_END > RC_SHELLS_END
 #error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/source/uibase/inc/web.hrc b/sw/source/uibase/inc/web.hrc
index 5fcd8f8dd7c8..7f8b46f90f93 100644
--- a/sw/source/uibase/inc/web.hrc
+++ b/sw/source/uibase/inc/web.hrc
@@ -22,12 +22,7 @@
 
 #include "rcid.hrc"
 
-#define RID_WEBTOOLS_TOOLBOX                    (RC_WEB_BEGIN + 2)
-#define RID_WEBTEXT_TOOLBOX                     (RC_WEB_BEGIN + 3)
 #define STR_HUMAN_SWWEBDOC_NAME                 (RC_WEB_BEGIN + 4)
-#define RID_WEBFRAME_TOOLBOX                    (RC_WEB_BEGIN + 8)
-#define RID_WEBGRAPHIC_TOOLBOX                  (RC_WEB_BEGIN + 10)
-#define RID_WEBOLE_TOOLBOX                      (RC_WEB_BEGIN + 11)
 #define STR_WRITER_WEBDOC_FULLTYPE              (RC_WEB_BEGIN + 12)
 
 #define WEB_ACT_END                                     STR_WRITER_WEBDOC_FULLTYPE
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 658aa97baa39..69fc95b59cae 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -139,7 +139,7 @@ SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell)
 
 void SwAnnotationShell::InitInterface_Impl()
 {
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 
     GetStaticInterface()->RegisterPopupMenu("annotation");
 }
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 383acf740564..5be7208b3383 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -48,7 +48,7 @@ void SwBezierShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("draw");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_BEZIER_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Bezier_Toolbox_Sw);
 }
 
 
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 4adf956213ab..0d529b38d81d 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -74,7 +74,7 @@ void SwDrawShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("draw");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_DRAW_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Toolbox_Sw);
 
     GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
 }
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index fb5071a75d58..e56af623a61d 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -62,7 +62,7 @@ void SwDrawFormShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("form");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 }
 
 
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index da1cf8147b5e..f920fa1a21ad 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -86,7 +86,7 @@ void SwDrawTextShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("drawtext");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_DRAW_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Draw_Text_Toolbox_Sw);
 
     GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId());
 }
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index a008774512a8..db817ffaa3e2 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -111,7 +111,7 @@ void SwFrameShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("frame");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_FRAME_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Frame_Toolbox);
 }
 
 void SwFrameShell::Execute(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 2fb6a19713a4..29e6199534ce 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -113,7 +113,7 @@ void SwGrfShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("graphic");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_GRAFIK_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Grafik_Toolbox);
 }
 
 void SwGrfShell::Execute(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx
index 9e8d2ca10e5b..e0020792b613 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, SfxVisibilityFlags::Invisible, RID_NUM_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Num_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx
index 8440025570db..f040a234db90 100644
--- a/sw/source/uibase/shells/mediash.cxx
+++ b/sw/source/uibase/shells/mediash.cxx
@@ -74,7 +74,7 @@ void SwMediaShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("media");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_MEDIA_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Media_Toolbox);
 }
 
 void SwMediaShell::ExecMedia(SfxRequest &rReq)
diff --git a/sw/source/uibase/shells/olesh.cxx b/sw/source/uibase/shells/olesh.cxx
index e9bd948d7d16..9fe17add5af6 100644
--- a/sw/source/uibase/shells/olesh.cxx
+++ b/sw/source/uibase/shells/olesh.cxx
@@ -42,7 +42,7 @@ void SwOleShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("oleobject");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_OLE_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Ole_Toolbox);
 }
 
 SwOleShell::SwOleShell(SwView &_rView) :
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 84bc4a39fba5..2eb1d6d10c49 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -96,7 +96,7 @@ SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell)
 void SwTableShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("table");
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TABLE_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Table_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 4ee04dd89bd4..da3af66a4209 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -118,7 +118,7 @@ void SwTextShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("text");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 
     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 4327342947f9..7d1ed4da0564 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -95,7 +95,7 @@ void SwPagePreview::InitInterface_Impl()
     GetStaticInterface()->RegisterPopupMenu("preview");
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT,
                                             SfxVisibilityFlags::Standard|SfxVisibilityFlags::Client|SfxVisibilityFlags::FullScreen|SfxVisibilityFlags::ReadonlyDoc,
-                                            RID_PVIEW_TOOLBOX);
+                                            ToolbarId::PView_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index d1c10735e3b7..a6223728856b 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -118,7 +118,7 @@ void SwSrcView::InitInterface_Impl()
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS,
                                             SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
-                                            RID_WEBTOOLS_TOOLBOX);
+                                            ToolbarId::Webtools_Toolbox);
 
     GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
 }
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 8cc9b2438f62..38f1dd1f75fa 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -260,9 +260,9 @@ void SwView::SelectShell()
         {
             rDispatcher.Flush();        // Really erase all cached shells
             //Remember to the old selection which toolbar was visible
-            sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
-            if ( nId )
-                pBarCfg->SetTopToolbar( m_nSelectionType, nId );
+            ToolbarId eId = rDispatcher.GetObjectBarId(SFX_OBJECTBAR_OBJECT);
+            if (eId != ToolbarId::None)
+                pBarCfg->SetTopToolbar(m_nSelectionType, eId);
 
             for ( sal_uInt16 i = 0; true; ++i )
             {
diff --git a/sw/source/uibase/uiview/view.hrc b/sw/source/uibase/uiview/view.hrc
index ef0bf4d2993b..a79adcc9aaf4 100644
--- a/sw/source/uibase/uiview/view.hrc
+++ b/sw/source/uibase/uiview/view.hrc
@@ -37,7 +37,6 @@
 
 #define STR_NO_MERGE_ENTRY          (RC_VIEW_BEGIN + 25)
 
-#define RID_PVIEW_TOOLBOX           (RC_VIEW_BEGIN + 31)
 #define STR_WEBOPTIONS              (RC_VIEW_BEGIN + 32)
 #define STR_TEXTOPTIONS             (RC_VIEW_BEGIN + 33)
 
diff --git a/sw/source/uibase/uiview/view.src b/sw/source/uibase/uiview/view.src
index 8792b0158d93..78f7693cea00 100644
--- a/sw/source/uibase/uiview/view.src
+++ b/sw/source/uibase/uiview/view.src
@@ -68,10 +68,6 @@ String STR_NB_REPLACED
 {
     Text [ en-US ] = "Search key replaced XX times." ;
 };
-String RID_TOOLS_TOOLBOX
-{
-    Text [ en-US ] = "Main Toolbar" ;
-};
 String STR_SRCVIEW_ROW
 {
     Text [ en-US ] = "Row " ;
@@ -84,9 +80,5 @@ String STR_SAVEAS_SRC
 {
     Text [ en-US ] = "~Export source..." ;
 };
-String RID_PVIEW_TOOLBOX
-{
-    Text [ en-US ] = "Print Preview" ;
-};
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 78daaedce1c3..5a6f8ef17681 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -107,7 +107,7 @@ void SwView::InitInterface_Impl()
     GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, SfxShellFeature::SwChildWindowLabel);
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
-                                            RID_TOOLS_TOOLBOX);
+                                            ToolbarId::Tools_Toolbox);
 #endif
 }
 
diff --git a/sw/source/uibase/web/wformsh.cxx b/sw/source/uibase/web/wformsh.cxx
index ec5c590b5b77..6c6d883c6610 100644
--- a/sw/source/uibase/web/wformsh.cxx
+++ b/sw/source/uibase/web/wformsh.cxx
@@ -44,7 +44,7 @@ void SwWebDrawFormShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("form");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 }
 
 
diff --git a/sw/source/uibase/web/wfrmsh.cxx b/sw/source/uibase/web/wfrmsh.cxx
index b0df1dd0ca11..05b84404f8d0 100644
--- a/sw/source/uibase/web/wfrmsh.cxx
+++ b/sw/source/uibase/web/wfrmsh.cxx
@@ -42,7 +42,7 @@ void SwWebFrameShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("frame");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBFRAME_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webframe_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/web/wgrfsh.cxx b/sw/source/uibase/web/wgrfsh.cxx
index 9bd77670d3bb..6959a2599dab 100644
--- a/sw/source/uibase/web/wgrfsh.cxx
+++ b/sw/source/uibase/web/wgrfsh.cxx
@@ -46,7 +46,7 @@ void SwWebGrfShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("graphic");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBGRAPHIC_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webgraphic_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/web/wlistsh.cxx b/sw/source/uibase/web/wlistsh.cxx
index a38288380655..57a698ba949f 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, SfxVisibilityFlags::Invisible, RID_NUM_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Num_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/web/wolesh.cxx b/sw/source/uibase/web/wolesh.cxx
index ef452e46d8a2..6e4b7a44a58c 100644
--- a/sw/source/uibase/web/wolesh.cxx
+++ b/sw/source/uibase/web/wolesh.cxx
@@ -40,7 +40,7 @@ void SwWebOleShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("oleobject");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_WEBOLE_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Webole_Toolbox);
 }
 
 SwWebOleShell::SwWebOleShell(SwView &_rView) :
diff --git a/sw/source/uibase/web/wtabsh.cxx b/sw/source/uibase/web/wtabsh.cxx
index c660b6491a16..feae57da5d2d 100644
--- a/sw/source/uibase/web/wtabsh.cxx
+++ b/sw/source/uibase/web/wtabsh.cxx
@@ -45,7 +45,7 @@ SFX_IMPL_INTERFACE(SwWebTableShell, SwTableShell)
 void SwWebTableShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("table");
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TABLE_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Table_Toolbox);
 }
 
 
diff --git a/sw/source/uibase/web/wtextsh.cxx b/sw/source/uibase/web/wtextsh.cxx
index abdf4866ad85..5a5e47a963ea 100644
--- a/sw/source/uibase/web/wtextsh.cxx
+++ b/sw/source/uibase/web/wtextsh.cxx
@@ -48,7 +48,7 @@ void SwWebTextShell::InitInterface_Impl()
 {
     GetStaticInterface()->RegisterPopupMenu("text");
 
-    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, RID_TEXT_TOOLBOX);
+    GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Text_Toolbox_Sw);
 
     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 fd9cac6c8743..869f2e5ae82f 100644
--- a/sw/source/uibase/web/wview.cxx
+++ b/sw/source/uibase/web/wview.cxx
@@ -80,7 +80,7 @@ void SwWebView::InitInterface_Impl()
     GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
 
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
-                                            RID_WEBTOOLS_TOOLBOX);
+                                            ToolbarId::Webtools_Toolbox);
 }
 
 
@@ -127,9 +127,9 @@ void SwWebView::SelectShell()
             rDispatcher.Flush();        // really delete all cached shells
 
             //Additional to the old selection remember which toolbar was visible.
-            sal_Int32 nId = rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT );
-            if ( nId )
-                pBarCfg->SetTopToolbar( _nSelectionType, nId );
+            ToolbarId eId = rDispatcher.GetObjectBarId(SFX_OBJECTBAR_OBJECT);
+            if (eId != ToolbarId::None)
+                pBarCfg->SetTopToolbar( _nSelectionType, eId );
 
             SfxShell *pSfxShell;
             sal_uInt16 i;


More information about the Libreoffice-commits mailing list