diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-06 13:02:57 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-06 16:37:26 +0100 |
commit | e7e6a5f9850a36d72339799b3981369790113d12 (patch) | |
tree | 883d7146434472a49fc514ce5af7348cc077fbe7 /oox/source/shape/WpsContext.cxx | |
parent | 5f8d2ac5f3d6bd69fae981f6872bfcfac9c2d611 (diff) |
oox: handle a:noAutofit/spAutoFit in WpsContext
Change-Id: I568e8d95f263b30579a2eec49abe8ae45f7f2e96
Diffstat (limited to 'oox/source/shape/WpsContext.cxx')
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 44fc1e6715b2..e2bbb0eda362 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -86,13 +86,25 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i) if (oInsets[i]) xPropertySet->setPropertyValue(aProps[i], uno::makeAny(*oInsets[i])); + return this; } break; + case XML_noAutofit: + case XML_spAutoFit: + { + // We can't use oox::drawingml::TextBodyPropertiesContext here, as this + // is a child context of bodyPr, so the shape is already sent: we need + // to alter the XShape directly. + uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY); + if (xPropertySet.is()) + xPropertySet->setPropertyValue("FrameIsAutomaticHeight", uno::makeAny(getBaseToken(nElementToken) == XML_spAutoFit)); + } + break; case XML_txbx: mpShape->setServiceName("com.sun.star.text.TextFrame"); break; default: - SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element:" << getBaseToken(nElementToken)); + SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element: " << getBaseToken(nElementToken)); break; } return 0; |