diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-14 20:11:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-16 06:42:57 +0000 |
commit | ee6af9f72c298972d7f255aa92f365b33a9e53b2 (patch) | |
tree | d140aea776f65c9778a231920b8e93f0c346022e /rsc | |
parent | 743cdf36d128bc1d0ea3315675b0bb5f85388099 (diff) |
convert RSC_MENUITEM to scoped enum
Change-Id: I35469edc7d8e5621f016f5eba613474d45711cd3
Reviewed-on: https://gerrit.libreoffice.org/24998
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/inc/rscdb.hxx | 3 | ||||
-rw-r--r-- | rsc/source/parser/rscicpx.cxx | 27 | ||||
-rw-r--r-- | rsc/source/parser/rscinit.cxx | 5 |
3 files changed, 13 insertions, 22 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 07db8596fd24..a84af73eafa4 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -198,8 +198,7 @@ class RscTypCont RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassAccelItem( RscTop * pSuper, RscTop * pKeyCode ); RscTop * InitClassAccel( RscTop * pSuper, RscTop * pClassAccelItem ); - RscTop * InitClassMenuItem( RscTop * pSuper, RscTop * pClassBitmap, - RscTop * pClassKeyCode ); + RscTop * InitClassMenuItem( RscTop * pSuper, RscTop * pClassBitmap ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); RscTop * InitClassNumericFormatter( RscTop * pSuper ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 1bbd9fdab778..cb8648c673f2 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -771,8 +771,7 @@ RscTop * RscTypCont::InitClassAccel( RscTop * pSuper, RscTop * pClassAccelItem ) } RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, - RscTop * pClassBitmap, - RscTop * pClassKeyCode ) + RscTop * pClassBitmap ) { Atom nId; RscTop * pClassMenuItem; @@ -785,10 +784,10 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "Separator", VARNAME ); pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_MENUITEM_SEPARATOR ); + (sal_uInt32)RscMenuItem::Separator ); nId = aNmTb.Put( "Identifier", VARNAME ); pClassMenuItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0, - RSC_MENUITEM_ID ); + (sal_uInt32)RscMenuItem::Id ); { RscFlag * pFlag; RscClient * pClient; @@ -813,7 +812,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, nVarId = aNmTb.Put( "_MenuItemFlags", VARNAME ); pClassMenuItem->SetVariable( nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM, - RSC_MENUITEM_STATUS ); + (sal_uInt32)RscMenuItem::Status ); // add client variables aBaseLst.push_back( @@ -854,28 +853,22 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, } nId = aNmTb.Put( "Text", VARNAME ); pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_MENUITEM_TEXT ); + (sal_uInt32)RscMenuItem::Text ); nId = aNmTb.Put( "ItemBitmap", VARNAME ); pClassMenuItem->SetVariable( nId, pClassBitmap, nullptr, 0, - RSC_MENUITEM_BITMAP ); + (sal_uInt32)RscMenuItem::Bitmap ); nId = aNmTb.Put( "HelpText", VARNAME ); pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_MENUITEM_HELPTEXT ); + (sal_uInt32)RscMenuItem::HelpText ); nId = aNmTb.Put( "HelpID", VARNAME ); pClassMenuItem->SetVariable( nId, &aStringLiteral, nullptr, 0, - RSC_MENUITEM_HELPID ); - nId = aNmTb.Put( "AccelKey", VARNAME ); - pClassMenuItem->SetVariable( nId, pClassKeyCode, nullptr, 0, - RSC_MENUITEM_KEYCODE ); - nId = aNmTb.Put( "Check", VARNAME ); - pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_MENUITEM_CHECKED ); + (sal_uInt32)RscMenuItem::HelpId ); nId = aNmTb.Put( "Disable", VARNAME ); pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_MENUITEM_DISABLE ); + (sal_uInt32)RscMenuItem::Disable ); nId = aNmTb.Put( "Command", VARNAME ); pClassMenuItem->SetVariable( nId, &aString, nullptr, 0, - RSC_MENUITEM_COMMAND ); + (sal_uInt32)RscMenuItem::Command ); return pClassMenuItem; } diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index eca02aa5b7a0..b796c62d45a5 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -380,8 +380,7 @@ void RscTypCont::Init() pClassAccelItem->SetVariable( nId, pClassAccel, nullptr, VAR_SVDYNAMIC, ACCELITEM_ACCEL ); - RscTop* pClassMenuItem = InitClassMenuItem( pClassMgr, pClassBitmap, - pLangClassKeyCode ); + RscTop* pClassMenuItem = InitClassMenuItem( pClassMgr, pClassBitmap); pRoot->Insert( pClassMenuItem ); RscTop* pClassMenu = InitClassMenu( pClassMgr, pClassMenuItem ); @@ -390,7 +389,7 @@ void RscTypCont::Init() // pClassMenu is only completely defined here nId = aNmTb.Put( "SubMenu", VARNAME ); pClassMenuItem->SetVariable( nId, pClassMenu, nullptr, VAR_SVDYNAMIC, - RSC_MENUITEM_MENU ); + (sal_uInt32)RscMenuItem::Menu ); } { // initialize class |