diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-01 17:39:00 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-23 13:24:26 +0200 |
commit | 5ed4c11534ba431097da1abb5d600d21b5f68a9a (patch) | |
tree | dcbd3c1e0d797177bade3c2ee34ff3a6e734893b /sc/source/filter/inc | |
parent | d8af144254b8f10fe1faa40f9072aad043ca35fe (diff) |
Use sc::CompileFormulaContext for faster export
It's a cache for maTabNames (sheet names mangled for the current grammar
for output) which ScCompiler needs and is expensive to get.
Change-Id: I7e2954104427a3c220f0f097be6cd45a66485b56
Diffstat (limited to 'sc/source/filter/inc')
-rw-r--r-- | sc/source/filter/inc/xeroot.hxx | 3 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/filter/inc/xeroot.hxx b/sc/source/filter/inc/xeroot.hxx index 35de5c62c52b..698b0e4a49f6 100644 --- a/sc/source/filter/inc/xeroot.hxx +++ b/sc/source/filter/inc/xeroot.hxx @@ -52,6 +52,7 @@ class XclExpFilterManager; class XclExpPivotTableManager; class XclExpDxfs; class XclExpXmlPivotTableManager; +namespace sc { class CompileFormulaContext; } /** Stores global buffers and data needed for Excel export filter. */ struct XclExpRootData : public XclRootData @@ -92,6 +93,7 @@ struct XclExpRootData : public XclRootData XclExpDxfsRef mxDxfs; /// All delta formatting entries boost::shared_ptr<XclExpXmlPivotTableManager> mxXmlPTableMgr; + boost::shared_ptr<sc::CompileFormulaContext> mpCompileFormulaCxt; ScCompiler::OpCodeMapPtr mxOpCodeMap; /// mapping between op-codes and names @@ -112,6 +114,7 @@ public: inline const XclExpRoot& GetRoot() const { return *this; } /** Returns true, if URLs should be stored relative to the document location. */ inline bool IsRelUrl() const { return mrExpData.mbRelUrl; } + sc::CompileFormulaContext& GetCompileFormulaContext() const { return *mrExpData.mpCompileFormulaCxt; } /** Returns the buffer for Calc->Excel sheet index conversion. */ XclExpTabInfo& GetTabInfo() const; diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index c705e4547c2c..df1f7a30a17a 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -251,6 +251,7 @@ struct XclAddress; struct XclFontData; struct XclRange; class XclRangeList; +namespace sc { class CompileFormulaContext; } class XclXmlUtils { @@ -275,7 +276,7 @@ public: static OUString ToOUString( const char* s ); static OUString ToOUString( const ScfUInt16Vec& rBuffer, sal_Int32 nStart = 0, sal_Int32 nLength = -1 ); - static OUString ToOUString( ScDocument& rDocument, const ScAddress& rAddress, const ScTokenArray* pTokenArray ); + static OUString ToOUString( sc::CompileFormulaContext& rCtx, const ScAddress& rAddress, const ScTokenArray* pTokenArray ); static OUString ToOUString( const XclExpString& s ); /** |