diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-24 00:27:51 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-05-02 19:48:30 +0200 |
commit | 4a4839d93111b90dd1da95be74c35709e0a9a9a2 (patch) | |
tree | e6bc1ee4d5069f6ce1971417497a5ea99e1bedeb /include | |
parent | 292e525d287d97868b06f37732079128ae0ee2fa (diff) |
don't allocate and destroy a LocaleDataItem for each cell, tdf#97989
Reviewed-on: https://gerrit.libreoffice.org/23480
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 7da3a53958695bfb1405fa513f71beddc6c0ecb7)
Change-Id: I8bcdc7a42c87d17fde1dc9c79bc361bb625f992b
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/localedatawrapper.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index d6448599e596..f2e767561c0b 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -28,6 +28,7 @@ #include <unotools/readwritemutexguard.hxx> #include <unotools/unotoolsdllapi.h> #include <memory> +#include <map> namespace com { namespace sun { namespace star { namespace uno { @@ -74,6 +75,11 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper bool bLocaleDataItemValid; bool bReservedWordValid; mutable ::utl::ReadWriteMutex aMutex; + struct Locale_Compare + { + bool operator()(const css::lang::Locale& rLocale1, const css::lang::Locale& rLocale2) const; + }; + mutable std::map<css::lang::Locale, css::i18n::LocaleDataItem, Locale_Compare> maDataItemCache; // dummies, to be implemented or provided by XML locale data sal_Unicode cCurrZeroChar; |