diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-02-05 16:02:19 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-02-06 10:53:37 +0100 |
commit | 03cee02464f230a2efa67d131c137f32fe540052 (patch) | |
tree | 935f992c17b3e2895afca2861c4b6d850e991687 /sw/qa/extras/rtfimport/rtfimport.cxx | |
parent | 03458f8e4609d00d7e9334a23d5f7f6fe8846e01 (diff) |
tdf#115242 RTF import: order numPr before other paragraph properties
So that paragraph properties inherited from numbering properties can be
properly overwritten with direct formatting, even when we have to take
style deduplication into account.
The OOXML tokenizer already did this,
writerfilter::dmapper::DomainMapper::sprmWithProps()'s
NS_ooxml::LN_CT_NumPr_numId depends on this, so adapt the RTF tokenizer
accordingly.
Change-Id: Iec6026d146f08a9d06266763d01ed626a2d1f3d1
Reviewed-on: https://gerrit.libreoffice.org/49247
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 6621626e662a..0c63379ccfbe 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1390,6 +1390,14 @@ DECLARE_RTFIMPORT_TEST(testTdf104016, "tdf104016.rtf") xParagraph->getPropertyState("ParaLeftMargin")); } +DECLARE_RTFIMPORT_TEST(testTdf115242, "tdf115242.rtf") +{ + // This was 0, overriden left margin was lost by too aggressive style + // deduplication. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2787), + getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); +} + DECLARE_RTFIMPORT_TEST(testDefaultValues, "default-values.rtf") { // tdf#105910: control words without values must be treated as having default values, |