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

DOCX drawingML shape import: handle inset attrs for sw text frames

When the drawingML shape import is enabled by default, testFdo66929
(from CppunitTest_sw_ooxmlexport) fails without this.

Change-Id: I38fc64201aaf28ae2e07e57c498a64391ac56f07
üst e239f372
...@@ -68,6 +68,21 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken ...@@ -68,6 +68,21 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
xPropertySet->setPropertyValue("CharRotation", uno::makeAny(sal_Int16(900))); xPropertySet->setPropertyValue("CharRotation", uno::makeAny(sal_Int16(900)));
} }
} }
// Handle inset attributes for Writer textframes.
sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns };
boost::optional<sal_Int32> oInsets[4];
for (size_t i = 0; i < SAL_N_ELEMENTS(aInsets); ++i)
{
OptValue<OUString> oValue = rAttribs.getString(aInsets[i]);
if (oValue.has())
oInsets[i] = oox::drawingml::GetCoordinate(oValue.get());
}
OUString aProps[] = { OUString("LeftBorderDistance"), OUString("TopBorderDistance"), OUString("RightBorderDistance"), OUString("BottomBorderDistance") };
uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
for (size_t i = 0; i < SAL_N_ELEMENTS(aProps); ++i)
if (oInsets[i])
xPropertySet->setPropertyValue(aProps[i], uno::makeAny(*oInsets[i]));
} }
break; break;
case XML_txbx: case XML_txbx:
......
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