diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-18 16:43:39 +0000 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-25 14:45:23 +0100 |
commit | 153a3587461ba8f14ac849d2f99d3985c0138cf3 (patch) | |
tree | ee571b407c1dfdc6a93e66bf5b6f039931eca124 /sc/source/filter/xml | |
parent | 5d5f10b3fa7c59c25f1b85d909db6909548ee111 (diff) |
crashtesting: make tdf129410-1.ods not crash on load
Give its multiple anonymous ChartListeners unique names
Maybe ScMyOLEFixer::FixupOLEs should instead skip calling
CreateChartListener if getPropertyValue(sPersistName) >>= sName succeeded
but has an empty sName result.
Change-Id: I0741694ee692aaa22e0441a5e09748eb67e8dbf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106066
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106363
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r-- | sc/source/filter/xml/XMLTableShapeResizer.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 105bbb7cbeb5..1f9bc5cc774f 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -87,7 +87,8 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, *pRefTokens, aRangeStr, pDoc, cSep, pDoc->GetGrammar()); if (!pRefTokens->empty()) { - ScChartListener* pCL(new ScChartListener(rName, pDoc, std::move(pRefTokens))); + OUString sName = !rName.isEmpty() ? rName : pCollection->getUniqueName("OLEFixer "); + ScChartListener* pCL(new ScChartListener(sName, pDoc, std::move(pRefTokens))); //for loading binary files e.g. //if we have the flat filter we need to set the dirty flag thus the visible charts get repainted |