https://bugs.freedesktop.org/show_bug.cgi?id=63659
Priority: medium
Bug ID: 63659
Assignee: [email protected]
Summary: Document dispatcher opens window instead of applying
the settings
Severity: normal
Classification: Unclassified
OS: Windows (All)
Reporter: [email protected]
Hardware: x86 (IA32)
Status: UNCONFIRMED
Version: 4.0.1.2 release
Component: Writer
Product: LibreOffice
In previous versions of LO (3.x) the following basic code changed the zoom
setting, but now it opens the zoom window instead of making the change.
sub ZoomIn( )
Zoom(10)
end sub
sub ZoomOut( )
Zoom(-10)
end sub
function Zoom(SStep as Integer)
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
sv = thiscomponent.currentcontroller.viewdata
av = split(sv,";")
Magnification = cInt(av(2))
Magnification = Magnification + SStep
if (Magnification < 20) then Magnification =20 'controls limits of zoom
if (Magnification >600) then Magnification =600
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = Magnification
args1(1).Name = "Zoom.ValueSet"
args1(1).Value = 28703
args1(2).Name = "Zoom.Type"
args1(2).Value = 0
dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())
end function
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs