diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /extensions/test/ole/EventListenerSample/VBEventListener | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'extensions/test/ole/EventListenerSample/VBEventListener')
5 files changed, 125 insertions, 0 deletions
diff --git a/extensions/test/ole/EventListenerSample/VBEventListener/Module1.bas b/extensions/test/ole/EventListenerSample/VBEventListener/Module1.bas new file mode 100644 index 000000000..aafd265a0 --- /dev/null +++ b/extensions/test/ole/EventListenerSample/VBEventListener/Module1.bas @@ -0,0 +1,9 @@ +Attribute VB_Name = "Module1" +Option Explicit + + +Sub Main() + +End Sub + + diff --git a/extensions/test/ole/EventListenerSample/VBEventListener/VBEventListener.cls b/extensions/test/ole/EventListenerSample/VBEventListener/VBEventListener.cls new file mode 100644 index 000000000..f3c09aa4d --- /dev/null +++ b/extensions/test/ole/EventListenerSample/VBEventListener/VBEventListener.cls @@ -0,0 +1,69 @@ +' +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' +' This file incorporates work covered by the following license notice: +' +' Licensed to the Apache Software Foundation (ASF) under one or more +' contributor license agreements. See the NOTICE file distributed +' with this work for additional information regarding copyright +' ownership. The ASF licenses this file to you under the Apache +' License, Version 2.0 (the "License"); you may not use this file +' except in compliance with the License. You may obtain a copy of +' the License at http://www.apache.org/licenses/LICENSE-2.0 . +' + +VERSION 1.0 CLASS +BEGIN + MultiUse = -1 'True + Persistable = 0 'NotPersistable + DataBindingBehavior = 0 'vbNone + DataSourceBehavior = 0 'vbNone + MTSTransactionMode = 0 'NotAnMTSObject +END +Attribute VB_Name = "VBEventListener" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = True +Attribute VB_PredeclaredId = False +Attribute VB_Exposed = True +Option Explicit +Private interfaces(0) As String +Private bDisposingCalled As Boolean +Private bQuiet As Boolean + +Public Property Get Bridge_ImplementedInterfaces() As Variant + Bridge_ImplementedInterfaces = interfaces +End Property + +Private Sub Class_Initialize() +interfaces(0) = "com.sun.star.lang.XEventListener" +bDisposingCalled = False +bQuiet = False +End Sub + +Private Sub Class_Terminate() + On Error Resume Next + Debug.Print "Terminate VBEventListener" +End Sub + +Public Sub disposing(ByVal source As Object) + If bQuiet = False Then + MsgBox "disposing called" + End If + bDisposingCalled = True +End Sub + +Public Sub setQuiet(quiet As Boolean) + bQuiet = quiet +End Sub + +Public Sub resetDisposing() + bDisposingCalled = False +End Sub + +Public Function disposingCalled() + disposingCalled = bDisposingCalled +End Function diff --git a/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbp b/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbp new file mode 100644 index 000000000..f89b866be --- /dev/null +++ b/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbp @@ -0,0 +1,38 @@ +Type=OleDll +Class=VBEventListener; VBEventListener.cls +Module=Module1; Module1.bas +Startup="Sub Main" +HelpFile="" +ExeName32="VBasicEventListener.dll" +Command32="" +Name="VBasicEventListener" +HelpContextID="0" +Description="Implementation of UNO XEventListener" +CompatibleMode="1" +CompatibleEXE32="VBasicEventListener.dll" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="StarOffice" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=1 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 +ThreadingModel=1 +DebugStartupOption=0 + +[MS Transaction Server] +AutoRefresh=1 diff --git a/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbw b/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbw new file mode 100644 index 000000000..76699ee81 --- /dev/null +++ b/extensions/test/ole/EventListenerSample/VBEventListener/VBasicEventListener.vbw @@ -0,0 +1,2 @@ +VBEventListener = 132, 132, 732, 748, +Module1 = 64, 33, 849, 530, diff --git a/extensions/test/ole/EventListenerSample/VBEventListener/readme.txt b/extensions/test/ole/EventListenerSample/VBEventListener/readme.txt new file mode 100644 index 000000000..417c102b0 --- /dev/null +++ b/extensions/test/ole/EventListenerSample/VBEventListener/readme.txt @@ -0,0 +1,7 @@ +VBasicEventListener.dll is an ActiveX component written with VisualBasic. The +component registers on the system with a particular ID. When the library is build +this ID is generated, unless a previously build library exists. Then the ID of that +library is used. In order to use always the same ID, the library must be as binary in +the cvs. + +The library can be used under the licences noted in VBEventListener.cls. |