diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2014-08-12 12:08:48 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2014-08-17 06:18:45 -0500 |
commit | 8393014898d67795f44835791aa0d9ed535be5d3 (patch) | |
tree | 56c5c25caa6746279461d416cb3bde0b52be31e7 /wizards/source/access2base/Event.xba | |
parent | 99b9e06b7cdfd1f3336226583d73aa49cc6ce305 (diff) |
Access2Base - non-Base components
So far the first call to the API was a call to the OpenConnection method.
Without an OpenConnection some methods issued a cryptic "Object variable not set" Basic run-time message.
It is now intercepted to make it clearer.
A number of features are not database related: error handling, events handling, windows move/resize, dialogs, ...
They have been identified and adapted to be callable without database connection.
As such they are callable from any LO component, not only Base.
Change-Id: I99f408c8404a6192149747228b2b8493b9df5ae3
Reviewed-on: https://gerrit.libreoffice.org/10883
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/source/access2base/Event.xba')
-rw-r--r-- | wizards/source/access2base/Event.xba | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wizards/source/access2base/Event.xba b/wizards/source/access2base/Event.xba index e1408ab691e2..0f3ed4bc8945 100644 --- a/wizards/source/access2base/Event.xba +++ b/wizards/source/access2base/Event.xba @@ -297,9 +297,6 @@ Const cstDatabaseForm = "com.sun.star.comp.forms.ODatabaseForm" End Select ' Evaluate ContextShortcut - iCurrentDoc = Application._CurrentDoc() - If iCurrentDoc < 0 Then Goto Exit_Function - Set oDoc = _A2B_.CurrentDoc(iCurrentDoc) sShortcut = "" sImplementation = Utils._ImplementationName(oObject) @@ -314,6 +311,10 @@ Const cstDatabaseForm = "com.sun.star.comp.forms.ODatabaseForm" Case Else End Select + iCurrentDoc = Application._CurrentDoc(, False) + If iCurrentDoc < 0 Then Goto Exit_Function + Set oDoc = _A2B_.CurrentDoc(iCurrentDoc) + ' To manage 2x triggers of "Before record action" form event If _EventType = "ROWCHANGEEVENT" And sImplementation <> "com.sun.star.comp.forms.ODatabaseForm" Then _Recommendation = "IGNORE" |