diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-08 08:08:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-09 07:55:10 +0000 |
commit | 1edcad0daca7f00559fe7cf100438e105623b3eb (patch) | |
tree | ef0be4f736cf9b0977ff14e4e58e9a405f4a59e1 /rsc/source | |
parent | 116cf0b298ed62f26a60db51164f6510007d2579 (diff) |
convert SFX_STYLE_ITEM to scoped enum
Change-Id: I929603a12c29931074a467d1472ef686c1d4e8ee
Reviewed-on: https://gerrit.libreoffice.org/24751
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 | 12 | ||||
-rw-r--r-- | rsc/source/parser/rscyacc.y | 10 | ||||
-rw-r--r-- | rsc/source/res/rscclass.cxx | 10 | ||||
-rw-r--r-- | rsc/source/res/rsctop.cxx | 11 |
4 files changed, 32 insertions, 11 deletions
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 95bb420bcf8a..0582b764be35 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -1297,16 +1297,16 @@ RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper, nId = aNmTb.Put( "FilterList", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, pStrLst, nullptr, 0, - RSC_SFX_STYLE_ITEM_LIST ); + SfxStyleItem::List ); nId = aNmTb.Put( "StyleBitmap", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, pClassBitmap, nullptr, 0, - RSC_SFX_STYLE_ITEM_BITMAP ); + SfxStyleItem::Bitmap ); nId = aNmTb.Put( "Text", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_SFX_STYLE_ITEM_TEXT ); + SfxStyleItem::Text ); nId = aNmTb.Put( "HelpText", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0, - RSC_SFX_STYLE_ITEM_HELPTEXT ); + SfxStyleItem::HelpText ); { RscEnum * pSfxStyleFamily; pSfxStyleFamily = new RscEnum( pHS->getID( "StyleFamily" ), @@ -1321,11 +1321,11 @@ RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper, nId = aNmTb.Put( "StyleFamily", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, pSfxStyleFamily, nullptr, 0, - RSC_SFX_STYLE_ITEM_STYLEFAMILY ); + SfxStyleItem::StyleFamily ); } nId = aNmTb.Put( "StyleImage", VARNAME ); pClassSfxFamilyStyleItem->SetVariable( nId, pClassImage, nullptr, 0, - RSC_SFX_STYLE_ITEM_IMAGE ); + SfxStyleItem::Image ); return pClassSfxFamilyStyleItem; } diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index 8a67316fb31f..43272f2fc8c8 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -40,7 +40,7 @@ ObjectStack S; RscTop * pCurClass; -sal_uInt32 nCurMask; +SfxStyleItem nCurMask; char szErrBuf[ 100 ]; RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName ) @@ -450,14 +450,14 @@ new_class_definition_header // Klasse anlegen Atom nId = pHS->getID( $2 ); pCurClass = new RscClass( nId, lType, $5 ); - nCurMask = 1; + nCurMask = SfxStyleItem::List; pTC->aNmTb.Put( nId, CLASSNAME, pCurClass ); pTC->GetRoot()->Insert( pCurClass ); } | CLASS CLASSNAME id_expression ':' CLASSNAME { pCurClass = $2; - nCurMask = 1; + nCurMask = SfxStyleItem::List; } ; @@ -472,12 +472,12 @@ property_definition // Variable anlegen Atom nId = pTC->aNmTb.Put( $3, VARNAME ); pCurClass->SetVariable( nId, $2, nullptr, $1, nCurMask ); - nCurMask <<= 1; + nCurMask = SfxStyleItem(((int)nCurMask) << 1); } | type_flags type VARNAME { pCurClass->SetVariable( $3, $2, nullptr, $1, nCurMask ); - nCurMask <<= 1; + nCurMask = SfxStyleItem(((int)nCurMask) << 1); } ; diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index c88cf082b664..5447270e649e 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -278,6 +278,16 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, return ERR_OK; } +ERRTYPE RscClass::SetVariable( Atom nVarName, + RscTop * pClass, + RSCINST * pDflt, + RSCVAR nVarType, + SfxStyleItem nMask, + Atom nDataBaseName) +{ + return SetVariable(nVarName, pClass, pDflt, nVarType, (sal_uInt32)nMask, nDataBaseName); +} + void RscClass::EnumVariables( void * pData, VarEnumCallbackProc pProc ) { sal_uInt32 i; diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx index 02ee9413632e..210e7c3f258a 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -102,6 +102,17 @@ ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, return ERR_UNKNOWN_METHOD; } +ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, + RSCINST * pDflt, RSCVAR nVarType, SfxStyleItem nMask, + Atom nDataBaseName ) +{ + if( pSuperClass ) + return pSuperClass->SetVariable( nVarName, pClass, pDflt, + nVarType, nMask, nDataBaseName ); + else + return ERR_UNKNOWN_METHOD; +} + void RscTop::EnumVariables( void * pData, VarEnumCallbackProc pProc ) { if( pSuperClass ) |