diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-16 10:45:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-16 10:45:59 +0200 |
commit | b4f2af4bb8d060423b3c50a7026e5045ff64c432 (patch) | |
tree | cc66df2f4b858ebbfff0e5999b643f07e098c9bd /svl | |
parent | 2de168e99ba9cd2539f1ddbeffad7e3eb71a7b1b (diff) |
loplugin:stringstatic
Change-Id: Icb05f681aa549a975ae4a1dee749e20ad4a215f0
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index d0a462e90d85..3642e91b0a56 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -26,7 +26,6 @@ #include <unotools/charclass.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/numberformatcodewrapper.hxx> -#include <rtl/instance.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> @@ -40,34 +39,6 @@ using namespace svt; const sal_Unicode cNoBreakSpace = 0xA0; const sal_Unicode cNarrowNoBreakSpace = 0x202F; -namespace -{ - struct ImplEnglishColors - { - const OUString* operator()() - { - static const OUString aEnglishColors[NF_MAX_DEFAULT_COLORS] = - { - OUString( "BLACK" ), - OUString( "BLUE" ), - OUString( "GREEN" ), - OUString( "CYAN" ), - OUString( "RED" ), - OUString( "MAGENTA" ), - OUString( "BROWN" ), - OUString( "GREY" ), - OUString( "YELLOW" ), - OUString( "WHITE" ) - }; - return &aEnglishColors[0]; - } - }; - - struct theEnglishColors - : public rtl::StaticAggregate< const OUString, ImplEnglishColors> {}; - -} - ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP ) : eNewLnge(LANGUAGE_DONTKNOW) , eTmpLnge(LANGUAGE_DONTKNOW) @@ -470,7 +441,18 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr) } if ( i >= NF_MAX_DEFAULT_COLORS ) { - const OUString* pEnglishColors = theEnglishColors::get(); + static OUStringLiteral const pEnglishColors[NF_MAX_DEFAULT_COLORS] = { + OUStringLiteral( "BLACK" ), + OUStringLiteral( "BLUE" ), + OUStringLiteral( "GREEN" ), + OUStringLiteral( "CYAN" ), + OUStringLiteral( "RED" ), + OUStringLiteral( "MAGENTA" ), + OUStringLiteral( "BROWN" ), + OUStringLiteral( "GREY" ), + OUStringLiteral( "YELLOW" ), + OUStringLiteral( "WHITE" ) + }; size_t j = 0; while ( j < NF_MAX_DEFAULT_COLORS && sString != pEnglishColors[j] ) { |