summaryrefslogtreecommitdiff
path: root/extensions/test
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2002-09-05 07:32:19 +0000
committerJoachim Lingner <jl@openoffice.org>2002-09-05 07:32:19 +0000
commitef77f3b813adff2abece29e87d921a9c3f44268c (patch)
tree7dc21fc6daa3187361d8c4eacc63be5f7ab38b03 /extensions/test
parent49e278ce00dd2ea41fd4b99724d0eb33477961b9 (diff)
*** empty log message ***
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
index e6c388b10546..8bcb33c33e6c 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
@@ -2,9 +2,9 @@
*
* $RCSfile: Callback.cpp,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jl $ $Date: 2001-12-06 14:49:12 $
+ * last change: $Author: jl $ $Date: 2002-09-05 08:32:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -509,9 +509,36 @@ STDMETHODIMP CCallback::outSeqByte(LPSAFEARRAY * outVal)
return S_OK;
}
-STDMETHODIMP CCallback::inSeqByte( LPSAFEARRAY val)
+STDMETHODIMP CCallback::inSeqByte( LPSAFEARRAY listeners)
{
- // TODO: Add your implementation code here
+
+ return S_OK;
+}
+
+STDMETHODIMP CCallback::inSeqXEventListener( LPSAFEARRAY listeners, LPSAFEARRAY events)
+{
+ HRESULT hr= S_OK;
+ long ubound= 0;
+ long lbound= 0;
+ long count= 0;
+ hr= SafeArrayGetUBound( listeners, 1, &ubound);
+ hr= SafeArrayGetLBound( listeners, 1, &lbound);
+ count= ubound - lbound +1;
+
+ // We assume thate the count of EventObjects in events is the same
+ for( long i = 0; i < count; i++)
+ {
+ CComVariant varListener;
+ CComVariant varEvent;
+ hr= SafeArrayGetElement( listeners, &i, &varListener);
+ hr= SafeArrayGetElement( events, &i, &varEvent);
+ if( varListener.vt == VT_DISPATCH && varEvent.vt == VT_DISPATCH)
+ {
+ CComDispatchDriver disp( varListener.pdispVal);
+ hr= disp.Invoke1(L"disposing", &varEvent);
+ }
+
+ }
return S_OK;
}