From b54499c33323000cab5e779a512c69c8fc8af626 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 31 May 2012 14:43:02 +0200 Subject: n#764005 testcase Change-Id: I76f7cb8aa5b15ac03786e7294ef03ad62741987c --- sw/qa/extras/ooxmltok/data/n764005.docx | Bin 0 -> 13088 bytes sw/qa/extras/ooxmltok/ooxmltok.cxx | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 sw/qa/extras/ooxmltok/data/n764005.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmltok/data/n764005.docx b/sw/qa/extras/ooxmltok/data/n764005.docx new file mode 100644 index 000000000000..1c0dd9d077e9 Binary files /dev/null and b/sw/qa/extras/ooxmltok/data/n764005.docx differ diff --git a/sw/qa/extras/ooxmltok/ooxmltok.cxx b/sw/qa/extras/ooxmltok/ooxmltok.cxx index 67d18cef180e..6dd79277b92e 100644 --- a/sw/qa/extras/ooxmltok/ooxmltok.cxx +++ b/sw/qa/extras/ooxmltok/ooxmltok.cxx @@ -62,6 +62,7 @@ public: void testN750255(); void testN652364(); void testN760764(); + void testN764005(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -78,6 +79,7 @@ public: CPPUNIT_TEST(testN750255); CPPUNIT_TEST(testN652364); CPPUNIT_TEST(testN760764); + CPPUNIT_TEST(testN764005); #endif CPPUNIT_TEST_SUITE_END(); @@ -424,6 +426,23 @@ void Test::testN760764() CPPUNIT_ASSERT_EQUAL(8.f, fValue); } +void Test::testN764005() +{ + load("n764005.docx"); + + uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY); + + // The picture in the header wasn't absolutely positioned and wasn't in the background. + text::TextContentAnchorType eValue; + xPropertySet->getPropertyValue("AnchorType") >>= eValue; + CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER); + sal_Bool bValue = sal_True; + xPropertySet->getPropertyValue("Opaque") >>= bValue; + CPPUNIT_ASSERT_EQUAL(sal_False, bValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit