summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-04-14 08:08:04 +0200
committerAndras Timar <andras.timar@collabora.com>2016-05-02 17:47:12 +0200
commitafd2095bd2acd201ff125959b41550f39303cee5 (patch)
treedd99efcd7f4853354d239c497a0752010e288ce2 /sw
parent7aa6e7584464abde91be91d61d66dc6ecd7082d1 (diff)
Related: tdf#65642 RTF filter: import \pgnucrm
This as a side effect also implements support for DOCX <w:pgNumType w:fmt="upperRoman" .../>. Reviewed-on: https://gerrit.libreoffice.org/24073 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 235dcc11e7e5291188e134f37a03849d741c4f6e) Change-Id: Ibf3bedca03c6c2a2b96eecb36ff6c4cf6e2281b4
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/data/pgnucrm.rtf23
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx6
2 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/pgnucrm.rtf b/sw/qa/extras/rtfexport/data/pgnucrm.rtf
new file mode 100644
index 000000000000..ce0bbf2b94d8
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgnucrm.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\pgnucrm
+{\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 ed9fa08eb7a3..d845e0927f1d 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -941,6 +941,12 @@ DECLARE_RTFEXPORT_TEST(testPgnlcrm, "pgnlcrm.rtf")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_LOWER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
}
+DECLARE_RTFEXPORT_TEST(testPgnucrm, "pgnucrm.rtf")
+{
+ // The second page's numbering type: this was style::NumberingType::ARABIC.
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_UPPER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */