[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Wed Jun 20 03:46:38 PDT 2012


 writerfilter/source/dmapper/OLEHandler.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 9390507bfcd21063f549166f302536f5c372a477
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Jun 20 12:46:45 2012 +0200

    n#758883 dmapper: set wrap mode even if determining the position failed
    
    Change-Id: I514828469e68f2ae88309418e64ee93be30455f3

diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 9ef3364..495d25b 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -108,24 +108,30 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
             if( xTempShape.is() )
             {
                 m_xShape.set( xTempShape );
+                uno::Reference< beans::XPropertySet > xShapeProps( xTempShape, uno::UNO_QUERY );
+                PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
 
                 try
                 {
                     m_aShapeSize = xTempShape->getSize();
                     m_aShapePosition = xTempShape->getPosition();
 
-                    uno::Reference< beans::XPropertySet > xShapeProps( xTempShape, uno::UNO_QUERY_THROW );
-                    PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
                     xShapeProps->getPropertyValue( rNameSupplier.GetName( PROP_BITMAP ) ) >>= m_xReplacement;
+                }
+                catch( const uno::Exception& e )
+                {
+                    SAL_WARN("writerfilter", "Exception in OLE Handler: " << e.Message);
+                }
 
+                try
+                {
                     xShapeProps->setPropertyValue(
                         rNameSupplier.GetName( PROP_SURROUND ),
                         uno::makeAny( m_nWrapMode ) );
                 }
                 catch( const uno::Exception& e )
                 {
-                    SAL_WARN("writerfilter", "Exception in OLE Handler: " << e.Message);
+                    SAL_WARN("writerfilter", "Exception while setting wrap mode: " << e.Message);
                 }
             }
         }


More information about the Libreoffice-commits mailing list