From 1250ad9561e8f7d3227bb97b9e1f7b2968b5c900 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 30 Mar 2016 09:04:57 +0200 Subject: Related: tdf#65642 RTF export: \pgnucltr testcase There is no reason this unit test is import-only, this area of the export filter was untested so far. Change-Id: Ia271bccf59c1b21474e7b854cbaa0992b722e552 --- sw/qa/extras/rtfexport/data/tdf65642.rtf | 23 +++++++++++++++++++++++ sw/qa/extras/rtfexport/rtfexport.cxx | 8 ++++++++ sw/qa/extras/rtfimport/data/tdf65642.rtf | 23 ----------------------- sw/qa/extras/rtfimport/rtfimport.cxx | 8 -------- 4 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 sw/qa/extras/rtfexport/data/tdf65642.rtf delete mode 100644 sw/qa/extras/rtfimport/data/tdf65642.rtf (limited to 'sw/qa') diff --git a/sw/qa/extras/rtfexport/data/tdf65642.rtf b/sw/qa/extras/rtfexport/data/tdf65642.rtf new file mode 100644 index 000000000000..f13d2211948b --- /dev/null +++ b/sw/qa/extras/rtfexport/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/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 24faee23a2f2..8a544ce72934 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -999,6 +999,14 @@ DECLARE_RTFEXPORT_TEST(testCustomDocProps, "custom-doc-props.rtf") CPPUNIT_ASSERT_EQUAL(OUString("None"), getProperty(xUserDefinedProperties, "urn:bails:IntellectualProperty:Authorization:StopValidity")); } +DECLARE_RTFEXPORT_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(getStyles("PageStyles")->getByName("Converted1"), "NumberingType")); + // The second page's restart value: this was 0. + CPPUNIT_ASSERT_EQUAL(static_cast(1), getProperty(getParagraph(2), "PageNumberOffset")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/rtfimport/data/tdf65642.rtf b/sw/qa/extras/rtfimport/data/tdf65642.rtf deleted file mode 100644 index f13d2211948b..000000000000 --- a/sw/qa/extras/rtfimport/data/tdf65642.rtf +++ /dev/null @@ -1,23 +0,0 @@ -{\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 cd0eb55bbd94..a8c8f79a3606 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2554,14 +2554,6 @@ 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(getStyles("PageStyles")->getByName("Converted1"), "NumberingType")); - // The second page's restart value: this was 0. - CPPUNIT_ASSERT_EQUAL(static_cast(1), getProperty(getParagraph(2), "PageNumberOffset")); -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit