diff options
author | Eike Rathke <erack@redhat.com> | 2015-07-20 11:46:17 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-28 10:06:41 +0200 |
commit | 4939ae4c11ff79ae89320af97494edd919118db7 (patch) | |
tree | 059ba569f16aac77e473d38e8b4da5a53c3f1e2f | |
parent | c6630d19660c9f4bb095629bf13ee9f2b6b41ae4 (diff) |
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.
(cherry picked from commit 47d90af52a548429224c38b5c58a70116e0f7907)
Conflicts:
sc/source/filter/xml/xmlexprt.cxx
Change-Id: Ie9b97d4b3999cb4645bb6b8b688b3666cfd71ccc
Reviewed-on: https://gerrit.libreoffice.org/17222
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 27f3821c44b7d326c116183fb063c9254d55ccc8)
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 2c67fcb27c95..06f8356f357b 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3720,9 +3720,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|SEF_EXPORT_ANNOTATION, NULL); + if (pNoteCaption) + { + Reference<drawing::XShape> xShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY ); + if (xShape.is()) + GetShapeExport()->exportShape(xShape, SEF_DEFAULT|SEF_EXPORT_ANNOTATION, NULL); + } pCurrentCell = NULL; |