I want a shortcut key to toggle a document view between 1 and 2 columns. To that end I have recorded two macros running through the View.Zoom.Zoom Zoom & View Layout dialog setting values for the Column field.
One of these macros was recorded setting for 1 column, the other for 2.
As you can see they are identical.
And have no effect. However the registrymodifications.xcu has this setting
registrymodifications.xcu:1213: <item oor:path="/org.openoffice.Office.Writer/Layout/ViewLayout"><prop oor:name="Columns" oor:op="fuse"><value>1</value></prop></item>
I look through the current controller view settings and find nothing about Layout at all.
Where is this? How do I access it via script?
sub column_toggle_2
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 ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = 120
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 sub
sub column_toggle_1
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 ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = 120
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())