diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-21 14:33:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-21 18:05:58 +0100 |
commit | 91efe26d177b0686923b95b5c28cb208798f1df6 (patch) | |
tree | b526f82e11fb08742cb9dc90dc6e135fa6cc69dd /writerfilter | |
parent | bb4cbfc139f27b75ba118e107faa29ceda6a19e4 (diff) |
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
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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 <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/text/GraphicCrop.hpp> #include <com/sun/star/text/HoriOrientation.hpp> @@ -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<lang::XServiceInfo> 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()); |