unwind RID_DATE_DEFFUNCTION_NAMES local resource

Change-Id: I99ac46b89d2158d420e6458055cdeb5c6421f1ac
This commit is contained in:
Caolán McNamara
2017-02-14 13:23:57 +00:00
parent 2141a4e073
commit c4bce0078e
4 changed files with 50 additions and 75 deletions

View File

@@ -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()

View File

@@ -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)

View File

@@ -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:

View File

@@ -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"; >;
};
};