diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-30 16:50:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-31 15:07:00 +0200 |
commit | 490e9dbade4f9d69cab4b1ec435944c9b4d2f6c2 (patch) | |
tree | 9ee234da59e1ae7528efd45bb53d48d051697071 /include | |
parent | tdf#108072: match sprmTFCantSplit with its correct id (diff) | |
download | core-490e9dbade4f9d69cab4b1ec435944c9b4d2f6c2.tar.gz core-490e9dbade4f9d69cab4b1ec435944c9b4d2f6c2.zip |
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@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/dispatch.hxx | 3 | ||||
-rw-r--r-- | include/sfx2/objface.hxx | 7 | ||||
-rw-r--r-- | include/sfx2/toolbarids.hxx | 76 | ||||
-rw-r--r-- | include/svx/fmresids.hrc | 8 |
4 files changed, 82 insertions, 12 deletions
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) |