diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-11 12:23:18 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-11 14:58:21 +0200 |
commit | 04fe5e6a31c9701177a744bbc8a53b2f664fe71c (patch) | |
tree | bcdc45c93149f7c2d2a7e809b26b0025cbc75c76 /sw | |
parent | 4d3c88805d1917932ee88a0f22ae93c43e8e389a (diff) |
fdo#82114 RTF import: fix handling of first page in non-first section
Change-Id: If06c6bcdda97447e6014223d997c7ff8abd64b48
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo82114.rtf | 14 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 9 |
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 acd78d0461fe..1dda1c45b972 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1932,6 +1932,15 @@ DECLARE_RTFIMPORT_TEST(testCsBold, "cs-bold.rtf") CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(1), 1), "CharWeight")); } +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: */ |