summaryrefslogtreecommitdiff
path: root/scaddins/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-14 13:56:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-14 16:46:37 +0000
commitb1f7c093a26cc66425bb234d24256012df0d03fd (patch)
tree2024a6201a778cfd56b661c1e264ebb7d46b4f82 /scaddins/source
parent83d062b710c507595c1284f710509aa16c75af86 (diff)
unwind RID_PRICING_FUNCTION_NAMES local resource
Change-Id: I3da1caed4b6c91acdabe16d98e6d43bf5dc32247
Diffstat (limited to 'scaddins/source')
-rw-r--r--scaddins/source/pricing/pricing.cxx2
-rw-r--r--scaddins/source/pricing/pricing.hrc3
-rw-r--r--scaddins/source/pricing/pricing.hxx16
-rw-r--r--scaddins/source/pricing/pricing.src26
4 files changed, 20 insertions, 27 deletions
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index d93d80e30748..38c391039d98 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -292,7 +292,7 @@ OUString SAL_CALL ScaPricingAddIn::getDisplayFunctionName( const OUString& aProg
FindScaFuncData( aProgrammaticName ) );
if(fDataIt != pFuncDataList->end() )
{
- aRet = ScaResStringLoader( RID_PRICING_FUNCTION_NAMES, fDataIt->GetUINameID(), GetResMgr() ).GetString();
+ aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()).toString();
if( fDataIt->IsDouble() )
aRet += "_ADD";
}
diff --git a/scaddins/source/pricing/pricing.hrc b/scaddins/source/pricing/pricing.hrc
index 6c371d1729a4..adcfe7521b4f 100644
--- a/scaddins/source/pricing/pricing.hrc
+++ b/scaddins/source/pricing/pricing.hrc
@@ -23,7 +23,6 @@
#define PRICING_RESOURCE_START 1000
#define RID_PRICING_FUNCTION_DESCRIPTIONS PRICING_RESOURCE_START
-#define RID_PRICING_FUNCTION_NAMES (PRICING_RESOURCE_START+1000)
#define PRICING_FUNCDESC_START (RID_PRICING_FUNCTION_DESCRIPTIONS+1)
@@ -32,7 +31,7 @@
#define PRICING_FUNCDESC_OptProbHit (PRICING_FUNCDESC_START+2)
#define PRICING_FUNCDESC_OptProbInMoney (PRICING_FUNCDESC_START+3)
-#define PRICING_FUNCNAME_START (RID_PRICING_FUNCTION_NAMES+1)
+#define PRICING_FUNCNAME_START (PRICING_RESOURCE_START+1000)
#define PRICING_FUNCNAME_OptBarrier (PRICING_FUNCNAME_START)
#define PRICING_FUNCNAME_OptTouch (PRICING_FUNCNAME_START+1)
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index de37c1a68aed..fb38115b9b0f 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -53,22 +53,6 @@ public:
ScaResId( sal_uInt16 nResId, ResMgr& rResMgr );
};
-class ScaResStringLoader
-{
-private:
- OUString aStr;
-
-public:
- ScaResStringLoader(sal_uInt16 nResId, sal_uInt16 nStrId, ResMgr& rResMgr)
- {
- ResStringArray aStrArray(ScaResId(nResId, rResMgr));
- aStr = aStrArray.GetString(aStrArray.FindIndex(nStrId));
- }
-
- const OUString& GetString() const { return aStr; }
-
-};
-
class ScaResPublisher : public Resource
{
public:
diff --git a/scaddins/source/pricing/pricing.src b/scaddins/source/pricing/pricing.src
index 1149376e44e1..8fd4e68d07a2 100644
--- a/scaddins/source/pricing/pricing.src
+++ b/scaddins/source/pricing/pricing.src
@@ -399,15 +399,25 @@ Resource RID_PRICING_FUNCTION_DESCRIPTIONS
};
// function names as accessible from cells
-StringArray RID_PRICING_FUNCTION_NAMES
+
+String PRICING_FUNCNAME_OptBarrier
{
- ItemList [ en-US ] =
- {
- < "OPT_BARRIER"; PRICING_FUNCNAME_OptBarrier ; >;
- < "OPT_TOUCH"; PRICING_FUNCNAME_OptTouch ; >;
- < "OPT_PROB_HIT"; PRICING_FUNCNAME_OptProbHit ; >;
- < "OPT_PROB_INMONEY"; PRICING_FUNCNAME_OptProbInMoney ; >;
- };
+ Text [ en-US ] = "OPT_BARRIER";
+};
+
+String PRICING_FUNCNAME_OptTouch
+{
+ Text [ en-US ] = "OPT_TOUCH";
+};
+
+String PRICING_FUNCNAME_OptProbHit
+{
+ Text [ en-US ] = "OPT_PROB_HIT";
+};
+
+String PRICING_FUNCNAME_OptProbInMoney
+{
+ Text [ en-US ] = "OPT_PROB_INMONEY";
};
// These were originally meant to be able to load Excel documents that for