summaryrefslogtreecommitdiff
path: root/sfx2/source/view/sfxbasecontroller.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-26 10:52:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-26 11:42:49 +0200
commitf2964b9cdb04595e842de329222ffa2b63e5d7f7 (patch)
tree20470a5ecb639d74fa260711583139bb4a6ad41e /sfx2/source/view/sfxbasecontroller.cxx
parent6f691e9c763e4c5f13a745a56fe4d889188187ed (diff)
convert SfxGroupId to scoped enum
in the process I had to teach the idl compiler to cope with identifiers like SfxGroupID::Math, which has the side effect of requiring a space before a ':' in some of the .sdi files. Change-Id: If256599cb8aa1dfc0a33642c5070c5560702f3ba Reviewed-on: https://gerrit.libreoffice.org/40441 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view/sfxbasecontroller.cxx')
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx56
1 files changed, 28 insertions, 28 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 997d24348347..173f14524628 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -116,33 +116,33 @@ struct GroupIDToCommandGroup
static bool bGroupIDMapInitialized = false;
static const GroupIDToCommandGroup GroupIDCommandGroupMap[] =
{
- { GID_INTERN , frame::CommandGroup::INTERNAL },
- { GID_APPLICATION , frame::CommandGroup::APPLICATION },
- { GID_DOCUMENT , frame::CommandGroup::DOCUMENT },
- { GID_VIEW , frame::CommandGroup::VIEW },
- { GID_EDIT , frame::CommandGroup::EDIT },
- { GID_MACRO , frame::CommandGroup::MACRO },
- { GID_OPTIONS , frame::CommandGroup::OPTIONS },
- { GID_MATH , frame::CommandGroup::MATH },
- { GID_NAVIGATOR , frame::CommandGroup::NAVIGATOR },
- { GID_INSERT , frame::CommandGroup::INSERT },
- { GID_FORMAT , frame::CommandGroup::FORMAT },
- { GID_TEMPLATE , frame::CommandGroup::TEMPLATE },
- { GID_TEXT , frame::CommandGroup::TEXT },
- { GID_FRAME , frame::CommandGroup::FRAME },
- { GID_GRAPHIC , frame::CommandGroup::GRAPHIC },
- { GID_TABLE , frame::CommandGroup::TABLE },
- { GID_ENUMERATION , frame::CommandGroup::ENUMERATION },
- { GID_DATA , frame::CommandGroup::DATA },
- { GID_SPECIAL , frame::CommandGroup::SPECIAL },
- { GID_IMAGE , frame::CommandGroup::IMAGE },
- { GID_CHART , frame::CommandGroup::CHART },
- { GID_EXPLORER , frame::CommandGroup::EXPLORER },
- { GID_CONNECTOR , frame::CommandGroup::CONNECTOR },
- { GID_MODIFY , frame::CommandGroup::MODIFY },
- { GID_DRAWING , frame::CommandGroup::DRAWING },
- { GID_CONTROLS , frame::CommandGroup::CONTROLS },
- { SfxGroupId(0) , 0 }
+ { SfxGroupId::Intern , frame::CommandGroup::INTERNAL },
+ { SfxGroupId::Application , frame::CommandGroup::APPLICATION },
+ { SfxGroupId::Document , frame::CommandGroup::DOCUMENT },
+ { SfxGroupId::View , frame::CommandGroup::VIEW },
+ { SfxGroupId::Edit , frame::CommandGroup::EDIT },
+ { SfxGroupId::Macro , frame::CommandGroup::MACRO },
+ { SfxGroupId::Options , frame::CommandGroup::OPTIONS },
+ { SfxGroupId::Math , frame::CommandGroup::MATH },
+ { SfxGroupId::Navigator , frame::CommandGroup::NAVIGATOR },
+ { SfxGroupId::Insert , frame::CommandGroup::INSERT },
+ { SfxGroupId::Format , frame::CommandGroup::FORMAT },
+ { SfxGroupId::Template , frame::CommandGroup::TEMPLATE },
+ { SfxGroupId::Text , frame::CommandGroup::TEXT },
+ { SfxGroupId::Frame , frame::CommandGroup::FRAME },
+ { SfxGroupId::Graphic , frame::CommandGroup::GRAPHIC },
+ { SfxGroupId::Table , frame::CommandGroup::TABLE },
+ { SfxGroupId::Enumeration , frame::CommandGroup::ENUMERATION },
+ { SfxGroupId::Data , frame::CommandGroup::DATA },
+ { SfxGroupId::Special , frame::CommandGroup::SPECIAL },
+ { SfxGroupId::Image , frame::CommandGroup::IMAGE },
+ { SfxGroupId::Chart , frame::CommandGroup::CHART },
+ { SfxGroupId::Explorer , frame::CommandGroup::EXPLORER },
+ { SfxGroupId::Connector , frame::CommandGroup::CONNECTOR },
+ { SfxGroupId::Modify , frame::CommandGroup::MODIFY },
+ { SfxGroupId::Drawing , frame::CommandGroup::DRAWING },
+ { SfxGroupId::Controls , frame::CommandGroup::CONTROLS },
+ { SfxGroupId::NONE, 0 }
};
typedef std::unordered_map< SfxGroupId, sal_Int16 > GroupHashMap;
@@ -154,7 +154,7 @@ sal_Int16 MapGroupIDToCommandGroup( SfxGroupId nGroupID )
if ( !bGroupIDMapInitialized )
{
sal_Int32 i = 0;
- while ( GroupIDCommandGroupMap[i].nGroupID != SfxGroupId(0) )
+ while ( GroupIDCommandGroupMap[i].nGroupID != SfxGroupId::NONE )
{
s_aHashMap.insert( GroupHashMap::value_type(
GroupIDCommandGroupMap[i].nGroupID,