From 80e8af250e81b28feba698569ff8db4d805c4c9a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 29 Nov 2024 14:16:19 +0000 Subject: crashtesting: failure to export forum-mso-en4-491312.xlsx to ods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit probably since: commit 65129e0bc5abfe7afc612eb46f1434e627265a7d CommitDate: Tue Feb 2 22:06:18 2021 +0100 tdf#137081, tdf137082 fixes shape handling in RTL sheets Change-Id: Ife720a0ccbff0029ace822d246dc227e01846734 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177537 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 8aea35ec4f19419b714879eb09fc6658fd3eeb1f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177550 Reviewed-by: Xisco Fauli --- sc/source/filter/xml/xmlexprt.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 0590c95d0e8b..1df4db82e50c 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3694,7 +3694,18 @@ void ScXMLExport::WriteTableShapes() // GetSnapRect() from associated SdrObject. uno::Reference xShapeProp(rxShape, uno::UNO_QUERY); awt::Rectangle aFrameRect; - if (xShapeProp.is() && (xShapeProp->getPropertyValue(u"FrameRect"_ustr) >>= aFrameRect)) + if (!xShapeProp.is()) + { + SAL_WARN("sc", "no shape propertyset"); + continue; + } + uno::Reference xPropSetInfo = xShapeProp->getPropertySetInfo(); + if (!xPropSetInfo->hasPropertyByName(u"FrameRect"_ustr)) + { + SAL_WARN("sc", "shape doesn't support FrameRect property"); + continue; + } + if (xShapeProp->getPropertyValue(u"FrameRect"_ustr) >>= aFrameRect) { // file format uses shape in LTR mode. newLeft = - oldRight = - (oldLeft + width). // newTranslate = oldTranslate - refPoint, oldTranslate from transformation matrix, -- cgit