diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-08-17 18:24:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-08-17 18:24:33 +0200 |
commit | 2f6dab766808e9e0382382d7f781d3892539556b (patch) | |
tree | 5c6824c07bb50f4e78d4129b47d4eb7dbbe3051b /writerfilter | |
parent | send crop values to dmapper (diff) | |
download | core-2f6dab766808e9e0382382d7f781d3892539556b.tar.gz core-2f6dab766808e9e0382382d7f781d3892539556b.zip |
dmapper: textframes have to be inserted before text can be appended to them
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index dc487b55e721..f4d2c2038985 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1412,6 +1412,7 @@ void DomainMapper_Impl::PopAnnotation() void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape > xShape ) { + uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend; m_bIsInShape = true; try { @@ -1433,6 +1434,12 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_OPAQUE ), uno::makeAny( true ) ); + if (xSInfo->supportsService(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextFrame")))) + { + uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY_THROW); + uno::Reference<text::XTextRange> xTextRange(xTextAppend->createTextCursorByRange(xTextAppend->getEnd()), uno::UNO_QUERY_THROW); + xTextAppend->insertTextContent(xTextRange, xTextContent, sal_False); + } } catch ( const uno::Exception& e ) { |