Kaydet (Commit) 322d9ca5 authored tarafından Miklos Vajna's avatar Miklos Vajna

WW8 filter: zoom factor testcase

Change-Id: I89944f0a242174cc4b3c1fcf4f3f2fe744287ee3
üst 10d6d0d0
This diff was suppressed by a .gitattributes entry.
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <swmodeltestbase.hxx> #include <swmodeltestbase.hxx>
...@@ -40,6 +41,7 @@ public: ...@@ -40,6 +41,7 @@ public:
void testFdo45724(); void testFdo45724();
void testFdo46020(); void testFdo46020();
void testFirstHeaderFooter(); void testFirstHeaderFooter();
void testZoom();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT) #if !defined(MACOSX) && !defined(WNT)
...@@ -58,6 +60,7 @@ void Test::run() ...@@ -58,6 +60,7 @@ void Test::run()
{"fdo45724.odt", &Test::testFdo45724}, {"fdo45724.odt", &Test::testFdo45724},
{"fdo46020.odt", &Test::testFdo46020}, {"fdo46020.odt", &Test::testFdo46020},
{"first-header-footer.doc", &Test::testFirstHeaderFooter}, {"first-header-footer.doc", &Test::testFirstHeaderFooter},
{"zoom.doc", &Test::testZoom},
}; };
header(); header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
...@@ -132,6 +135,16 @@ void Test::testFirstHeaderFooter() ...@@ -132,6 +135,16 @@ void Test::testFirstHeaderFooter()
CPPUNIT_ASSERT_EQUAL(OUString("Even page footer 2"), parseDump("/root/page[6]/footer/txt/text()")); 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_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment