summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2001-11-28 08:30:16 +0000
committerJoachim Lingner <jl@openoffice.org>2001-11-28 08:30:16 +0000
commit9cd85f2543d56d4efbdac6382f248ae2ac482130 (patch)
tree59b39c2255d85cf4b87298e79c2fbb245f274b43 /extensions
parent7f0798b36d6541891b629341abf2b436b348d5d7 (diff)
*** empty log message ***
Diffstat (limited to 'extensions')
-rw-r--r--extensions/test/ole/EventListenerSample/events.htm18
-rw-r--r--extensions/test/ole/EventListenerSample/readme.txt16
2 files changed, 30 insertions, 4 deletions
diff --git a/extensions/test/ole/EventListenerSample/events.htm b/extensions/test/ole/EventListenerSample/events.htm
index be6d9aa2dfd0..a9ac88bd11ec 100644
--- a/extensions/test/ole/EventListenerSample/events.htm
+++ b/extensions/test/ole/EventListenerSample/events.htm
@@ -42,7 +42,7 @@ function XEventListener_disposing( source)
</script>
<script language="VBScript">
-SUB MainVB()
+SUB MainVB( id)
Set objServiceManager= CreateObject("com.sun.star.ServiceManager")
Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
@@ -53,7 +53,13 @@ Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")
Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
-Set eventListener= CreateObject("EventListener.EvtListener")
+Dim eventListener
+select case id
+ case 0
+ Set eventListener= CreateObject("EventListener.EvtListener")
+ case 1
+ Set eventListener= CreateObject("VBasicEventListener.VBEventListener")
+end select
objDocument.addEventListener eventlistener
END SUB
@@ -79,7 +85,13 @@ is written in C++ and housed in a dll. Then the event listener is added to the d
The button runs VBScript code that creates the components EventListener.EvtListener and adds it
to the document.
</p>
-<button onclick='MainVB()'>VBScript</Button>
+<button onclick='MainVB(0)'>VBScript</Button>
+<p>
+Runs VBScript code that creates VBasicEventListener.VBEventListener ActiveX component which was
+written with VB
+</p>
+<button onclick='MainVB(1)'>VBScript</Button>
+
</body>
</html>
diff --git a/extensions/test/ole/EventListenerSample/readme.txt b/extensions/test/ole/EventListenerSample/readme.txt
index 0e7cb4197c2c..46c674153ab7 100644
--- a/extensions/test/ole/EventListenerSample/readme.txt
+++ b/extensions/test/ole/EventListenerSample/readme.txt
@@ -1,4 +1,18 @@
+EventListener
+________________________________________________________
+
The folder EventListener contains an MSDEV project that builds a dll that contains
the EventListener.EvtListener ActiveX component. The component implements the XEventListener
interface according to the rules of the OleBridge. The component will be used from the
-HTML page events.htm. \ No newline at end of file
+HTML page events.htm.
+
+VBEventListener:
+_________________________________________________________
+Contains a Visual Basic project that builds an ActiveX component that implements
+com.sun.star.lang.XEventListener. Its ProgId is VBasicEventListener.VBEventListener
+The dll should also be checked in. VB needs its TLB, so it uses the same CLSIDs on
+the next build. The component will create a message box when its disposing function
+has been called.
+
+The project also contains a client that builds a Project1.exe (in the same folder)
+that creates VBEventListener and adds it to a StarOffice document