[Libreoffice-commits] .: Branch 'libreoffice-3-3' - writerfilter/source

Noel Power noelp at kemper.freedesktop.org
Mon Feb 7 07:52:12 PST 2011


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

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

    fix for bnc#655763
    
    cherry picked from ae5d018c49d3ab61416cde7fb09c37bcce7d9566
    reviewed in bug https://bugzilla.novell.com/show_bug.cgi?id=655763#c6
    
    Signed-off-by: Cedric Bosdonnat <cbosdonnat at novell.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e89a40c..47541e4 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