From 91efe26d177b0686923b95b5c28cb208798f1df6 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 21 Nov 2013 14:33:22 +0100 Subject: DOCX drawingML shape import: initial wps:txbx handling A proper textframe is created, but the text on the shape is still outside the frame. Change-Id: I042295cfdd61ce9c0ee52cdf5e8700d8d2b1b1c5 --- writerfilter/source/dmapper/GraphicImport.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 8d0d0cb6d975..cdd9e01d2a8d 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -975,10 +976,13 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) (rPropNameSupplier.GetName(PROP_ANCHOR_TYPE), uno::makeAny (text::TextContentAnchorType_AS_CHARACTER)); - xShapeProps->setPropertyValue - (rPropNameSupplier.GetName(PROP_TEXT_RANGE), - uno::makeAny - (m_pImpl->rDomainMapper.GetCurrentTextRange())); + + uno::Reference xServiceInfo(m_xShape, uno::UNO_QUERY_THROW); + if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame")) + xShapeProps->setPropertyValue + (rPropNameSupplier.GetName(PROP_TEXT_RANGE), + uno::makeAny + (m_pImpl->rDomainMapper.GetCurrentTextRange())); awt::Size aSize(m_xShape->getSize()); -- cgit v1.2.3