summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/watermark-layer.docxbin0 -> 17964 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/watermark-layer.docx b/sw/qa/extras/ooxmlexport/data/watermark-layer.docx
new file mode 100755
index 000000000000..9428686c1bad
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/watermark-layer.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 4e961079b829..515f40e4803b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -30,8 +30,10 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <ftninfo.hxx>
+#include <drawdoc.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
+#include <svx/svdpage.hxx>
class Test : public SwModelTestBase
{
@@ -993,6 +995,18 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXControlAtRunEnd, "activex_control_at_run_end
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
}
+DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, "watermark-layer.docx")
+{
+ // Watermark was not visible if page background was set.
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SdrPage* pPage = pTextDoc->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pObject = pPage->GetObj(0);
+
+ CPPUNIT_ASSERT(pObject);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(1), pObject->GetLayer().get());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */