Kaydet (Commit) f2964b9c authored tarafından Noel Grandin's avatar Noel Grandin

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/40441Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6f691e9c
......@@ -104,7 +104,6 @@ with a.stdout as txt:
if idName.endswith("_BEGIN"): continue
if idName.endswith("_END"): continue
if idName.startswith("RID_"):
if idName == "RID_GROUPS_SFXOFFSET": continue
if idName == "RID_SVX_FIRSTFREE": continue
if in_exclusion_set(idName): continue
# search for the constant
......
......@@ -290,7 +290,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken )
{
OStringBuffer aBuf;
while( rtl::isAsciiAlphanumeric( static_cast<unsigned char>(c) )
|| c == '_' )
|| c == '_' || c == ':')
{
aBuf.append(c);
c = GetFastNextChar();
......
......@@ -326,7 +326,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
// at least one dummy
WriteTab( rOutStm, 1 );
rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteOString( GetName() )
.WriteCharPtr( ", 0, SfxGroupId(0), " )
.WriteCharPtr( ", 0, SfxGroupId::NONE, " )
.WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE," )
.WriteCharPtr( "SFX_STUB_PTR_STATE_NONE," )
.WriteCharPtr( "SfxSlotMode::NONE, SfxVoidItem, 0, 0, \"\", SfxSlotMode::NONE )" ) << endl;
......
......@@ -434,7 +434,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
if( !GetGroupId().isEmpty() )
rOutStm.WriteOString( GetGroupId() );
else
rOutStm.WriteCharPtr( "SfxGroupId(0)" );
rOutStm.WriteCharPtr( "SfxGroupId::NONE" );
rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
......
......@@ -19,16 +19,43 @@
#ifndef INCLUDED_SFX2_GROUPID_HXX
#define INCLUDED_SFX2_GROUPID_HXX
#include <o3tl/strong_int.hxx>
#include <sal/types.h>
#include <functional>
// !! If you add a new group, please change sfxbasecontroller.cxx and
// !! com.sun.star.frame.CommandGroup accordingly!
struct SfxGroupIdTag {};
typedef o3tl::strong_int<sal_uInt16, SfxGroupIdTag> SfxGroupId;
enum class SfxGroupId {
NONE = 0,
Intern = 32700,
Application,
Document,
View,
Edit,
Macro,
Options,
Math,
Navigator,
Insert,
Format,
Template,
Text,
Frame,
Graphic,
Table,
Enumeration,
Data,
Special,
Image,
Chart,
Explorer,
Connector,
Modify,
Drawing,
Controls,
Navigation
};
// make it hashable for storing in maps
namespace std {
namespace std
{
template <>
struct hash<SfxGroupId>
{
......@@ -37,50 +64,8 @@ namespace std {
return std::hash<sal_uInt16>()((sal_uInt16)k);
}
};
}
// Make it easier to declare the constants in the .hrc files.
// This way, we only have to mark the START constant as being SfxGroupId.
inline SfxGroupId operator+(SfxGroupId lhs, sal_uInt16 rhs)
{
return SfxGroupId((sal_uInt16)lhs + rhs);
}
// group ids
// !! If you add a new group, please change sfxbasecontroller.cxx and
// !! com.sun.star.frame.CommandGroup accordingly!
#define RID_GROUPS_SFXOFFSET SfxGroupId(32700)
#define GID_INTERN (RID_GROUPS_SFXOFFSET+ 0)
#define GID_APPLICATION (RID_GROUPS_SFXOFFSET+ 1)
#define GID_DOCUMENT (RID_GROUPS_SFXOFFSET+ 2)
#define GID_VIEW (RID_GROUPS_SFXOFFSET+ 3)
#define GID_EDIT (RID_GROUPS_SFXOFFSET+ 4)
#define GID_MACRO (RID_GROUPS_SFXOFFSET+ 5)
#define GID_OPTIONS (RID_GROUPS_SFXOFFSET+ 6)
#define GID_MATH (RID_GROUPS_SFXOFFSET+ 7)
#define GID_NAVIGATOR (RID_GROUPS_SFXOFFSET+ 8)
#define GID_INSERT (RID_GROUPS_SFXOFFSET+ 9)
#define GID_FORMAT (RID_GROUPS_SFXOFFSET+10)
#define GID_TEMPLATE (RID_GROUPS_SFXOFFSET+11)
#define GID_TEXT (RID_GROUPS_SFXOFFSET+12)
#define GID_FRAME (RID_GROUPS_SFXOFFSET+13)
#define GID_GRAPHIC (RID_GROUPS_SFXOFFSET+14)
#define GID_TABLE (RID_GROUPS_SFXOFFSET+15)
#define GID_ENUMERATION (RID_GROUPS_SFXOFFSET+16)
#define GID_DATA (RID_GROUPS_SFXOFFSET+17)
#define GID_SPECIAL (RID_GROUPS_SFXOFFSET+18)
#define GID_IMAGE (RID_GROUPS_SFXOFFSET+19)
#define GID_CHART (RID_GROUPS_SFXOFFSET+20)
#define GID_EXPLORER (RID_GROUPS_SFXOFFSET+21)
#define GID_CONNECTOR (RID_GROUPS_SFXOFFSET+22)
#define GID_MODIFY (RID_GROUPS_SFXOFFSET+23)
#define GID_DRAWING (RID_GROUPS_SFXOFFSET+24)
#define GID_CONTROLS (RID_GROUPS_SFXOFFSET+25)
#define GID_NAVIGATION (RID_GROUPS_SFXOFFSET+26)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -131,7 +131,7 @@ interface CellSelection
[
ExecMethod = ExecuteEdit ;
StateMethod = GetBlockState ;
GroupId = GID_EDIT ; //FS
GroupId = SfxGroupId::Edit ; //FS
MenuConfig , AccelConfig ;
]
SID_DELETE_CONTENTS [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
......
......@@ -26,7 +26,7 @@ interface TableText
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_EDIT ;
GroupId = SfxGroupId::Edit ;
]
SID_CUT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
SID_COPY [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
......
......@@ -41,7 +41,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoDownBlock SID_CURSORPAGEDOWN
......@@ -52,7 +52,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SID_CURSORHOME [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
......@@ -66,7 +66,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoUp SID_CURSORUP
(
......@@ -76,7 +76,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoLeft SID_CURSORLEFT
(
......@@ -86,7 +86,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoRight SID_CURSORRIGHT
......@@ -97,7 +97,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SID_PREV_TABLE
......@@ -105,7 +105,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SID_NEXT_TABLE
......@@ -113,7 +113,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoToStart SID_CURSORTOPOFFILE ()
......@@ -121,7 +121,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SfxVoidItem GoToEndOfData SID_CURSORENDOFFILE ()
......@@ -129,7 +129,7 @@ interface TablePrintPreview
ExecMethod = Execute ;
StateMethod = GetState ;
Export = FALSE;
GroupId = GID_INTERN ;
GroupId = SfxGroupId::Intern ;
]
SID_PREVIEW_ZOOMIN [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
SID_PREVIEW_ZOOMOUT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
......
This diff is collapsed.
......@@ -188,7 +188,7 @@ interface SlideSorterView
]
SID_RELOAD // ole : no, status : ?
[
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
ExecMethod = ExecCtrl ;
StateMethod = GetCtrlState ;
Asynchron , AutoUpdate ,
......
......@@ -46,21 +46,21 @@ interface DrawDocument
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// ?
FID_SEARCH_ON // ole : ?, status : ?
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// ?
FID_SEARCH_OFF // ole : ?, status : ?
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_GET_COLORLIST
......
......@@ -35,7 +35,7 @@ interface DrawView
]
SID_RELOAD // ole : no, status : ?
[
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
ExecMethod = ExecCtrl ;
StateMethod = GetCtrlState ;
Asynchron , AutoUpdate ,
......@@ -289,7 +289,7 @@ interface DrawView
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
Export ,
MenuConfig , AccelConfig , ToolBoxConfig ;
]
......@@ -354,7 +354,7 @@ interface DrawView
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
GroupId = GID_INSERT ;
GroupId = SfxGroupId::Insert ;
Export , Asynchron ,
MenuConfig , AccelConfig , ToolBoxConfig ;
]
......@@ -378,7 +378,7 @@ interface DrawView
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
Export , Asynchron ,
MenuConfig , AccelConfig , ToolBoxConfig ;
]
......@@ -668,7 +668,7 @@ interface DrawView
[
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
Asynchron ,
MenuConfig , AccelConfig , ToolBoxConfig ;
]
......@@ -769,7 +769,7 @@ interface DrawView
[
ExecMethod = FuPermanent ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
AutoUpdate ,
MenuConfig , AccelConfig , ToolBoxConfig ;
]
......@@ -1226,7 +1226,7 @@ interface DrawView
SID_OBJECT_ALIGN // ole : no, status : ?
[
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
Export ;
]
......@@ -1453,7 +1453,7 @@ interface DrawView
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_DRAGHIERARCHIE // ole : no, status : ?
[
......@@ -1463,49 +1463,49 @@ interface DrawView
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_DELETE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_HIDE
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_SHOW
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_APPLY // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_WATERCAN // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_NEW_BY_EXAMPLE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_UPDATE_BY_EXAMPLE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SET_DEFAULT // ole : no, status : ?
[
......@@ -1646,7 +1646,7 @@ interface DrawView
SID_CAPTUREPOINT // ole : no, status : ?
[
ExecMethod = FuTemporary ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SWITCH_POINTEDIT // ole : no, status : ?
[
......@@ -1657,7 +1657,7 @@ interface DrawView
[
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
MenuConfig = TRUE ;
]
SID_COLOR_CONTROL // ole : no, status : ?
......@@ -1732,7 +1732,7 @@ interface DrawView
SID_GALLERY_FORMATS // ole : no, status : ?
[
ExecMethod = ExecGallery ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_NAVIGATOR_INIT // ole : no, status : ?
[
......
......@@ -22,7 +22,7 @@ interface StarImpress
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_APPLICATION ;
GroupId = SfxGroupId::Application ;
Container ;
]
......
......@@ -22,7 +22,7 @@ shell TextObjectBar
[
ExecMethod = Execute;
StateMethod = GetAttrState;
GroupId = GID_DOCUMENT;
GroupId = SfxGroupId::Document;
AutoUpdate;
]
......
......@@ -137,7 +137,7 @@ interface ImpressEditView : DrawView
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SEARCH_ITEM // ole : ?, status : ?
[
......
......@@ -22,7 +22,7 @@ interface GraphicEditView : DrawView
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SEARCH_ITEM // ole : ?, status : ?
[
......
......@@ -211,7 +211,7 @@ interface OutlineView
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_INSERTFILE // ole : no, status : ?
[
......@@ -237,12 +237,12 @@ interface OutlineView
[
ExecMethod = Execute ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SAVEASDOC // ole : no, status : ?
[
ExecMethod = Execute ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_RULER // ole : no, status : ?
[
......@@ -285,13 +285,13 @@ interface OutlineView
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_FAMILY3 // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// Templates
// no menu entry
......@@ -305,54 +305,54 @@ interface OutlineView
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// no menu entry
SID_STYLE_UPDATE_BY_EXAMPLE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// no menu entry
SID_STYLE_WATERCAN // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// no menu entry
SID_STYLE_NEW_BY_EXAMPLE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// no menu entry
SID_STYLE_NEW // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
// no menu entry
SID_STYLE_DELETE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_HIDE
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_STYLE_SHOW
[
ExecMethod = FuTemporary ;
StateMethod = GetAttrState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_AUTOSPELL_CHECK // ole : no, status : play rec
[
......@@ -524,7 +524,7 @@ interface OutlineView
[
ExecMethod = Execute ;
StateMethod = GetState ;
GroupId = GID_DOCUMENT ;
GroupId = SfxGroupId::Document ;
]
SID_SEARCH_ITEM // ole : ?, status : ?
[
......
......@@ -28,7 +28,7 @@ SfxBoolItem VerticalTextFitToSizeTool SID_TEXT_FITTOSIZE_VERTICAL
AccelConfig = TRUE,
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = GID_FORMAT;
GroupId = SfxGroupId::Format;
]
SvxObjectItem RulerObject SID_RULER_OBJECT
......@@ -67,5 +67,5 @@ SfxBoolItem OutputQualityContrast SID_OUTPUT_QUALITY_CONTRAST
AccelConfig = TRUE,
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = GID_VIEW;
GroupId = SfxGroupId::View;
]
This diff is collapsed.
......@@ -33,7 +33,7 @@ namespace sd {
static SfxSlot aLeftImpressPaneShellSlots_Impl[] =
{
{ 0, SfxGroupId(0), SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, nullptr }
{ 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, nullptr }
};
SFX_IMPL_INTERFACE(LeftImpressPaneShell, SfxShell)
......@@ -58,7 +58,7 @@ LeftImpressPaneShell::~LeftImpressPaneShell()
static SfxSlot aLeftDrawPaneShellSlots_Impl[] =
{
{ 0, SfxGroupId(0), SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, nullptr }
{ 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, SfxDisableFlags::NONE, nullptr }
};
SFX_IMPL_INTERFACE(LeftDrawPaneShell, SfxShell)
......
This diff is collapsed.
......@@ -52,57 +52,57 @@ namespace
{
const char* getGidResId(SfxGroupId nId)
{
if (nId == GID_INTERN)
if (nId == SfxGroupId::Intern)
return STR_GID_INTERN;
else if (nId == GID_APPLICATION)
else if (nId == SfxGroupId::Application)
return STR_GID_APPLICATION;
else if (nId == GID_VIEW)
else if (nId == SfxGroupId::View)
return STR_GID_VIEW;
else if (nId == GID_DOCUMENT)
else if (nId == SfxGroupId::Document)
return STR_GID_DOCUMENT;
else if (nId == GID_EDIT)
else if (nId == SfxGroupId::Edit)
return STR_GID_EDIT;
else if (nId == GID_MACRO)
else if (nId == SfxGroupId::Macro)
return STR_GID_MACRO;
else if (nId == GID_OPTIONS)
else if (nId == SfxGroupId::Options)
return STR_GID_OPTIONS;
else if (nId == GID_MATH)
else if (nId == SfxGroupId::Math)
return STR_GID_MATH;
else if (nId == GID_NAVIGATOR)
else if (nId == SfxGroupId::Navigator)
return STR_GID_NAVIGATOR;
else if (nId == GID_INSERT)
else if (nId == SfxGroupId::Insert)
return STR_GID_INSERT;
else if (nId == GID_FORMAT)
else if (nId == SfxGroupId::Format)
return STR_GID_FORMAT;
else if (nId == GID_TEMPLATE)
else if (nId == SfxGroupId::Template)
return STR_GID_TEMPLATE;
else if (nId == GID_TEXT)
else if (nId == SfxGroupId::Text)
return STR_GID_TEXT;
else if (nId == GID_FRAME)
else if (nId == SfxGroupId::Frame)
return STR_GID_FRAME;
else if (nId == GID_GRAPHIC)
else if (nId == SfxGroupId::Graphic)
return STR_GID_GRAPHIC;
else if (nId == GID_TABLE)
else if (nId == SfxGroupId::Table)
return STR_GID_TABLE;
else if (nId == GID_ENUMERATION)
else if (nId == SfxGroupId::Enumeration)
return STR_GID_ENUMERATION;
else if (nId == GID_DATA)
else if (nId == SfxGroupId::Data)
return STR_GID_DATA;
else if (nId == GID_SPECIAL)
else if (nId == SfxGroupId::Special)
return STR_GID_SPECIAL;
else if (nId == GID_IMAGE)
else if (nId == SfxGroupId::Image)
return STR_GID_IMAGE;
else if (nId == GID_CHART)
else if (nId == SfxGroupId::Chart)
return STR_GID_CHART;
else if (nId == GID_EXPLORER)
else if (nId == SfxGroupId::Explorer)
return STR_GID_EXPLORER;
else if (nId == GID_CONNECTOR)
else if (nId == SfxGroupId::Connector)
return STR_GID_CONNECTOR;
else if (nId == GID_MODIFY)
else if (nId == SfxGroupId::Modify)
return STR_GID_MODIFY;
else if (nId == GID_DRAWING)
else if (nId == SfxGroupId::Drawing)
return STR_GID_DRAWING;
else if (nId == GID_CONTROLS)
else if (nId == SfxGroupId::Controls)
return STR_GID_CONTROLS;
return nullptr;
}
......@@ -130,10 +130,10 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
for ( size_t nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
{
SfxSlot &rDef = rInterface.pSlots[nFunc];
if ( rDef.GetGroupId() && /* rDef.GetGroupId() != GID_INTERN && */
if ( rDef.GetGroupId() != SfxGroupId::NONE &&
std::find(_vGroups.begin(), _vGroups.end(), rDef.GetGroupId()) == _vGroups.end() )
{
if (rDef.GetGroupId() == GID_INTERN)
if (rDef.GetGroupId() == SfxGroupId::Intern)
_vGroups.insert(_vGroups.begin(), rDef.GetGroupId());
else
_vGroups.push_back(rDef.GetGroupId());
......
......@@ -537,7 +537,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
SfxSlot *pNewSlot = new SfxSlot;
pNewSlot->nSlotId = nSlotId;
pNewSlot->nGroupId = SfxGroupId(0);
pNewSlot->nGroupId = SfxGroupId::NONE;
// Verb slots must be executed asynchronously, so that they can be
// destroyed while executing.
......
......@@ -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 },