include/rsc/rscsfx.hxx | 6 ++++-- rsc/inc/rscclass.hxx | 4 ++++ rsc/inc/rsctop.hxx | 5 +++++ rsc/source/parser/rscicpx.cxx | 4 ++-- rsc/source/res/rscclass.cxx | 10 ++++++++++ rsc/source/res/rsctop.cxx | 11 +++++++++++ 6 files changed, 36 insertions(+), 4 deletions(-)
New commits: commit b55b7a057f19521ad88fc6a274fcf071b798eb3e Author: Noel Grandin <noelgran...@gmail.com> Date: Sun May 8 08:25:00 2016 +0200 convert SFX_SLOT_INFO to scoped enum Change-Id: Ib640fc2cfce23bf8ce92ec1549034078123c06aa Reviewed-on: https://gerrit.libreoffice.org/24752 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx index a3a6304..837187a 100644 --- a/include/rsc/rscsfx.hxx +++ b/include/rsc/rscsfx.hxx @@ -50,8 +50,10 @@ enum class SfxStyleItem { // SfxSlotInfo -#define RSC_SFX_SLOT_INFO_SLOTNAME 0x1 -#define RSC_SFX_SLOT_INFO_HELPTEXT 0x2 +enum class SfxSlotInfo { + SlotName = 0x1, + HelpText = 0x2 +}; #endif diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx index 9764230..870a0ee 100644 --- a/rsc/inc/rscclass.hxx +++ b/rsc/inc/rscclass.hxx @@ -68,6 +68,10 @@ public: Atom nDataBaseName ) override; ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, RSCINST * pDflt, + RSCVAR nVarType, SfxSlotInfo nMask, + Atom nDataBaseName ) override; + ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, + RSCINST * pDflt, RSCVAR nVarType, sal_uInt32 nMask, Atom nDataBaseName ) override; virtual void EnumVariables( void * pData, VarEnumCallbackProc ) override; diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx index 1c3c739..59e4e07 100644 --- a/rsc/inc/rsctop.hxx +++ b/rsc/inc/rsctop.hxx @@ -87,6 +87,11 @@ public: Atom nDataBaseName = InvalidAtom ); virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, + RSCINST * pDflt, + RSCVAR nVarType, SfxSlotInfo nMask, + Atom nDataBaseName = InvalidAtom ); + + virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, RSCINST * pDflt = nullptr, RSCVAR nVarType = 0, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 0582b76..e11f08a 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -1367,10 +1367,10 @@ RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper ) nId = aNmTb.Put( "SlotName", VARNAME ); pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, - RSC_SFX_SLOT_INFO_SLOTNAME ); + SfxSlotInfo::SlotName ); nId = aNmTb.Put( "HelpText", VARNAME ); pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, - RSC_SFX_SLOT_INFO_HELPTEXT ); + SfxSlotInfo::HelpText ); return pClassSfxSlotInfo; } diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index 5447270..27500f6 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -288,6 +288,16 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, return SetVariable(nVarName, pClass, pDflt, nVarType, (sal_uInt32)nMask, nDataBaseName); } +ERRTYPE RscClass::SetVariable( Atom nVarName, + RscTop * pClass, + RSCINST * pDflt, + RSCVAR nVarType, + SfxSlotInfo 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 210e7c3..04cc8a6 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -113,6 +113,17 @@ ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, return ERR_UNKNOWN_METHOD; } +ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass, + RSCINST * pDflt, RSCVAR nVarType, SfxSlotInfo 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits