title: libreoffice writer python script to set view layout columns
body: <p>For text documents in LO writer I want a shortcut to toggle the view between 1 and 2 columns. To that end, I recorded two macros --  which had no effect -- so I'm trying with Python.</p>
  <p>The Writer Menu.View.Zoom.Zoom menu item opens the <code>Zoom and View Layout</code> dialog. That dialog offers two panels: <em>Zoom</em> and <em>View Layout</em></p>
  <p>In a Python script we can access <code>current_controller.view_settings.ZoomValue</code> and <code>...ZoomType</code> but I don't find a way to the <code>View Layout</code> values.</p>
  <p>In the LO user config file <code>registrymodifications.xcu</code> we have these three lines:</p>
  <pre><code> &lt;item oor:path=&quot;/org.openoffice.Office.Writer/Layout/Zoom&quot;&gt;&lt;prop oor:name=&quot;Type&quot; oor:op=&quot;fuse&quot;&gt;&lt;value&gt;0&lt;/value&gt;&lt;/prop&gt;&lt;/item&gt;
   &lt;item oor:path=&quot;/org.openoffice.Office.Writer/Layout/Zoom&quot;&gt;&lt;prop oor:name=&quot;Value&quot; oor:op=&quot;fuse&quot;&gt;&lt;value&gt;120&lt;/value&gt;&lt;/prop&gt;&lt;/item&gt;
   
   &lt;item oor:path=&quot;/org.openoffice.Office.Writer/Layout/ViewLayout&quot;&gt;&lt;prop oor:name=&quot;Columns&quot; oor:op=&quot;fuse&quot;&gt;&lt;value&gt;1&lt;/value&gt;&lt;/prop&gt;&lt;/item&gt;
  </code></pre>
  <p>Notice that the two zoom values are at the same level under <code>Layout</code> accessed in script directly through view_settings (see above). At that same level we have ViewLayout but in a script I have found no way of accessing what I would like to be <code>view_settings.ViewLayout</code> or view_settings.getProperty(...)</p>