[Libreoffice-commits] core.git: sw/inc sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Mon Jul 15 07:54:02 PDT 2013
sw/inc/fldbas.hxx | 2 --
sw/source/core/fields/fldbas.cxx | 7 ++++++-
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 02c1f4128b2011ceea6e4a0ceb054ec74315ec54
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sun Jun 23 23:46:05 2013 +0200
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 at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 06e3f80..53ab826 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -218,8 +218,6 @@ enum SwDateTimeSubType
};
-extern sal_uInt16 aTypeTab[];
-
/// General tools.
String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
void SetErrorStr(const String& rStr);
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index d6bdb92..524e185 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 )
More information about the Libreoffice-commits
mailing list