sc/source/filter/xml/xmlexprt.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 8aea35ec4f19419b714879eb09fc6658fd3eeb1f Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Nov 29 14:16:19 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Nov 29 16:39:01 2024 +0100 crashtesting: failure to export forum-mso-en4-491312.xlsx to ods 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 <caolan.mcnam...@collabora.com> diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 8bb83786c7a2..e13a3880a637 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3692,7 +3692,18 @@ void ScXMLExport::WriteTableShapes() // GetSnapRect() from associated SdrObject. uno::Reference<beans::XPropertySet> 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<beans::XPropertySetInfo> 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,