Ask Your Question
0

how can i set zoom default?

asked 2017-10-29 19:06:10 +0200

xoristzatziki gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-10-30 05:23:50 +0200

Ratslinger gravatar image

Hello,

This is a Bug under certain conditions and you should file a Bug report (file here).

The link provided is correct - the zoom factor for the document can be found in the "settings.xml" file within the document.

The problem occurs in many different ways. First there is a setting in Tools->Options->Load/Save->General - "Load user-specific settings with the document". Have not found any difference with this on or off (probably should leave on) and not even quite sure what its' purpose is. Your problem, and the most consistent, is when a previously unsaved document has the zoom factor raised above 105%, even if it is not saved. Other documents will then open at this raised percentage. The strange part is if this new unsaved document has the zoom factor lowered to, let's say 70%, when another document is opened it starts at 70% but corrects itself to what is in the settings.xml file. Now there are other circumstances, but the list seems to grow the longer you look. As stated, it is a bug & you should report.

In the meantime, you can overcome this with a macro attached to the Open Document event of the form:

Sub SetZoom
    ThisComponent.CurrentController.getViewSettings().ZoomValue = 100
End Sub

This sets the zoom to 100%.

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more

Comments

@xoristzatziki Haven't seen any response. Has this answered your question? I there still a problem? If not, please click on the ✔ to indicate the question has been answered.

Ratslinger gravatar imageRatslinger ( 2017-10-31 13:33:41 +0200 )edit

I already done (as my profile indicates) as best answer. The interface sucks, so I do not know what else to do to help you get more points.

xoristzatziki gravatar imagexoristzatziki ( 2017-11-01 08:11:17 +0200 )edit

Sorry you don't get it. It's not points at all. It's letting other people looking for an answer know that an accepted answer was provided to this question. But the majority of people don't even respond let alone mark the question when the answer was provided.

Ratslinger gravatar imageRatslinger ( 2017-11-01 13:51:05 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-29 19:06:10 +0200

Seen: 569 times

Last updated: Oct 30 '17