summaryrefslogtreecommitdiff
path: root/scaddins/source
diff options
context:
space:
mode:
Diffstat (limited to 'scaddins/source')
-rw-r--r--scaddins/source/datefunc/datefunc.cxx2
-rw-r--r--scaddins/source/datefunc/datefunc.hrc3
-rw-r--r--scaddins/source/datefunc/datefunc.hxx15
-rw-r--r--scaddins/source/datefunc/datefunc.src49
4 files changed, 39 insertions, 30 deletions
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index 040af462ce26..1a3e58cd6d6a 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -273,7 +273,7 @@ OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgram
FindScaFuncData( aProgrammaticName ) );
if( fDataIt != pFuncDataList->end() )
{
- aRet = ScaResStringLoader( RID_DATE_FUNCTION_NAMES, fDataIt->GetUINameID(), GetResMgr() ).GetString();
+ aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()).toString();
if( fDataIt->IsDouble() )
aRet += "_ADD";
}
diff --git a/scaddins/source/datefunc/datefunc.hrc b/scaddins/source/datefunc/datefunc.hrc
index 17597a7bad9a..9cc62da6d0fb 100644
--- a/scaddins/source/datefunc/datefunc.hrc
+++ b/scaddins/source/datefunc/datefunc.hrc
@@ -23,7 +23,6 @@
#define DATE_RESOURCE_START 1000
#define RID_DATE_FUNCTION_DESCRIPTIONS DATE_RESOURCE_START
-#define RID_DATE_FUNCTION_NAMES (DATE_RESOURCE_START+1000)
#define DATE_FUNCDESC_START (RID_DATE_FUNCTION_DESCRIPTIONS+1)
@@ -36,7 +35,7 @@
#define DATE_FUNCDESC_WeeksInYear (DATE_FUNCDESC_START+6)
#define DATE_FUNCDESC_Rot13 (DATE_FUNCDESC_START+7)
-#define DATE_FUNCNAME_START (RID_DATE_FUNCTION_NAMES+1)
+#define DATE_FUNCNAME_START (DATE_RESOURCE_START+1000)
#define DATE_FUNCNAME_DiffWeeks (DATE_FUNCNAME_START)
#define DATE_FUNCNAME_DiffMonths (DATE_FUNCNAME_START+1)
diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx
index 5f4b86f156a8..f842b9274f41 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -43,21 +43,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/datefunc/datefunc.src b/scaddins/source/datefunc/datefunc.src
index 72ac5b641870..939b4465850e 100644
--- a/scaddins/source/datefunc/datefunc.src
+++ b/scaddins/source/datefunc/datefunc.src
@@ -198,19 +198,44 @@ Resource RID_DATE_FUNCTION_DESCRIPTIONS
};
};
-StringArray RID_DATE_FUNCTION_NAMES
+String DATE_FUNCNAME_DiffWeeks
{
- ItemList [ en-US ] =
- {
- < "WEEKS" ; DATE_FUNCNAME_DiffWeeks ; >;
- < "MONTHS" ; DATE_FUNCNAME_DiffMonths ; >;
- < "YEARS" ; DATE_FUNCNAME_DiffYears ; >;
- < "ISLEAPYEAR" ; DATE_FUNCNAME_IsLeapYear ; >;
- < "DAYSINMONTH" ; DATE_FUNCNAME_DaysInMonth ; >;
- < "DAYSINYEAR" ; DATE_FUNCNAME_DaysInYear ; >;
- < "WEEKSINYEAR" ; DATE_FUNCNAME_WeeksInYear ; >;
- < "ROT13" ; DATE_FUNCNAME_Rot13 ; >;
- };
+ Text [ en-US ] = "WEEKS";
+};
+
+String DATE_FUNCNAME_DiffMonths
+{
+ Text [ en-US ] = "MONTHS";
+};
+
+String DATE_FUNCNAME_DiffYears
+{
+ Text [ en-US ] = "YEARS";
+};
+
+String DATE_FUNCNAME_IsLeapYear
+{
+ Text [ en-US ] = "ISLEAPYEAR";
+};
+
+String DATE_FUNCNAME_DaysInMonth
+{
+ Text [ en-US ] = "DAYSINMONTH";
+};
+
+String DATE_FUNCNAME_DaysInYear
+{
+ Text [ en-US ] = "DAYSINYEAR";
+};
+
+String DATE_FUNCNAME_WeeksInYear
+{
+ Text [ en-US ] = "WEEKSINYEAR";
+};
+
+String DATE_FUNCNAME_Rot13
+{
+ Text [ en-US ] = "ROT13";
};
StringArray DATE_DEFFUNCNAME_DiffWeeks