summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/ui/event/CommonListener.py
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/ui/event/CommonListener.py')
-rw-r--r--wizards/com/sun/star/wizards/ui/event/CommonListener.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
index 78c4f2a5bbfa..ad15ac2d6c0f 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
@@ -150,3 +150,28 @@ class OMouseListenerProcAdapter( unohelper.Base, XMouseListener ):
def disposing(self, Event):
# TODO: Implement ?
pass
+
+from com.sun.star.io import XStreamListener
+class StreamListenerProcAdapter( unohelper.Base, XStreamListener ):
+ def __init__(self, parent, terminatedCall, startedCall, closedCall, errorCall):
+ self.parent = parent
+ self.terminatedCall = terminatedCall
+ self.startedCall = startedCall
+ self.closedCall = closedCall
+ self.errorCall = errorCall
+
+ def terminated(self):
+ if callable( self. terminatedCall):
+ self.terminatedCall(self, self.parent)
+
+ def started(self):
+ if callable( self.startedCall ):
+ self.startedCall(self, self.parent)
+
+ def closed(self):
+ if callable( self.closedCall ):
+ self.closedCall(self, self.parent)
+
+ def error(self, aException):
+ if callable( self.errorCall ):
+ self.errorCall(self, aException)