diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 13:19:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-14 16:46:37 +0000 |
commit | 2141a4e07303d7a530987d84938a1e2a72672c5f (patch) | |
tree | f3c9d7edc15612f3b59ea204e9954c20339544c8 /scaddins/source | |
parent | 3f5392c19676a7274a9c9f6e4406c6ab98eab7ad (diff) |
unwind RID_PRICING_DEFFUNCTION_NAMES local resource
Change-Id: I9834795ef873e1ffb6cb1abc092a8333f9373e32
Diffstat (limited to 'scaddins/source')
-rw-r--r-- | scaddins/source/pricing/pricing.cxx | 8 | ||||
-rw-r--r-- | scaddins/source/pricing/pricing.hrc | 3 | ||||
-rw-r--r-- | scaddins/source/pricing/pricing.hxx | 18 | ||||
-rw-r--r-- | scaddins/source/pricing/pricing.src | 39 |
4 files changed, 22 insertions, 46 deletions
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx index 9f9c543c77ab..d93d80e30748 100644 --- a/scaddins/source/pricing/pricing.cxx +++ b/scaddins/source/pricing/pricing.cxx @@ -75,11 +75,9 @@ ScaFuncData::ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rResMgr ) : bDouble( rBaseData.bDouble ), bWithOpt( rBaseData.bWithOpt ) { - ScaResStringArrLoader aArrLoader(RID_PRICING_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/pricing/pricing.hrc b/scaddins/source/pricing/pricing.hrc index 1c43e04a76a2..6c371d1729a4 100644 --- a/scaddins/source/pricing/pricing.hrc +++ b/scaddins/source/pricing/pricing.hrc @@ -24,7 +24,6 @@ #define RID_PRICING_FUNCTION_DESCRIPTIONS PRICING_RESOURCE_START #define RID_PRICING_FUNCTION_NAMES (PRICING_RESOURCE_START+1000) -#define RID_PRICING_DEFFUNCTION_NAMES (PRICING_RESOURCE_START+2000) #define PRICING_FUNCDESC_START (RID_PRICING_FUNCTION_DESCRIPTIONS+1) @@ -40,7 +39,7 @@ #define PRICING_FUNCNAME_OptProbHit (PRICING_FUNCNAME_START+2) #define PRICING_FUNCNAME_OptProbInMoney (PRICING_FUNCNAME_START+3) -#define PRICING_DEFFUNCNAME_START (RID_PRICING_DEFFUNCTION_NAMES+1) +#define PRICING_DEFFUNCNAME_START (PRICING_RESOURCE_START+2000) #define PRICING_DEFFUNCNAME_OptBarrier (PRICING_DEFFUNCNAME_START) #define PRICING_DEFFUNCNAME_OptTouch (PRICING_DEFFUNCNAME_START+1) diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx index b9c4a23b6288..de37c1a68aed 100644 --- a/scaddins/source/pricing/pricing.hxx +++ b/scaddins/source/pricing/pricing.hxx @@ -69,24 +69,6 @@ public: }; -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/pricing/pricing.src b/scaddins/source/pricing/pricing.src index 17299da27b0d..1149376e44e1 100644 --- a/scaddins/source/pricing/pricing.src +++ b/scaddins/source/pricing/pricing.src @@ -415,38 +415,35 @@ StringArray RID_PRICING_FUNCTION_NAMES // This is not relevant to this add-in, so we only supply the same // (English) function names again. // see also: GetExcelName() or GetCompNames() or getCompatibilityNames() -Resource RID_PRICING_DEFFUNCTION_NAMES +StringArray PRICING_DEFFUNCNAME_OptBarrier { - StringArray PRICING_DEFFUNCNAME_OptBarrier + ItemList = { - ItemList = - { - < "OPT_BARRIER"; >; - }; + < "OPT_BARRIER"; >; }; +}; - StringArray PRICING_DEFFUNCNAME_OptTouch +StringArray PRICING_DEFFUNCNAME_OptTouch +{ + ItemList = { - ItemList = - { - < "OPT_TOUCH"; >; - }; + < "OPT_TOUCH"; >; }; +}; - StringArray PRICING_DEFFUNCNAME_OptProbHit +StringArray PRICING_DEFFUNCNAME_OptProbHit +{ + ItemList = { - ItemList = - { - < "OPT_PROB_HIT"; >; - }; + < "OPT_PROB_HIT"; >; }; +}; - StringArray PRICING_DEFFUNCNAME_OptProbInMoney +StringArray PRICING_DEFFUNCNAME_OptProbInMoney +{ + ItemList = { - ItemList = - { - < "OPT_PROB_INMONEY"; >; - }; + < "OPT_PROB_INMONEY"; >; }; }; |