diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-30 20:15:05 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-31 06:39:52 +0000 |
commit | 59dbfecedb76ecf2ff8d464c144a0adf85eb3766 (patch) | |
tree | 4a37830b0919e2bb6ab94e2e874654318c495129 /rsc/source | |
parent | 5ca16c7b3153395d9107f84d366c796a22930756 (diff) |
Convert RSC_TOOLBOXITEM to scoped enum
Change-Id: Ic90b6950016417d5f57963ab69fd20905a943bb7
Reviewed-on: https://gerrit.libreoffice.org/25683
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/parser/rscicpx.cxx | 34 | ||||
-rw-r--r-- | rsc/source/parser/rscinit.cxx | 3 |
2 files changed, 11 insertions, 26 deletions
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index a23761d7157b..7182b34e71b8 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -933,9 +933,7 @@ RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper, } RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, - RscTop * pClassBitmap, - RscTop * pClassImage, - RscEnum * pTriState ) + RscTop * pClassBitmap ) { Atom nId; RscTop * pClassToolBoxItem; @@ -948,7 +946,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "Identifier", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0, - RSC_TOOLBOXITEM_ID ); + (sal_uInt32)RscToolboxItemFlags::Id ); { RscEnum * pEnum; @@ -961,7 +959,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, // add variable nId = aNmTb.Put( "Type", VARNAME ); pClassToolBoxItem->SetVariable( nId, pEnum, nullptr, 0, - RSC_TOOLBOXITEM_TYPE ); + (sal_uInt32)RscToolboxItemFlags::Type ); } { RscFlag * pFlag; @@ -988,7 +986,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME ); pClassToolBoxItem->SetVariable( l_nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM, - RSC_TOOLBOXITEM_STATUS ); + (sal_uInt32)RscToolboxItemFlags::Status ); // add client variables aBaseLst.push_back( @@ -1029,35 +1027,23 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, } nId = aNmTb.Put( "HelpID", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aStringLiteral, nullptr, 0, - RSC_TOOLBOXITEM_HELPID ); + (sal_uInt32)RscToolboxItemFlags::HelpId ); nId = aNmTb.Put( "Text", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_TOOLBOXITEM_TEXT ); - nId = aNmTb.Put( "HelpText", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_TOOLBOXITEM_HELPTEXT ); + (sal_uInt32)RscToolboxItemFlags::Text ); nId = aNmTb.Put( "ItemBitmap", VARNAME ); pClassToolBoxItem->SetVariable( nId, pClassBitmap, nullptr, 0, - RSC_TOOLBOXITEM_BITMAP ); - nId = aNmTb.Put( "ItemImage", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClassImage, nullptr, 0, - RSC_TOOLBOXITEM_IMAGE ); + (sal_uInt32)RscToolboxItemFlags::Bitmap ); nId = aNmTb.Put( "Disable", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_TOOLBOXITEM_DISABLE ); + (sal_uInt32)RscToolboxItemFlags::Disable ); - nId = aNmTb.Put( "State", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pTriState, nullptr, 0, - RSC_TOOLBOXITEM_STATE ); - nId = aNmTb.Put( "Hide", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_TOOLBOXITEM_HIDE ); nId = aNmTb.Put( "Hide", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, - RSC_TOOLBOXITEM_HIDE ); + (sal_uInt32)RscToolboxItemFlags::Hide ); nId = aNmTb.Put( "Command", VARNAME ); pClassToolBoxItem->SetVariable( nId, &aString, nullptr, 0, - RSC_TOOLBOXITEM_COMMAND ); + (sal_uInt32)RscToolboxItemFlags::Command ); return pClassToolBoxItem; } diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index c24e7572a0fa..9860c4b739b6 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -413,8 +413,7 @@ void RscTypCont::Init() RscTop* pClassDockingWindow = InitClassDockingWindow( pClassWindow, pMapUnit ); pRoot->Insert( pClassDockingWindow ); - RscTop* pClassToolBoxItem = InitClassToolBoxItem( pClassMgr, pClassBitmap, - pClassImage, pTriState ); + RscTop* pClassToolBoxItem = InitClassToolBoxItem( pClassMgr, pClassBitmap ); pRoot->Insert( pClassToolBoxItem ); RscTop* pClassToolBox = InitClassToolBox( pClassDockingWindow, pClassToolBoxItem ); |