diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-18 16:43:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-19 09:49:00 +0100 |
commit | 4198d04df49cff31f509b219293e5e18f7499e05 (patch) | |
tree | 270e73da662461184fcfb365f40096d08e3fd998 | |
parent | f854e62a9d21f7874390952491ba38ed3056edd0 (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>
-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 61b651a94a0b..3a0f466aa590 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -84,7 +84,8 @@ void ScMyOLEFixer::CreateChartListener(ScDocument& rDoc, if (pRefTokens->empty()) return; - ScChartListener* pCL(new ScChartListener(rName, rDoc, std::move(pRefTokens))); + OUString sName = !rName.isEmpty() ? rName : pCollection->getUniqueName("OLEFixer "); + ScChartListener* pCL(new ScChartListener(sName, rDoc, 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 |