diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-22 08:09:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-22 08:09:29 +0100 |
commit | abaf6bde4ee91c628bd55a7ec2e876a5d0ecff6e (patch) | |
tree | f9de7dd21aad34bffe9d91c3fac67bd4227e7968 /sw/qa | |
parent | a7ba6358eec442aaa28fdd952102dbd10ca2569e (diff) |
tdf#65642 RTF filter: import \pgnrestart and \pgnucltr
This implicitly adds support for DOCX import of <w:pgNumType
w:fmt="upperLetter"> as well.
Change-Id: Ib19ecb8f7ca0c867ae3be2b41e49ac4cacfd5bb6
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf65642.rtf | 23 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf65642.rtf b/sw/qa/extras/rtfimport/data/tdf65642.rtf new file mode 100644 index 000000000000..f13d2211948b --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf65642.rtf @@ -0,0 +1,23 @@ +{\rtf1 +\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 +{\field\fldedit +{\*\fldinst +{ PAGE \\* MERGEFORMAT } +} +{\fldrslt +{1} +} +} +\sect +\sectd\pgnrestart\pgnucltr +{\field\fldedit +{\*\fldinst +{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329 PAGE \\* MERGEFORMAT } +} +{\fldrslt +{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 A} +} +} +{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744 +\par } +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a8c8f79a3606..cd0eb55bbd94 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2554,6 +2554,14 @@ DECLARE_RTFIMPORT_TEST(testClassificatonPasteLevels, "classification-confidentia CPPUNIT_ASSERT_EQUAL(aOld, xText->getString()); } +DECLARE_RTFIMPORT_TEST(testTdf65642, "tdf65642.rtf") +{ + // The second page's numbering type: this was style::NumberingType::ARABIC. + CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_UPPER_LETTER_N, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType")); + // The second page's restart value: this was 0. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), getProperty<sal_Int32>(getParagraph(2), "PageNumberOffset")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |