summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-09-11 12:23:18 +0200
committerMichael Stahl <mstahl@redhat.com>2015-02-09 16:49:30 +0000
commitd522ecb71ed1c5cb8472eee0b3bbd6a5fe6fed3e (patch)
tree0d9addf1e92338c8383a5b2fbca44a86a8ab1a5c /sw/qa
parent7a046ddda3d8c7b8b94c6825349c7c143aafda68 (diff)
Resolves: fdo#88784 crash on loading certain docx
was/also: fdo#82114 RTF import: fix handling of first page in non-first section (cherry picked from commit 04fe5e6a31c9701177a744bbc8a53b2f664fe71c) Change-Id: If06c6bcdda97447e6014223d997c7ff8abd64b48 Reviewed-on: https://gerrit.libreoffice.org/14377 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo82114.rtf14
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx9
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo82114.rtf b/sw/qa/extras/rtfimport/data/fdo82114.rtf
new file mode 100644
index 000000000000..073d2818b207
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo82114.rtf
@@ -0,0 +1,14 @@
+{\rtf1
+\paperw11906\paperh16838\margl1134\margr567\margt1418\margb851\gutter0\ltrsect
+\viewkind1\viewscale110\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nojkernpunct\rsidroot13516616\utinl \fet0
+\titlepg
+{\headerr Right page header, section 1\par
+}
+{\headerf First page header, section 1\par
+}
+\pard\plain First page, section 1.\par\sect
+\sectd\titlepg
+{\headerf First page header, section 2\par
+}
+\pard\plain First page, section 2.\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 2cdbcbcffcb7..db67a127b12b 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2086,6 +2086,15 @@ DECLARE_RTFIMPORT_TEST(testFdo86750, "fdo86750.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("#anchor"), getProperty<OUString>(getRun(getParagraph(1), 1), "HyperLinkURL"));
}
+DECLARE_RTFIMPORT_TEST(testFdo82114, "fdo82114.rtf")
+{
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Converted1"), "HeaderText");
+ OUString aActual = xHeaderText->getString();
+ OUString aExpected("First page header, section 2");
+ // This was 'Right page header, section 1'.
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */