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