xScriptContext=uno.getScriptContext()
xDesktop=xScriptContext~getDesktop
xComponent = xDesktop~getCurrentComponent()
xModel = xComponent~xModel
xController = xModel~getCurrentController()
xSelectionSupplier = xController~XSelectionSupplier
xViewSettingsSupplier = xSelectionSupplier~XViewSettingsSupplier
xViewSettings=xViewSettingsSupplier~ViewSettings
xViewProperties = xViewSettings~XPropertySet
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "PAGE_WIDTH")))
call syssleep 1
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "ENTIRE_PAGE")))
call syssleep 1
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "PAGE_WIDTH_EXACT")))
call syssleep 1
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "BY_VALUE")))
xViewProperties~setPropertyValue("ZoomValue", box("Short", 200))
call syssleep 1
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "BY_VALUE")))
xViewProperties~setPropertyValue("ZoomValue", box("Short", 10))
call syssleep 1
xViewProperties~setPropertyValue("ZoomType", box("Short", bsf.getConstant("com.sun.star.view.DocumentZoomType", "OPTIMAL")))
::requires UNO.CLS