1'*************************************************************************
2'
3'  Licensed to the Apache Software Foundation (ASF) under one
4'  or more contributor license agreements.  See the NOTICE file
5'  distributed with this work for additional information
6'  regarding copyright ownership.  The ASF licenses this file
7'  to you under the Apache License, Version 2.0 (the
8'  "License"); you may not use this file except in compliance
9'  with the License.  You may obtain a copy of the License at
10'
11'    http://www.apache.org/licenses/LICENSE-2.0
12'
13'  Unless required by applicable law or agreed to in writing,
14'  software distributed under the License is distributed on an
15'  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16'  KIND, either express or implied.  See the License for the
17'  specific language governing permissions and limitations
18'  under the License.
19'
20'*************************************************************************
21
22VERSION 1.0 CLASS
23BEGIN
24  MultiUse = -1  'True
25  Persistable = 0  'NotPersistable
26  DataBindingBehavior = 0  'vbNone
27  DataSourceBehavior  = 0  'vbNone
28  MTSTransactionMode  = 0  'NotAnMTSObject
29END
30Attribute VB_Name = "VBEventListener"
31Attribute VB_GlobalNameSpace = False
32Attribute VB_Creatable = True
33Attribute VB_PredeclaredId = False
34Attribute VB_Exposed = True
35Option Explicit
36Private interfaces(0) As String
37Private bDisposingCalled As Boolean
38Private bQuiet As Boolean
39
40Public Property Get Bridge_ImplementedInterfaces() As Variant
41    Bridge_ImplementedInterfaces = interfaces
42End Property
43
44Private Sub Class_Initialize()
45interfaces(0) = "com.sun.star.lang.XEventListener"
46bDisposingCalled = False
47bQuiet = False
48End Sub
49
50Private Sub Class_Terminate()
51   On Error Resume Next
52   Debug.Print "Terminate VBEventListener"
53End Sub
54
55Public Sub disposing(ByVal source As Object)
56    If bQuiet = False Then
57    MsgBox "disposing called"
58    End If
59    bDisposingCalled = True
60End Sub
61
62Public Sub setQuiet(quiet As Boolean)
63    bQuiet = quiet
64End Sub
65
66Public Sub resetDisposing()
67    bDisposingCalled = False
68End Sub
69
70Public Function disposingCalled()
71    disposingCalled = bDisposingCalled
72End Function
73