diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-02-01 11:07:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-02 12:06:11 +0000 |
commit | 71a8cac070a2c33bf6b66766d84b08c258a6aaf9 (patch) | |
tree | 8038ca9a53a0e9ea604d037812e268c996d0e474 /sw | |
parent | 24c3426d07f5b8fcd19da6f4bc3ee7dd56758ab1 (diff) |
writerfilter: tdf#97417: don't insert numbering on end-of-section
... paragraph, it will be copied to every following paragraph.
(Before commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 the properties
of the end-of-section paragraph would be overwritten by the properties
inside the header)
Change-Id: Ibe095cf873a09ef9e12f898d09b5fd6f61c914c9
(cherry picked from commit 57def64bec0853de7d6f4243e31e8e9650491914)
Reviewed-on: https://gerrit.libreoffice.org/22000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/section_break_numbering.docx | bin | 0 -> 5614 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/section_break_numbering.docx b/sw/qa/extras/ooxmlimport/data/section_break_numbering.docx Binary files differnew file mode 100644 index 000000000000..8b5378a771e5 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/section_break_numbering.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 5c180007f95b..0a4e5930ec21 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2967,6 +2967,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf60351, "tdf60351.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPolygon[5].Y); } +DECLARE_OOXMLIMPORT_TEST(testTdf97417, "section_break_numbering.docx") +{ + // paragraph with numbering and section break was removed by writerfilter + // but its numbering was copied to all following paragraphs + CPPUNIT_ASSERT_MESSAGE("first paragraph missing numbering", + getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules").is()); + uno::Reference<beans::XPropertySet> const xProps(getParagraph(2), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("second paragraph erroneous numbering", + !xProps->getPropertyValue("NumberingRules").hasValue()); + +} + DECLARE_OOXMLIMPORT_TEST(testTdf95970, "tdf95970.docx") { // First shape: the rotation should be -12.94 deg, it should be mirrored. |