diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 13:23:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 16:46:37 +0000 |
commit | c4bce0078e175c10cb3bc9ea003e45bbce8c4ee3 (patch) | |
tree | abf68757098a226d36a354dd8f3519631f692e2f /scaddins | |
parent | 2141a4e07303d7a530987d84938a1e2a72672c5f (diff) |
unwind RID_DATE_DEFFUNCTION_NAMES local resource
Change-Id: I99ac46b89d2158d420e6458055cdeb5c6421f1ac
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/datefunc/datefunc.cxx | 8 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.hrc | 3 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.hxx | 18 | ||||
-rw-r--r-- | scaddins/source/datefunc/datefunc.src | 96 |
4 files changed, 50 insertions, 75 deletions
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index a801fafb7705..040af462ce26 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -70,11 +70,9 @@ ScaFuncData::ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rResMgr ) : bDouble( rBaseData.bDouble ), bWithOpt( rBaseData.bWithOpt ) { - ScaResStringArrLoader aArrLoader(RID_DATE_DEFFUNCTION_NAMES, rBaseData.nCompListID, rResMgr); - const ResStringArray& rArr = aArrLoader.GetStringArray(); - - for( sal_uInt32 nIndex = 0; nIndex < rArr.Count(); nIndex++ ) - aCompList.push_back( rArr.GetString( nIndex ) ); + ResStringArray aArr(ScaResId(rBaseData.nCompListID, rResMgr)); + for (sal_uInt32 nIndex = 0; nIndex < aArr.Count(); ++nIndex) + aCompList.push_back(aArr.GetString(nIndex)); } ScaFuncData::~ScaFuncData() diff --git a/scaddins/source/datefunc/datefunc.hrc b/scaddins/source/datefunc/datefunc.hrc index f0739e1b06d0..17597a7bad9a 100644 --- a/scaddins/source/datefunc/datefunc.hrc +++ b/scaddins/source/datefunc/datefunc.hrc @@ -24,7 +24,6 @@ #define RID_DATE_FUNCTION_DESCRIPTIONS DATE_RESOURCE_START #define RID_DATE_FUNCTION_NAMES (DATE_RESOURCE_START+1000) -#define RID_DATE_DEFFUNCTION_NAMES (DATE_RESOURCE_START+2000) #define DATE_FUNCDESC_START (RID_DATE_FUNCTION_DESCRIPTIONS+1) @@ -48,7 +47,7 @@ #define DATE_FUNCNAME_WeeksInYear (DATE_FUNCNAME_START+6) #define DATE_FUNCNAME_Rot13 (DATE_FUNCNAME_START+7) -#define DATE_DEFFUNCNAME_START (RID_DATE_DEFFUNCTION_NAMES+1) +#define DATE_DEFFUNCNAME_START (DATE_RESOURCE_START+2000) #define DATE_DEFFUNCNAME_DiffWeeks (DATE_DEFFUNCNAME_START) #define DATE_DEFFUNCNAME_DiffMonths (DATE_DEFFUNCNAME_START+1) diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx index 3e5de79e5e14..5f4b86f156a8 100644 --- a/scaddins/source/datefunc/datefunc.hxx +++ b/scaddins/source/datefunc/datefunc.hxx @@ -58,24 +58,6 @@ public: const OUString& GetString() const { return aStr; } }; -class ScaResStringArrLoader : public Resource -{ -private: - ResStringArray aStrArray; - -public: - inline ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt16 nArrayId, ResMgr& rResMgr ); - - inline const ResStringArray& GetStringArray() const { return aStrArray; } -}; - -inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt16 nArrayId, ResMgr& rResMgr ) : - Resource( ScaResId( nResId, rResMgr ) ), - aStrArray( ScaResId( nArrayId, rResMgr ) ) -{ - FreeResource(); -} - class ScaResPublisher : public Resource { public: diff --git a/scaddins/source/datefunc/datefunc.src b/scaddins/source/datefunc/datefunc.src index be54ec5940de..72ac5b641870 100644 --- a/scaddins/source/datefunc/datefunc.src +++ b/scaddins/source/datefunc/datefunc.src @@ -213,72 +213,68 @@ StringArray RID_DATE_FUNCTION_NAMES }; }; -Resource RID_DATE_DEFFUNCTION_NAMES +StringArray DATE_DEFFUNCNAME_DiffWeeks { - - StringArray DATE_DEFFUNCNAME_DiffWeeks + ItemList = { - ItemList = - { - < "WOCHEN"; >; - < "WEEKS"; >; - }; + < "WOCHEN"; >; + < "WEEKS"; >; }; - StringArray DATE_DEFFUNCNAME_DiffMonths +}; +StringArray DATE_DEFFUNCNAME_DiffMonths +{ + ItemList = { - ItemList = - { - < "MONATE"; >; - < "MONTHS"; >; - }; + < "MONATE"; >; + < "MONTHS"; >; }; - StringArray DATE_DEFFUNCNAME_DiffYears +}; +StringArray DATE_DEFFUNCNAME_DiffYears +{ + ItemList = { - ItemList = - { - < "JAHRE"; >; - < "YEARS"; >; - }; + < "JAHRE"; >; + < "YEARS"; >; }; - StringArray DATE_DEFFUNCNAME_IsLeapYear +}; +StringArray DATE_DEFFUNCNAME_IsLeapYear +{ + ItemList = { - ItemList = - { - < "ISTSCHALTJAHR"; >; - < "ISLEAPYEAR"; >; - }; + < "ISTSCHALTJAHR"; >; + < "ISLEAPYEAR"; >; }; - StringArray DATE_DEFFUNCNAME_DaysInMonth +}; +StringArray DATE_DEFFUNCNAME_DaysInMonth +{ + ItemList = { - ItemList = - { - < "TAGEIMMONAT"; >; - < "DAYSINMONTH"; >; - }; + < "TAGEIMMONAT"; >; + < "DAYSINMONTH"; >; }; - StringArray DATE_DEFFUNCNAME_DaysInYear +}; +StringArray DATE_DEFFUNCNAME_DaysInYear +{ + ItemList = { - ItemList = - { - < "TAGEIMJAHR"; >; - < "DAYSINYEAR"; >; - }; + < "TAGEIMJAHR"; >; + < "DAYSINYEAR"; >; }; - StringArray DATE_DEFFUNCNAME_WeeksInYear +}; +StringArray DATE_DEFFUNCNAME_WeeksInYear +{ + ItemList = { - ItemList = - { - < "WOCHENIMJAHR"; >; - < "WEEKSINYEAR"; >; - }; + < "WOCHENIMJAHR"; >; + < "WEEKSINYEAR"; >; }; - StringArray DATE_DEFFUNCNAME_Rot13 +}; +StringArray DATE_DEFFUNCNAME_Rot13 +{ + ItemList = { - ItemList = - { - < "ROT13"; >; - < "ROT13"; >; - }; + < "ROT13"; >; + < "ROT13"; >; }; }; |