diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-07 11:17:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-07 11:17:24 +0000 |
commit | 78419248217f693905fff691da091ff62de63a15 (patch) | |
tree | aaaf656089a20d184f7ff2b6bd3058393ce0d84f /starmath/qa | |
parent | d77dcdc56bad0fd7f4145fb141d0fe0de0cff996 (diff) |
cppunit: test zoom limits
Diffstat (limited to 'starmath/qa')
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index 1b08ae019bc4..0cfadd035b0b 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() |