[Libreoffice-bugs] [Bug 111998] BASIC-Laufzeitfehler. Eigenschaft oder Methode nicht gefunden : isFormDesignMode.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 24 09:21:59 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111998

Luis <luismiguel.lacosta at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luismiguel.lacosta at gmail.co
                   |                            |m

--- Comment #1 from Luis <luismiguel.lacosta at gmail.com> ---
Macro is not correct as ThisComponent is not bound to Form when loaded.

Test that:

Sub OnOpenDocument()
Dim oController

Dim xDoc as object

oController = ThisDatabaseDocument.CurrentController
If not ( oController.isConnected() ) Then oController.connect() ' Connect to
the database, if necessary

xDoc=oController.loadComponent(
com.sun.star.sdb.application.DatabaseObject.FORM, _
"Formular1", FALSE ) ' Parameters: ObjectType, Parameter ObjectName, ForEditing

Dim xCurrentController as Object
   Dim xLayoutManager as Object
' If Design mode, just exit the routine and display standard menu and toolbars'
   xCurrentController = xDoc.CurrentController
   If xCurrentController.isFormDesignMode Then
       Exit Sub
   End If
   xLayoutManager = thisComponent.CurrentController.Frame.LayoutManager
   xLayoutManager.visible = false   
end sub

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170824/feef6c53/attachment.html>


More information about the Libreoffice-bugs mailing list