summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-04-30 19:50:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-02 08:18:14 +0200
commita12dfa353122d1865b7c20513865a4632a621a38 (patch)
treed37bb405e7f7783050a26b8fd98b39746cb3e278 /sfx2
parent5eaad8eb1d46b6f85605c5ac210e8b1397b18b22 (diff)
create SfxGroupId based on o3tl::strong_int
Change-Id: Iaccf16f29b6f4b1a2c712d1e5e2bd0fa4fdb5e71 Reviewed-on: https://gerrit.libreoffice.org/37108 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/msgpool.cxx2
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx10
3 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index ed74d2020c3b..e0de09b8d548 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -143,7 +143,7 @@ OUString SfxSlotPool::SeekGroup( sal_uInt16 nNo )
}
}
- SfxResId aResId( _vGroups[_nCurGroup] );
+ SfxResId aResId( (sal_uInt16)_vGroups[_nCurGroup] );
aResId.SetRT(RSC_STRING);
if ( !SfxResId::GetResMgr()->IsAvailable(aResId) )
{
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 13b3be168c07..4fa297d02010 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -537,7 +537,7 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
SfxSlot *pNewSlot = new SfxSlot;
pNewSlot->nSlotId = nSlotId;
- pNewSlot->nGroupId = 0;
+ pNewSlot->nGroupId = SfxGroupId(0);
// Verb slots must be executed asynchronously, so that they can be
// destroyed while executing.
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index bb03b8ddf036..b7947d3dc648 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -108,7 +108,7 @@ using ::com::sun::star::ui::XSidebarProvider;
struct GroupIDToCommandGroup
{
- sal_Int16 nGroupID;
+ SfxGroupId nGroupID;
sal_Int16 nCommandGroup;
};
@@ -141,19 +141,19 @@ static const GroupIDToCommandGroup GroupIDCommandGroupMap[] =
{ GID_MODIFY , frame::CommandGroup::MODIFY },
{ GID_DRAWING , frame::CommandGroup::DRAWING },
{ GID_CONTROLS , frame::CommandGroup::CONTROLS },
- { 0 , 0 }
+ { SfxGroupId(0) , 0 }
};
-typedef std::unordered_map< sal_Int16, sal_Int16 > GroupHashMap;
+typedef std::unordered_map< SfxGroupId, sal_Int16 > GroupHashMap;
-sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID )
+sal_Int16 MapGroupIDToCommandGroup( SfxGroupId nGroupID )
{
static GroupHashMap s_aHashMap;
if ( !bGroupIDMapInitialized )
{
sal_Int32 i = 0;
- while ( GroupIDCommandGroupMap[i].nGroupID != 0 )
+ while ( GroupIDCommandGroupMap[i].nGroupID != SfxGroupId(0) )
{
s_aHashMap.insert( GroupHashMap::value_type(
GroupIDCommandGroupMap[i].nGroupID,