summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLStylesImportHelper.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-04 14:10:29 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-04 14:19:04 -0400
commit31cffd850ad2d8ff6cc6200d180337426162bf1e (patch)
tree3d127edd87c05e64c040e1110ed42da699a91886 /sc/source/filter/xml/XMLStylesImportHelper.hxx
parent2899df164f7678836ca3d0309874036f764b3c7f (diff)
Ported calc-perf-ods-import-cellstyles.diff from ooo-build.
This patch improves import performance of large ods files.
Diffstat (limited to 'sc/source/filter/xml/XMLStylesImportHelper.hxx')
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.hxx28
1 files changed, 17 insertions, 11 deletions
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index 3a15dbeff52a..a53fa46d768a 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -29,12 +29,15 @@
#define SC_XMLSTYLESIMPORTHELPER_HXX
#include "rangelst.hxx"
+#include "simplerangelist.hxx"
#include <rtl/ustring.hxx>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <set>
#include <vector>
+#include <list>
+#include <boost/shared_ptr.hpp>
class ScXMLImport;
@@ -72,9 +75,11 @@ public:
struct ScMyCurrencyStyle
{
rtl::OUString sCurrency;
- ScRangeListRef xRanges;
+ ::boost::shared_ptr<ScSimpleRangeList> mpRanges;
- ScMyCurrencyStyle() : xRanges(new ScRangeList()) {}
+ ScMyCurrencyStyle() :
+ mpRanges(new ScSimpleRangeList)
+ {}
~ScMyCurrencyStyle() {}
};
@@ -90,13 +95,13 @@ typedef std::set<ScMyCurrencyStyle, LessCurrencyStyle> ScMyCurrencyStylesSet;
class ScMyStyleRanges : public SvRefBase
{
- ScRangeList* pTextList;
- ScRangeList* pNumberList;
- ScRangeList* pTimeList;
- ScRangeList* pDateTimeList;
- ScRangeList* pPercentList;
- ScRangeList* pLogicalList;
- ScRangeList* pUndefinedList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpTextList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpNumberList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpTimeList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpDateTimeList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpPercentList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpLogicalList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpUndefinedList;
ScMyCurrencyStylesSet* pCurrencyList;
void AddRange(const ScRange& rRange, ScRangeList* pList,
@@ -105,8 +110,9 @@ class ScMyStyleRanges : public SvRefBase
void AddCurrencyRange(const ScRange& rRange, ScRangeListRef xList,
const rtl::OUString* pStyleName, const rtl::OUString* pCurrency,
ScXMLImport& rImport, const sal_uInt32 nMaxRanges);
- void InsertColRow(const ScRange& rRange, const SCsCOL nDx, const SCsROW nDy,
- const SCsTAB nDz, ScDocument* pDoc);
+ void SetStylesToRanges(const ::std::list<ScRange>& rList,
+ const rtl::OUString* pStyleName, const sal_Int16 nCellType,
+ const rtl::OUString* pCurrency, ScXMLImport& rImport);
void SetStylesToRanges(ScRangeList* pList,
const rtl::OUString* pStyleName, const sal_Int16 nCellType,
const rtl::OUString* pCurrency, ScXMLImport& rImport);