Kaydet (Commit) e7e6a5f9 authored tarafından Miklos Vajna's avatar Miklos Vajna

oox: handle a:noAutofit/spAutoFit in WpsContext

Change-Id: I568e8d95f263b30579a2eec49abe8ae45f7f2e96
üst 5f8d2ac5
...@@ -86,13 +86,25 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken ...@@ -86,13 +86,25 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i) for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i)
if (oInsets[i]) if (oInsets[i])
xPropertySet->setPropertyValue(aProps[i], uno::makeAny(*oInsets[i])); xPropertySet->setPropertyValue(aProps[i], uno::makeAny(*oInsets[i]));
return this;
} }
break; 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: case XML_txbx:
mpShape->setServiceName("com.sun.star.text.TextFrame"); mpShape->setServiceName("com.sun.star.text.TextFrame");
break; break;
default: default:
SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element:" << getBaseToken(nElementToken)); SAL_WARN("oox", "WpsContext::createFastChildContext: unhandled element: " << getBaseToken(nElementToken));
break; break;
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment