Reduce scope of global array and make in constant
Change-Id: I914aff27234e3acede7ae6ade72530dc0fea9dc9 Reviewed-on: https://gerrit.libreoffice.org/4922 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
committed by
Björn Michaelsen
parent
5f3d88a1f1
commit
02c1f4128b
@@ -218,8 +218,6 @@ enum SwDateTimeSubType
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern sal_uInt16 aTypeTab[];
|
|
||||||
|
|
||||||
/// General tools.
|
/// General tools.
|
||||||
String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
|
String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
|
||||||
void SetErrorStr(const String& rStr);
|
void SetErrorStr(const String& rStr);
|
||||||
|
@@ -70,7 +70,10 @@ static sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
|
|||||||
/// field names
|
/// field names
|
||||||
std::vector<String>* SwFieldType::pFldNames = 0;
|
std::vector<String>* SwFieldType::pFldNames = 0;
|
||||||
|
|
||||||
sal_uInt16 aTypeTab[] = {
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
const sal_uInt16 aTypeTab[] = {
|
||||||
/* RES_DBFLD */ TYP_DBFLD,
|
/* RES_DBFLD */ TYP_DBFLD,
|
||||||
/* RES_USERFLD */ TYP_USERFLD,
|
/* RES_USERFLD */ TYP_USERFLD,
|
||||||
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
|
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
|
||||||
@@ -113,6 +116,8 @@ std::vector<String>* SwFieldType::pFldNames = 0;
|
|||||||
/* RES_DROPDOWN */ TYP_DROPDOWN
|
/* RES_DROPDOWN */ TYP_DROPDOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
|
const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
|
||||||
{
|
{
|
||||||
if( !pFldNames )
|
if( !pFldNames )
|
||||||
|
Reference in New Issue
Block a user