summaryrefslogtreecommitdiff
path: root/i18npool/inc/numberformatcode.hxx
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2016-10-11 08:39:41 +0200
committerAndras Timar <andras.timar@collabora.com>2016-10-11 08:39:41 +0200
commitbee4d76b85645bca795c6f15c322ccba9a7074e2 (patch)
tree25a1ed2553e2f10265443bef2ba8f97637ebcaa1 /i18npool/inc/numberformatcode.hxx
parent3a0ccdc336edb27d28a18da82979ccc707b6dc46 (diff)
Revert "tdf#53698: Cache more than 1 item in NumberFormatCodeMapper"
Diffstat (limited to 'i18npool/inc/numberformatcode.hxx')
-rw-r--r--i18npool/inc/numberformatcode.hxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/i18npool/inc/numberformatcode.hxx b/i18npool/inc/numberformatcode.hxx
index 48c64c24de70..9c7d78066d3e 100644
--- a/i18npool/inc/numberformatcode.hxx
+++ b/i18npool/inc/numberformatcode.hxx
@@ -29,9 +29,6 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <deque>
-#include <utility>
-
class NumberFormatCodeMapper : public cppu::WeakImplHelper
<
css::i18n::XNumberFormatCode,
@@ -58,15 +55,19 @@ public:
private:
osl::Mutex maMutex;
- css::uno::Reference < css::i18n::XLocaleData4 > m_xLocaleData;
- typedef std::pair< css::lang::Locale, css::uno::Sequence< css::i18n::FormatElement > > FormatElementCacheItem;
- std::deque < FormatElementCacheItem > m_aFormatElementCache;
+ css::lang::Locale aLocale;
+ css::uno::Reference < css::uno::XComponentContext > mxContext;
+ css::uno::Sequence< css::i18n::FormatElement > aFormatSeq;
+ css::uno::Reference < css::i18n::XLocaleData4 > mxLocaleData;
+ bool bFormatsValid;
- const css::uno::Sequence< css::i18n::FormatElement >& getFormats( const css::lang::Locale& rLocale );
+ void setupLocale( const css::lang::Locale& rLocale );
+ void getFormats( const css::lang::Locale& rLocale );
static OUString mapElementTypeShortToString(sal_Int16 formatType);
static sal_Int16 mapElementTypeStringToShort(const OUString& formatType);
static OUString mapElementUsageShortToString(sal_Int16 formatUsage);
static sal_Int16 mapElementUsageStringToShort(const OUString& formatUsage);
+ void createLocaleDataObject();
};