summaryrefslogtreecommitdiff
path: root/wizards/source/access2base/Event.xba
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2014-08-12 12:08:48 +0200
committerJean-Pierre Ledure <jp@ledure.be>2014-08-17 06:18:45 -0500
commit8393014898d67795f44835791aa0d9ed535be5d3 (patch)
tree56c5c25caa6746279461d416cb3bde0b52be31e7 /wizards/source/access2base/Event.xba
parent99b9e06b7cdfd1f3336226583d73aa49cc6ce305 (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.xba7
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 = &quot;com.sun.star.comp.forms.ODatabaseForm&quot;
End Select
&apos; Evaluate ContextShortcut
- iCurrentDoc = Application._CurrentDoc()
- If iCurrentDoc &lt; 0 Then Goto Exit_Function
- Set oDoc = _A2B_.CurrentDoc(iCurrentDoc)
sShortcut = &quot;&quot;
sImplementation = Utils._ImplementationName(oObject)
@@ -314,6 +311,10 @@ Const cstDatabaseForm = &quot;com.sun.star.comp.forms.ODatabaseForm&quot;
Case Else
End Select
+ iCurrentDoc = Application._CurrentDoc(, False)
+ If iCurrentDoc &lt; 0 Then Goto Exit_Function
+ Set oDoc = _A2B_.CurrentDoc(iCurrentDoc)
+
&apos; To manage 2x triggers of &quot;Before record action&quot; form event
If _EventType = &quot;ROWCHANGEEVENT&quot; And sImplementation &lt;&gt; &quot;com.sun.star.comp.forms.ODatabaseForm&quot; Then _Recommendation = &quot;IGNORE&quot;