Libreoffice 1:5.1.6~rc2-0ubuntu1~xenial2 el-GR (el_GR.UTF-8)
this states that :Zoom is stored in the document in LibreOffice. I have an odb with a “switchboard” (simple form not connected to a table or so). From that I open (using macros in buttons) some reports. Reports are opened (as title in them states) as readonly. If I change the zoom in the report and close it (not saving anything), the zoom in the switchboard is not changing (which is OK). If after that I close the “switchboard” (having the “default” zoom) and reopen it the zoom has changed to the previously closed report (which was closed before closing the “switchboard”, which had a standard zoom).
I use this for opening the switchboard:
Sub OpenMyForm(frmName As String)
Dim ObjTypeWhat
ObjTypeWhat = com.sun.star.sdb.application.DatabaseObject.FORM
If ThisDatabaseDocument.FormDocuments.hasbyname(frmName) Then 'Check the form exists
ThisDataBaseDocument.CurrentController.Connect() 'If the form exists connect to the database
ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, frmName, FALSE) 'Open the form
Else
Error1(frmName)
End if
clearthings:
set ObjTypeWhat = Nothing
End Sub
And I have attached to open event of switchboard:
Sub HideAllMenuToolbars()
Dim xCurrentController as Object
Dim xLayoutManager as Object
’ If Design mode, just exit the routine and display standard menu and toolbars’
xCurrentController = thisComponent.CurrentController
If xCurrentController.isFormDesignMode Then
Exit Sub
End If
xLayoutManager = thisComponent.CurrentController.Frame.LayoutManager
xLayoutManager.visible = false
clearthings:
set xLayoutManager = Nothing
set xCurrentController = Nothing
End Sub