[Libreoffice-commits] core.git: writerfilter/source

Caolán McNamara caolanm at redhat.com
Wed Nov 6 15:25:19 CET 2013


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit bf205162f1509cf27e7f4d65a240beda899c06ef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 6 14:24:30 2013 +0000

    preview might be empty
    
    as demonstrated by ooo110440-1.doc
    
    Change-Id: I780a756d328eb35c9be1572319dd4f802c1831e1

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e2f6d7e..e1515d4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1821,11 +1821,14 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
 */
 void DomainMapper_Impl::UpdateEmbeddedShapeProps(const uno::Reference< drawing::XShape > xShape)
 {
-        PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-        uno::Reference<beans::XPropertySet> xEmbeddedProperties(m_xEmbedded, uno::UNO_QUERY_THROW);
-        awt::Size aSize = xShape->getSize( );
-        xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_WIDTH), uno::makeAny(sal_Int32(aSize.Width)));
-        xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HEIGHT), uno::makeAny(sal_Int32(aSize.Height)));
+    if (!xShape.is())
+        return;
+
+    PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
+    uno::Reference<beans::XPropertySet> xEmbeddedProperties(m_xEmbedded, uno::UNO_QUERY_THROW);
+    awt::Size aSize = xShape->getSize( );
+    xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_WIDTH), uno::makeAny(sal_Int32(aSize.Width)));
+    xEmbeddedProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HEIGHT), uno::makeAny(sal_Int32(aSize.Height)));
 }
 
 


More information about the Libreoffice-commits mailing list