diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-06-23 23:46:05 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2013-07-15 14:53:40 +0000 |
commit | 02c1f4128b2011ceea6e4a0ceb054ec74315ec54 (patch) | |
tree | 18537bd4712e10b83dec291a7c03b9b03b9b8ef9 /sw/source | |
parent | 5f3d88a1f151e12061421751831b5588495199bb (diff) |
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>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/fields/fldbas.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index d6bdb926b147..524e1855774a 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -70,7 +70,10 @@ static sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt, /// field names std::vector<String>* SwFieldType::pFldNames = 0; - sal_uInt16 aTypeTab[] = { +namespace +{ + + const sal_uInt16 aTypeTab[] = { /* RES_DBFLD */ TYP_DBFLD, /* RES_USERFLD */ TYP_USERFLD, /* RES_FILENAMEFLD */ TYP_FILENAMEFLD, @@ -113,6 +116,8 @@ std::vector<String>* SwFieldType::pFldNames = 0; /* RES_DROPDOWN */ TYP_DROPDOWN }; +} + const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId) { if( !pFldNames ) |