[Libreoffice-commits] .: writerfilter/source

Noel Power noelp at kemper.freedesktop.org
Mon Feb 7 04:11:34 PST 2011


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ae5d018c49d3ab61416cde7fb09c37bcce7d9566
Author: Noel Power <noel.power at novell.com>
Date:   Mon Feb 7 12:01:46 2011 +0000

    fix for bnc#655763

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 111c22f..97e6a04 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1338,9 +1338,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
         PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
 
         uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
-        xProps->setPropertyValue( 
-                rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ),
-                uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
+        uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
+        bool bIsGraphic = xSInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" ) ) );
+
+        xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic  ?  uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
         xProps->setPropertyValue(
                 rPropNameSupplier.GetName( PROP_OPAQUE ),
                 uno::makeAny( true ) );


More information about the Libreoffice-commits mailing list