sc/source/filter/xml/xmlexprt.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 0f3425878d024c053c61d85632f873468385feb2
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Nov 29 14:16:19 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Nov 29 15:53:06 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/+/177539
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 66a147e13ea4..c079ce8d3abf 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3689,7 +3689,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("FrameRect") >>= 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,

Reply via email to