diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-12 15:01:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-12 17:49:02 +0100 |
commit | 40b0bd21e87480b659e7ed92854eee385a2a3c55 (patch) | |
tree | e71ba92b77eead12445c68c866d7ba71f74e19f5 /sc/source/filter/oox/formulabuffer.cxx | |
parent | 4781ba436f72b5b763833c3c036e7f1c0e4d9e3b (diff) |
sc: rowcol: tdf#50916 pass ScDocument to the token classes
needed to create a fake ScDocument for the external ref manager, since
it has no ScDocument at all
Change-Id: Ia786ac291133e3c438694e81ecfb2590729a853d
Reviewed-on: https://gerrit.libreoffice.org/85050
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/oox/formulabuffer.cxx')
-rw-r--r-- | sc/source/filter/oox/formulabuffer.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx index e8f9f5c6a2a6..3f8c8db4169a 100644 --- a/sc/source/filter/oox/formulabuffer.cxx +++ b/sc/source/filter/oox/formulabuffer.cxx @@ -54,7 +54,7 @@ public: }; explicit CachedTokenArray( ScDocument& rDoc ) : - maCxt(&rDoc, formula::FormulaGrammar::GRAM_OOXML), mpDoc(&rDoc) {} + maCxt(&rDoc, formula::FormulaGrammar::GRAM_OOXML) {} Item* get( const ScAddress& rPos, const OUString& rFormula ) { @@ -65,7 +65,7 @@ public: Item& rCached = *it->second; const ScTokenArray& rCode = *rCached.mpCell->GetCode(); - OUString aPredicted = rCode.CreateString(mpDoc, maCxt, rPos); + OUString aPredicted = rCode.CreateString(maCxt, rPos); if (rFormula == aPredicted) return &rCached; @@ -96,7 +96,6 @@ private: typedef std::unordered_map<SCCOL, std::unique_ptr<Item>> ColCacheType; ColCacheType maCache; sc::TokenStringContext maCxt; - const ScDocument* mpDoc; }; void applySharedFormulas( |