diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-06-11 04:48:08 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-06-11 04:48:08 +0000 |
commit | f46dbfe9115bc47c4e90b4d652410f8ee3d4a93a (patch) | |
tree | fc8435f9d9afadbb6b29cd68c4d1da78834ee33e /sc/source/filter/xml/XMLStylesImportHelper.hxx | |
parent | 7f75f35d705165dc35904b78a5e2160bfb5210d7 (diff) |
#79771#; make the SetType method faster while using the NumberFormat getting from the style and no longer from the propertyset
Diffstat (limited to 'sc/source/filter/xml/XMLStylesImportHelper.hxx')
-rw-r--r-- | sc/source/filter/xml/XMLStylesImportHelper.hxx | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index 082e71a13c6b..2d17e31ed5c9 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLStylesImportHelper.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: sab $ $Date: 2001-05-11 07:43:39 $ + * last change: $Author: sab $ $Date: 2001-06-11 05:48:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,6 +86,37 @@ class ScXMLImport; +struct ScMyStyleNumberFormat +{ + rtl::OUString sStyleName; + sal_Int32 nNumberFormat; + + ScMyStyleNumberFormat() : nNumberFormat(-1) {} + ScMyStyleNumberFormat(const rtl::OUString& rStyleName) : + sStyleName(rStyleName), nNumberFormat(-1) {} + ScMyStyleNumberFormat(const rtl::OUString& rStyleName, const sal_Int32 nFormat) : + sStyleName(rStyleName), nNumberFormat(nFormat) {} +}; + +struct LessStyleNumberFormat +{ + sal_Bool operator() (const ScMyStyleNumberFormat& rValue1, const ScMyStyleNumberFormat& rValue2) const + { + return rValue1.sStyleName < rValue2.sStyleName; + } +}; + +typedef std::set< ScMyStyleNumberFormat, LessStyleNumberFormat > ScMyStyleNumberFormatSet; + +class ScMyStyleNumberFormats +{ + ScMyStyleNumberFormatSet aSet; + +public: + void AddStyleNumberFormat(const rtl::OUString& rStyleName, const sal_Int32 nNumberFormat); + sal_Int32 GetStyleNumberFormat(const rtl::OUString& rStyleName); +}; + struct ScMyCurrencyStyle { rtl::OUString sCurrency; |