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

DOCX filter: handle spacing's "before" attribute inside tblStylePr

Change-Id: I0617b6d3b9e6d81300f97b0b992081cd10ec2fdd
üst a6dc1137
......@@ -1358,6 +1358,9 @@ DECLARE_OOXML_TEST(testQuicktables, "quicktables.docx")
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='firstCol']/w:pPr/w:ind", "rightChars", "0");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='firstCol']/w:pPr/w:ind", "right", "144");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar4']/w:tblStylePr[@w:type='band2Horz']/w:tcPr/w:tcMar/w:bottom", "w", "86");
// LightList.
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='LightList']/w:tblStylePr[@w:type='firstRow']/w:pPr/w:spacing", "before", "0");
}
DECLARE_OOXML_TEST(testSmartart, "smartart.docx")
......
......@@ -242,6 +242,8 @@ void lcl_TableStylePSpacing(sax_fastparser::FSHelperPtr pSerializer, uno::Sequen
{
if (rSpacing[i].Name == "after")
pAttributeList->add(FSNS(XML_w, XML_after), OUStringToOString(rSpacing[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr());
else if (rSpacing[i].Name == "before")
pAttributeList->add(FSNS(XML_w, XML_before), OUStringToOString(rSpacing[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr());
else if (rSpacing[i].Name == "line")
pAttributeList->add(FSNS(XML_w, XML_line), OUStringToOString(rSpacing[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr());
else if (rSpacing[i].Name == "lineRule")
......
......@@ -977,6 +977,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ));
break;
case NS_ooxml::LN_CT_Spacing_before:
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "before", OUString::number(nIntValue));
if (m_pImpl->GetTopContext())
// Don't overwrite NS_ooxml::LN_CT_Spacing_beforeAutospacing.
m_pImpl->GetTopContext()->Insert(PROP_PARA_TOP_MARGIN, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ), false);
......
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