summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent BP <laurent.balland-poirier@laposte.net>2017-10-22 12:04:53 +0200
committerEike Rathke <erack@redhat.com>2017-10-23 13:12:50 +0200
commit1f053cd0d6a9ea43d0037fadf9976a178936c518 (patch)
treed8dcc3ef06a603d728f12f4ca42f33c490abca84
parented57f47cdf1cb815df898c6ae63aa6db6d992fd3 (diff)
tdf#33689 Make sEnglishKeyword static member
For QA test, we need to access sEnglishKeyword Change-Id: Ib277204de14bc9268a5f3c825c3c7b3e61acbbc0 Reviewed-on: https://gerrit.libreoffice.org/43689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--include/svl/zformat.hxx3
-rw-r--r--svl/source/numbers/zformat.cxx9
-rw-r--r--svl/source/numbers/zforscan.cxx6
-rw-r--r--svl/source/numbers/zforscan.hxx5
4 files changed, 19 insertions, 4 deletions
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index f3f11b97022f..a5ceeeac2e64 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -475,6 +475,9 @@ public:
return false;
}
+ const NfKeywordTable & GetKeywords() const;
+ const ::std::vector<OUString> & GetEnglishKeywords() const;
+
private:
ImpSvNumFor NumFor[4]; // Array for the 4 subformats
OUString sFormatstring; // The format code string
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 116b5e668df5..9d2700e6a185 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5537,4 +5537,13 @@ const SvNumberFormatter& SvNumberformat::GetFormatter() const
return *rScan.GetNumberformatter();
}
+const NfKeywordTable & SvNumberformat::GetKeywords() const
+{
+ return rScan.GetKeywords();
+}
+const ::std::vector<OUString> & SvNumberformat::GetEnglishKeywords() const
+{
+ return ImpSvNumberformatScan::GetEnglishKeywords();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index a3cdd1edc2ef..d4991fad3c57 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -38,9 +38,8 @@ using namespace svt;
const sal_Unicode cNoBreakSpace = 0xA0;
const sal_Unicode cNarrowNoBreakSpace = 0x202F;
-namespace
-{
-const ::std::vector<OUString> sEnglishKeyword =
+
+const ::std::vector<OUString> ImpSvNumberformatScan::sEnglishKeyword =
{ // Syntax keywords in English (USA)
//! All keywords MUST be UPPERCASE! In same order as NfKeywordTable
"", // NF_KEY_NONE 0
@@ -101,7 +100,6 @@ const ::std::vector<OUString> sEnglishKeyword =
"RR", // NF_KEY_RR
"t" // NF_KEY_THAI_T Thai T modifier, speciality of Thai Excel, only used with Thai locale and converted to [NatNum1]
}; // only exception as lowercase
-}
ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
: maNullDate( 30, 12, 1899)
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index c5e9d8549349..ed3e15feb2db 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -65,6 +65,10 @@ public:
}
return sKeyword;
}
+ static const ::std::vector<OUString> & GetEnglishKeywords()
+ {
+ return sEnglishKeyword;
+ }
// Keywords used in output like true and false
const OUString& GetSpecialKeyword( NfKeywordIndex eIdx ) const
{
@@ -149,6 +153,7 @@ public:
private: // Private section
NfKeywordTable sKeyword; // Syntax keywords
+ static const ::std::vector<OUString> sEnglishKeyword; // English Syntax keywords
Color StandardColor[NF_MAX_DEFAULT_COLORS]; // Standard color array
Date maNullDate; // 30Dec1899
OUString sNameStandardFormat; // "Standard"