From e4c1f2a7abcca5f8398f90ce05820456954543e9 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 18 Aug 2011 01:53:16 +0200 Subject: dmapper: don't reset anchor type of text frames --- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index f4d2c2038985..0d2e31102e00 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1430,7 +1430,6 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape 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 ) ); @@ -1440,6 +1439,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape uno::Reference xTextRange(xTextAppend->createTextCursorByRange(xTextAppend->getEnd()), uno::UNO_QUERY_THROW); xTextAppend->insertTextContent(xTextRange, xTextContent, sal_False); } + else + { + xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) ); + } } catch ( const uno::Exception& e ) { -- cgit