oox/source/shape/WpsContext.cxx | 3 +++ oox/source/token/tokens.txt | 1 + writerfilter/source/dmapper/GraphicImport.cxx | 12 ++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-)
New commits: commit 91efe26d177b0686923b95b5c28cb208798f1df6 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Nov 21 14:33:22 2013 +0100 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 diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 92c1a08..6ecf320 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -49,6 +49,9 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken break; case XML_bodyPr: break; + case XML_txbx: + mpShape->setServiceName("com.sun.star.text.TextFrame"); + break; default: SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element:" << getBaseToken(nElementToken)); break; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 8d0d0cb..cdd9e01 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()); commit bb4cbfc139f27b75ba118e107faa29ceda6a19e4 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Nov 21 12:54:48 2013 +0100 oox: tokenize wps:txbx Change-Id: I627d5f151e5bf1ae4604e32763ef5afeb66a0cfa diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 9f67181..64c2ca1 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5342,6 +5342,7 @@ txPr txSp txStyles txXfrm +txbx txbxContent txtBox ty _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits