[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jul 29 02:23:54 PDT 2014
writerfilter/source/dmapper/DomainMapper.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit a0b89100be8ccc2b60d08d7e3819cd247a6042b0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jul 29 11:19:56 2014 +0200
DOCX import: handle ooxml::CT_Spacing_lineRule after line
Regression from commit a5f9fb720daeb2df8325768b98b8b720abcc2b9b (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
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 7e598d7..c32d86a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -428,6 +428,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "lineRule", "exact");
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)
pTopContext->Insert(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing ));
More information about the Libreoffice-commits
mailing list