unwind RID_ANALYSIS_DEFFUNCTION_NAMES local resource

Change-Id: I65ce69460b6c5f73fd41345f55630d0fcf5c04a4
This commit is contained in:
Caolán McNamara 2017-02-14 16:26:11 +00:00
parent 288ca353a8
commit 5401ccd65d
3 changed files with 610 additions and 633 deletions

View File

@ -21,8 +21,6 @@
#define ANALYSIS_RESOURCE_START 1000
#define RID_ANALYSIS_DEFFUNCTION_NAMES (ANALYSIS_RESOURCE_START+3000)
#define ANALYSIS_FUNCDESC_START (ANALYSIS_RESOURCE_START)
#define ANALYSIS_Workday (ANALYSIS_FUNCDESC_START)
@ -231,7 +229,7 @@
#define ANALYSIS_FUNCNAME_Imsech (ANALYSIS_FUNCNAME_START+99)
#define ANALYSIS_FUNCNAME_Imcsch (ANALYSIS_FUNCNAME_START+100)
#define ANALYSIS_DEFFUNCNAME_START (RID_ANALYSIS_DEFFUNCTION_NAMES+1)
#define ANALYSIS_DEFFUNCNAME_START (ANALYSIS_RESOURCE_START+3000)
#define ANALYSIS_DEFFUNCNAME_Workday (ANALYSIS_DEFFUNCNAME_START)
#define ANALYSIS_DEFFUNCNAME_Yearfrac (ANALYSIS_DEFFUNCNAME_START+1)

File diff suppressed because it is too large Load Diff

View File

@ -1372,22 +1372,6 @@ double GetCoupnum( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int32 nMat, sal_I
return static_cast< double >( nMonths * nFreq / 12 );
}
class AnalysisRscStrArrLoader : public Resource
{
private:
ResStringArray aStrArray;
public:
AnalysisRscStrArrLoader( sal_uInt16 nRsc, sal_uInt16 nArrayId, ResMgr& rResMgr ) :
Resource( AnalysisResId( nRsc, rResMgr ) ),
aStrArray( AnalysisResId( nArrayId, rResMgr ) )
{
FreeResource();
}
const ResStringArray& GetStringArray() const { return aStrArray; }
};
FuncData::FuncData( const FuncDataBase& r, ResMgr& rResMgr ) :
aIntName( OUString::createFromAscii( r.pIntName ) ),
nUINameID( r.nUINameID ),
@ -1400,14 +1384,13 @@ FuncData::FuncData( const FuncDataBase& r, ResMgr& rResMgr ) :
if (r.pSuffix)
aSuffix = OUString::createFromAscii( r.pSuffix);
AnalysisRscStrArrLoader aArrLoader(RID_ANALYSIS_DEFFUNCTION_NAMES, r.nCompListID, rResMgr);
const ResStringArray& rArr = aArrLoader.GetStringArray();
ResStringArray aArr(AnalysisResId(r.nCompListID, rResMgr));
sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( rArr.Count() );
sal_uInt32 nCount = aArr.Count();
aCompList.resize( nCount );
for( sal_uInt16 n = 0 ; n < nCount ; n++ )
aCompList[n] = rArr.GetString( n );
aCompList.resize(nCount);
for(sal_uInt32 n = 0 ; n < nCount; ++n)
aCompList[n] = aArr.GetString( n );
}
FuncData::~FuncData()