diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-08 12:04:36 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-08 16:20:26 +0200 |
commit | 4bc063090c06f0c34980a3852f684b42ab25c501 (patch) | |
tree | 6f0a59967c7af28fb92fdd2c3c6dfcc564054bf8 /sw/qa/extras/ww8import | |
parent | c34fabe9eaf1a02512bafc3c4e2cf9c3abba023c (diff) |
bnc#823651 WW8 import: fix paragraph style in empty first page header
The problem was that the first page SwFmtHeader / SwFmtFooter wasn't
created in case the header/footer text was empty, even if fTitlePage was
set.
Change-Id: I5e58419161bcc663e2beb0338b95877469e0fd3c
Diffstat (limited to 'sw/qa/extras/ww8import')
-rwxr-xr-x | sw/qa/extras/ww8import/data/n823651.doc | bin | 0 -> 30720 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/n823651.doc b/sw/qa/extras/ww8import/data/n823651.doc Binary files differnew file mode 100755 index 000000000000..51b383c42d5d --- /dev/null +++ b/sw/qa/extras/ww8import/data/n823651.doc diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 0ded9f7714b9..ef68da693fed 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -35,6 +35,7 @@ public: void testN816603(); void testN816593(); void testPageBorder(); + void testN823651(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -61,6 +62,7 @@ void Test::run() {"n816603.doc", &Test::testN816603}, {"n816593.doc", &Test::testN816593}, {"page-border.doc", &Test::testPageBorder}, + {"n823651.doc", &Test::testN823651}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -282,6 +284,14 @@ void Test::testPageBorder() CPPUNIT_ASSERT_EQUAL(sal_uInt32(TWIP_TO_MM100(6 * 20)), aBorder.LineWidth); } +void Test::testN823651() +{ + // Character height was 10pt instead of 7.5pt in the header. + uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); + uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XTextRange> >(xStyle, "HeaderTextFirst")->getText(); + CPPUNIT_ASSERT_EQUAL(7.5f, getProperty<float>(getParagraphOfText(1, xText), "CharHeight")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |