1'************************************************************************* 2' 3' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4' 5' Copyright 2000, 2010 Oracle and/or its affiliates. 6' 7' OpenOffice.org - a multi-platform office productivity suite 8' 9' This file is part of OpenOffice.org. 10' 11' OpenOffice.org is free software: you can redistribute it and/or modify 12' it under the terms of the GNU Lesser General Public License version 3 13' only, as published by the Free Software Foundation. 14' 15' OpenOffice.org is distributed in the hope that it will be useful, 16' but WITHOUT ANY WARRANTY; without even the implied warranty of 17' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18' GNU Lesser General Public License version 3 for more details 19' (a copy is included in the LICENSE file that accompanied this code). 20' 21' You should have received a copy of the GNU Lesser General Public License 22' version 3 along with OpenOffice.org. If not, see 23' <http://www.openoffice.org/license.html> 24' for a copy of the LGPLv3 License. 25' 26'************************************************************************* 27 28VERSION 1.0 CLASS 29BEGIN 30 MultiUse = -1 'True 31 Persistable = 0 'NotPersistable 32 DataBindingBehavior = 0 'vbNone 33 DataSourceBehavior = 0 'vbNone 34 MTSTransactionMode = 0 'NotAnMTSObject 35END 36Attribute VB_Name = "VBEventListener" 37Attribute VB_GlobalNameSpace = False 38Attribute VB_Creatable = True 39Attribute VB_PredeclaredId = False 40Attribute VB_Exposed = True 41Option Explicit 42Private interfaces(0) As String 43Private bDisposingCalled As Boolean 44Private bQuiet As Boolean 45 46Public Property Get Bridge_ImplementedInterfaces() As Variant 47 Bridge_ImplementedInterfaces = interfaces 48End Property 49 50Private Sub Class_Initialize() 51interfaces(0) = "com.sun.star.lang.XEventListener" 52bDisposingCalled = False 53bQuiet = False 54End Sub 55 56Private Sub Class_Terminate() 57 On Error Resume Next 58 Debug.Print "Terminate VBEventListener" 59End Sub 60 61Public Sub disposing(ByVal source As Object) 62 If bQuiet = False Then 63 MsgBox "disposing called" 64 End If 65 bDisposingCalled = True 66End Sub 67 68Public Sub setQuiet(quiet As Boolean) 69 bQuiet = quiet 70End Sub 71 72Public Sub resetDisposing() 73 bDisposingCalled = False 74End Sub 75 76Public Function disposingCalled() 77 disposingCalled = bDisposingCalled 78End Function 79