From 1f053cd0d6a9ea43d0037fadf9976a178936c518 Mon Sep 17 00:00:00 2001 From: Laurent BP Date: Sun, 22 Oct 2017 12:04:53 +0200 Subject: 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 Reviewed-by: Eike Rathke --- include/svl/zformat.hxx | 3 +++ svl/source/numbers/zformat.cxx | 9 +++++++++ svl/source/numbers/zforscan.cxx | 6 ++---- svl/source/numbers/zforscan.hxx | 5 +++++ 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 & 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 & 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 sEnglishKeyword = + +const ::std::vector 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 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 & 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 sEnglishKeyword; // English Syntax keywords Color StandardColor[NF_MAX_DEFAULT_COLORS]; // Standard color array Date maNullDate; // 30Dec1899 OUString sNameStandardFormat; // "Standard" -- cgit