summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-07 09:14:32 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-07 09:14:49 +0100
commit322d9ca5b0545ec1ae5ac5e3b704e4ba99b68e22 (patch)
treede6ef1cf4c2454ef0407dd23957e0a4b166ce491 /sw/qa
parent10d6d0d00735e5c0f31d602ce94502c00d2371d5 (diff)
WW8 filter: zoom factor testcase
Change-Id: I89944f0a242174cc4b3c1fcf4f3f2fe744287ee3
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ww8export/data/zoom.docbin0 -> 9216 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/zoom.doc b/sw/qa/extras/ww8export/data/zoom.doc
new file mode 100644
index 000000000000..70548966db41
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/zoom.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 963bf75eb232..f7a8f04b7923 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <swmodeltestbase.hxx>
@@ -40,6 +41,7 @@ public:
void testFdo45724();
void testFdo46020();
void testFirstHeaderFooter();
+ void testZoom();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -58,6 +60,7 @@ void Test::run()
{"fdo45724.odt", &Test::testFdo45724},
{"fdo46020.odt", &Test::testFdo46020},
{"first-header-footer.doc", &Test::testFirstHeaderFooter},
+ {"zoom.doc", &Test::testZoom},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -132,6 +135,16 @@ void Test::testFirstHeaderFooter()
CPPUNIT_ASSERT_EQUAL(OUString("Even page footer 2"), parseDump("/root/page[6]/footer/txt/text()"));
}
+void Test::testZoom()
+{
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XViewSettingsSupplier> xViewSettingsSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xViewSettingsSupplier->getViewSettings());
+ sal_Int16 nValue = 0;
+ xPropertySet->getPropertyValue("ZoomValue") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(42), nValue);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();