summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-29 14:16:19 +0000
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2024-12-10 15:25:10 +0100
commit787d566ded64a81c3fb1d458f81aff21edee35c7 (patch)
tree393170802cd591e697899c73bca580f969dc49d0
parentdeaa23f8498d7b282235bbf175673494f8b52516 (diff)
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.mcnamara@collabora.com> (cherry picked from commit 8aea35ec4f19419b714879eb09fc6658fd3eeb1f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177550 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 80e8af250e81b28feba698569ff8db4d805c4c9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177656 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx13
1 files changed, 12 insertions, 1 deletions
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<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,