[Libreoffice-commits] .: starmath/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Dec 7 03:17:30 PST 2010
starmath/qa/cppunit/test_starmath.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit cf129c2d47b96ec008800399ef083ffd5d843a78
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 7 11:17:24 2010 +0000
cppunit: test zoom limits
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 1b08ae0..0cfadd0 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -376,6 +376,24 @@ void Test::tViewZoom()
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be 50%", nFinalZoom == 50);
}
+
+ {
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 5));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 25%", nFinalZoom == 25);
+ }
+
+ {
+ SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 1000));
+ SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ m_pViewShell->Execute(aZoom);
+ nFinalZoom = rGraphicWindow.GetZoom();
+ CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 800%", nFinalZoom == 800);
+ }
}
void Test::testDocument()
More information about the Libreoffice-commits
mailing list