replace localresource of strings and keys with StringArray
Change-Id: I369de4213c4cb38013b984d1c2784ad68e25793c
This commit is contained in:
parent
99d35740a1
commit
60933220b2
@ -29,6 +29,7 @@
|
|||||||
#include <svl/zforlist.hxx>
|
#include <svl/zforlist.hxx>
|
||||||
#include <tools/rc.hxx>
|
#include <tools/rc.hxx>
|
||||||
#include <tools/rcid.h>
|
#include <tools/rcid.h>
|
||||||
|
#include <tools/resary.hxx>
|
||||||
#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
|
#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
|
||||||
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
|
#include <com/sun/star/sheet/FormulaMapGroup.hpp>
|
||||||
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
|
#include <com/sun/star/sheet/FormulaMapGroupSpecialOffset.hpp>
|
||||||
@ -141,7 +142,7 @@ void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVe
|
|||||||
lclPushOpCodeMapEntry( rVec, pTable, *pnOpCodes );
|
lclPushOpCodeMapEntry( rVec, pTable, *pnOpCodes );
|
||||||
}
|
}
|
||||||
|
|
||||||
class OpCodeList : public Resource // temp object for resource
|
class OpCodeList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -154,12 +155,13 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
FormulaCompiler::SeparatorType meSepType;
|
FormulaCompiler::SeparatorType meSepType;
|
||||||
|
ResStringArray maStringList;
|
||||||
};
|
};
|
||||||
|
|
||||||
OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap,
|
OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap,
|
||||||
FormulaCompiler::SeparatorType eSepType ) :
|
FormulaCompiler::SeparatorType eSepType )
|
||||||
Resource( ResId( nRID, *ResourceManager::getResManager()))
|
: meSepType(eSepType)
|
||||||
, meSepType( eSepType)
|
, maStringList(ResId(nRID, *ResourceManager::getResManager()))
|
||||||
{
|
{
|
||||||
SvtSysLocale aSysLocale;
|
SvtSysLocale aSysLocale;
|
||||||
const CharClass* pCharClass = (xMap->isEnglish() ? nullptr : aSysLocale.GetCharClassPtr());
|
const CharClass* pCharClass = (xMap->isEnglish() ? nullptr : aSysLocale.GetCharClassPtr());
|
||||||
@ -181,8 +183,6 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x
|
|||||||
putDefaultOpCode( xMap, i, pCharClass);
|
putDefaultOpCode( xMap, i, pCharClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeResource();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp )
|
bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp )
|
||||||
@ -239,10 +239,9 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp )
|
|||||||
void OpCodeList::putDefaultOpCode( const FormulaCompiler::NonConstOpCodeMapPtr& xMap, sal_uInt16 nOp,
|
void OpCodeList::putDefaultOpCode( const FormulaCompiler::NonConstOpCodeMapPtr& xMap, sal_uInt16 nOp,
|
||||||
const CharClass* pCharClass )
|
const CharClass* pCharClass )
|
||||||
{
|
{
|
||||||
ResId aRes( nOp, *ResourceManager::getResManager());
|
sal_uInt32 nIndex = maStringList.FindIndex(nOp);
|
||||||
aRes.SetRT( RSC_STRING);
|
if (nIndex != RESARRAY_INDEX_NOTFOUND)
|
||||||
if (IsAvailableRes( aRes))
|
xMap->putOpCode(maStringList.GetString(nIndex), OpCode(nOp), pCharClass);
|
||||||
xMap->putOpCode( aRes.toString(), OpCode( nOp), pCharClass);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user