summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfimport/odfimport.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-14 10:37:01 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-14 17:29:36 +0200
commit65a56636a68451d15499a37c2d5bd9efb71b1279 (patch)
treedf5dffc97a9ff34535eb2d0fefd6b02c3d2ea5d4 /sw/qa/extras/odfimport/odfimport.cxx
parentc31d87b525dd974e018892c98aed4fdb893c3469 (diff)
tdf#88337 tdf#89193: sw: add missing SwXPageStyle properties
Add the fill style properties so background images etc. are not lost. (regression from 7d9bb549d498d6beed2c4050c402d09643febdfa) Change-Id: I517350eec2f32e4b4bb80427666aad23a31d666a
Diffstat (limited to 'sw/qa/extras/odfimport/odfimport.cxx')
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index a8a374246792..f967f3414a00 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -12,6 +12,8 @@
#if !defined(WNT)
#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/table/BorderLine.hpp>
@@ -307,6 +309,15 @@ DECLARE_ODFIMPORT_TEST(testFdo79269_header, "fdo79269_header.odt")
CPPUNIT_ASSERT_EQUAL(OUString("second"), xFooter->getString());
}
+DECLARE_ODFIMPORT_TEST(testPageBackground, "PageBackground.odt")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ // The background image was lost
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySet, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySet, "FillBitmapName"));
+ CPPUNIT_ASSERT_EQUAL(drawing::BitmapMode_REPEAT, getProperty<drawing::BitmapMode>(xPropertySet, "FillBitmapMode"));
+}
+
DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt")
{
uno::Reference<drawing::XShape> xShape = getShape(1);