I am trying to implement a listener event in Visual Basic 6 for LibreOffice Writer. I was referred to the following code from Document Events - Apache OpenOffice Wiki.
set xContext = objServiceManager.getPropertyValue( "DefaultContext" )
set xCoreReflection = xContext.getValueByName( "/singletons/com.sun.star.reflection.theCoreReflection" )
set xClass = xCoreReflection.forName( "com.sun.star.document.XEventBroadcaster" )
set xMethod = xClass.getMethod( "addEventListener" )
dim invokeargs(0)
invokeargs(0) = myListener
set value = objServiceManager.Bridge_GetValueObject()
call value.InitInOutParam("[]any", invokeargs)
call xMethod.invoke( objDocument, value )
I am not able to understand the implementation of the listener event from this code.
Can I get example code to implement listener events for LibreOffice Writer in Visual Basic 6?