summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2013-06-11 18:21:27 +0300
committerMiklos Vajna <vmiklos@suse.cz>2013-06-13 09:40:06 +0200
commitdb23f89b76cb61b215bcae5495eadba2b5ceace2 (patch)
tree9d80e086fb874afebbc6414d4329cc4f9cb00eb6 /sw
parentc688919620fb22e27471d222d99c0599ee0872e7 (diff)
fdo#65655 : fix for Different_Odd_And_Even_Pages flag ignored
Signed-off-by: Miklos Vajna <vmiklos@suse.cz> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: Icf9949bb00aa905d22aedfd8f2b297dfa89dfedb
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo65655.docxbin0 -> 13760 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65655.docx b/sw/qa/extras/ooxmlexport/data/fdo65655.docx
new file mode 100644
index 000000000000..5fe9451bb091
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo65655.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index bcecf95c5ac8..8b4308e856c4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -73,6 +73,7 @@ public:
void testFdo64826();
void testPageBackground();
void testFdo65265();
+ void testFdo65655();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -123,6 +124,7 @@ void Test::run()
{"fdo64826.docx", &Test::testFdo64826},
{"page-background.docx", &Test::testPageBackground},
{"fdo65265.docx", &Test::testFdo65265},
+ {"fdo65655.docx", &Test::testFdo65655},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -700,6 +702,20 @@ void Test::testFdo65265()
CPPUNIT_ASSERT_EQUAL(OUString("Format"), getProperty<OUString>(getRun(xParagraph2, 2), "RedlineType"));
}
+void Test::testFdo65655()
+{
+ // The problem was that the DOCX had a non-blank odd footer and a blank even footer
+ // The 'Different Odd & Even Pages' was turned on
+ // However - LO assumed that because the 'even' footer is blank - it should ignore the 'Different Odd & Even Pages' flag
+ // So it did not import it and did not export it
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ sal_Bool bValue = false;
+ xPropertySet->getPropertyValue("HeaderIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(false, bool(bValue));
+ xPropertySet->getPropertyValue("FooterIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(false, bool(bValue));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();