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

DOCX import: handle ooxml::CT_Spacing_lineRule after line

Regression from commit a5f9fb72 (fdo#80800 :
DOCX: Preservation of Direct Formatting for non first Table Cells,
2014-07-11), CT_Spacing's two attributes (line and lineRule) may come in
different order; but the change only handled the case when lineRule is
followed by line, and not the other way around.

This fixes a unit test failure in CppunitTest_sw_ooxmlexport's
testSpacingLineRule.

Change-Id: I892d97a97390228a59a129f096be39ce93b822d6
üst 7e018afa
...@@ -428,6 +428,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) ...@@ -428,6 +428,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "lineRule", "exact"); m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "lineRule", "exact");
aSpacing.Mode = style::LineSpacingMode::FIX; aSpacing.Mode = style::LineSpacingMode::FIX;
} }
if( m_pImpl->getTableManager().isInCell() )
{
// If the table manager got the line rule after
// ooxml::CT_Spacing_line, then it should get the rule
// after lineRule as well.
TablePropertyMapPtr pTblCellWithDirectFormatting(new TablePropertyMap);
pTblCellWithDirectFormatting->insert(std::pair< PropertyIds, PropValue >(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )));
m_pImpl->getTableManager().cellProps(pTblCellWithDirectFormatting);
}
} }
if (pTopContext) if (pTopContext)
pTopContext->Insert(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )); pTopContext->Insert(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing ));
......
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