[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sc/source

Eike Rathke erack at redhat.com
Mon Jul 20 04:36:24 PDT 2015


 sc/source/filter/xml/xmlexprt.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 67c8a8e4c4fdf2e96dbf8503b8f8ff475f2117b9
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 20 11:46:17 2015 +0200

    check annotation caption pointers, blind fix for rhbz#1242099
    
    Apparently there may have been situations when the caption or its shape
    could not be obtained for whatever reason.
    
    Change-Id: Ie9b97d4b3999cb4645bb6b8b688b3666cfd71ccc
    (cherry picked from commit 47d90af52a548429224c38b5c58a70116e0f7907)
    Reviewed-on: https://gerrit.libreoffice.org/17220
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3ddd5bf..f44f6fc 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3584,9 +3584,12 @@ void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell)
         pCurrentCell = &rMyCell;
 
         SdrCaptionObj* pNoteCaption = pNote->GetOrCreateCaption(rMyCell.maCellAddress);
-        Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY );
-
-        GetShapeExport()->exportShape(xShape, SEF_DEFAULT|XMLShapeExportFlags::ANNOTATION, NULL);
+        if (pNoteCaption)
+        {
+            Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY );
+            if (xShape.is())
+                GetShapeExport()->exportShape(xShape, SEF_DEFAULT|XMLShapeExportFlags::ANNOTATION, NULL);
+        }
 
         pCurrentCell = NULL;
 


More information about the Libreoffice-commits mailing list