diff options
Diffstat (limited to 'wizards/source/access2base/Dialog.xba')
-rw-r--r-- | wizards/source/access2base/Dialog.xba | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/wizards/source/access2base/Dialog.xba b/wizards/source/access2base/Dialog.xba index 00d9b13db620..1d11e6ce8e1b 100644 --- a/wizards/source/access2base/Dialog.xba +++ b/wizards/source/access2base/Dialog.xba @@ -18,6 +18,8 @@ Private _Type As String ' Must be DIALOG Private _Name As String Private _Shortcut As String Private _Dialog As Object ' com.sun.star.io.XInputStreamProvider +Private _Storage As String ' GLOBAL or DOCUMENT +Private _Library As String Private UnoDialog As Object ' com.sun.star.awt.XControl REM ----------------------------------------------------------------------------------------------------------------------- @@ -27,6 +29,8 @@ Private Sub Class_Initialize() _Type = OBJDIALOG _Name = "" Set _Dialog = Nothing + _Storage = "" + _Library = "" Set UnoDialog = Nothing End Sub ' Constructor @@ -757,19 +761,11 @@ Dim iArgNr As Integer , UCase("OnMouseDragged"), UCase("OnMouseEntered"), UCase("OnMouseExited"), UCase("OnMouseMoved") _ , UCase("OnMousePressed"), UCase("OnMouseReleased") If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value - Set oDialogEvents = unoDialog.Model.getEvents() - sListener = _GetListener(psProperty) - sEvent = Utils._GetEventName(psProperty) - sEventName = "com.sun.star.awt." & sListener & "::" & sEvent - If oDialogEvents.hasByName(sEventName) Then oDialogEvents.removeByName(sEventName) - Set oEvent = CreateUnoStruct("com.sun.star.script.ScriptEventDescriptor") - With oEvent - .ListenerType = sListener - .EventMethod = sEvent - .ScriptType = "Script" ' Better than "Basic" - .ScriptCode = pvValue - End With - oDialogEvents.insertByName(sEventName, oEvent) + If Not Utils._RegisterDialogEventScript(UnoDialog.Model _ + , psProperty _ + , _GetListener(psProperty) _ + , pvValue _ + ) Then GoTo Trace_Error_Dialog Case UCase("Page") If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value If pvValue < 0 Then Goto Trace_Error_Value |