summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-08-18 15:13:52 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-08-24 18:18:47 +0200
commit39c08074a286855dd014ce1c30b8f7ef95b10242 (patch)
tree4fb6572e39d95e7407012a8f113054d3a300878e /sw/qa/extras
parentab8b8fb183067fd0bded089f513b614d35138e18 (diff)
Watermark: not visible if page background was set
Watermark was drawn under the page background. It has to be placed on the upper layer to be visible. Change-Id: I132a313eed6fb712aafdca14a38fe559aa4231c8 Reviewed-on: https://gerrit.libreoffice.org/41289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
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: */