summaryrefslogtreecommitdiff
path: root/sc/source/core/inc/grouptokenconverter.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-02 11:18:02 +0100
committerEike Rathke <erack@redhat.com>2016-06-03 14:06:39 +0000
commitdc78e5c6f5f55b0289012f4c4e6013d2935b1cc6 (patch)
treec2edd91f1bfd60cbce2685ae2c03b72918cd4207 /sc/source/core/inc/grouptokenconverter.hxx
parentf062b89b277a0830f038cafdd13bd074b5188455 (diff)
Resolves: tdf#98880 ensure backing context of DoubleVectorRefToken...
exists for the lifetime of the ScGroupTokenConverter otherwise in tdf#98880 ScDocument::InterpretDirtyCells releases that backing storage that the DoubleVectorRefToken relies on, and the ScVectorRefMatrix relies on that, so... when sc/source/core/tool/interpr4.cxx calls ::IsString on the ScVectorRefMatrix which calls ensureFullMatrix. That makes use of rArray.mpStringArray where rArray's mpStringArray is set to that rArray by FormulaGroupContext::ensureStrArray and the storage of mpStringArray belongs to the FormulaGroupContext, but that context was reset and destroyed up the stack in ScDocument::InterpretDirtyCells so the data is now invalid We could turn the unique_ptr into a shared_ptr and have the ScGroupTokenConverter take a ref to the currently active FormulaGroupContext to ensure any generated DoubleVectorRefToken/SingleVectorRefToken point to valid data during the lifetime of the ScGroupTokenConverter Change-Id: Id457934cdff18570961cb261cf5c46b6ef8ea083 Reviewed-on: https://gerrit.libreoffice.org/25815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/core/inc/grouptokenconverter.hxx')
-rw-r--r--sc/source/core/inc/grouptokenconverter.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/core/inc/grouptokenconverter.hxx b/sc/source/core/inc/grouptokenconverter.hxx
index 9685681886e0..7b88004e9d5c 100644
--- a/sc/source/core/inc/grouptokenconverter.hxx
+++ b/sc/source/core/inc/grouptokenconverter.hxx
@@ -20,6 +20,7 @@ class SC_DLLPUBLIC ScGroupTokenConverter
{
ScTokenArray& mrGroupTokens;
ScDocument& mrDoc;
+ std::shared_ptr<sc::FormulaGroupContext> mxFormulaGroupContext;
ScFormulaCell& mrCell;
const ScAddress& mrPos;