Private
Server IP : 195.201.23.43  /  Your IP : 3.15.221.165
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/lib/libreoffice/program/wizards/ui/event/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/self/root/lib/libreoffice/program/wizards/ui/event/CommonListener.py
#
# 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 .
#
import unohelper

from com.sun.star.awt import XActionListener
class ActionListenerProcAdapter( unohelper.Base, XActionListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def actionPerformed( self, oActionEvent ):
        if callable( self.oProcToCall ):
            self.oProcToCall()

    def disposing(self, Event):
        # TODO: Implement ?
        pass

from com.sun.star.awt import XItemListener
class ItemListenerProcAdapter( unohelper.Base, XItemListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def itemStateChanged( self, oItemEvent ):
        if callable( self.oProcToCall ):
            try:
                self.oProcToCall()
            except:
                self.oProcToCall(oItemEvent)

    def disposing(self, Event):
        # TODO: Implement ?
        pass

from com.sun.star.awt import XTextListener
class TextListenerProcAdapter( unohelper.Base, XTextListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def textChanged( self, oTextEvent ):
        if callable( self.oProcToCall ):
            self.oProcToCall()

    def disposing(self, Event):
        # TODO: Implement ?
        pass

from com.sun.star.frame import XTerminateListener
class TerminateListenerProcAdapter( unohelper.Base, XTerminateListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def queryTermination(self, TerminateEvent):
        if callable( self.oProcToCall ):
            self.oProcToCall()

from com.sun.star.awt import XWindowListener
class WindowListenerProcAdapter( unohelper.Base, XWindowListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def windowShown(self, TerminateEvent):
        if callable( self.oProcToCall ):
            self.oProcToCall()

    def windowHidden(self, Event):
        # TODO: Implement ?
        pass

    def windowResized(self, Event):
        # TODO: Implement ?
        pass

    def windowMoved(self, Event):
        # TODO: Implement ?
        pass

    def disposing(self, Event):
        # TODO: Implement ?
        pass

from com.sun.star.awt import XAdjustmentListener
class AdjustmentListenerProcAdapter( unohelper.Base, XAdjustmentListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def adjustmentValueChanged(self, TerminateEvent):
        if callable( self.oProcToCall ):
            self.oProcToCall()

from com.sun.star.awt import XFocusListener
class FocusListenerProcAdapter( unohelper.Base, XFocusListener ):
    def __init__( self, oProcToCall):
        self.oProcToCall = oProcToCall

    def focusGained(self, FocusEvent):
        if callable( self.oProcToCall ):
            self.oProcToCall(FocusEvent)

from com.sun.star.awt import XKeyListener
class KeyListenerProcAdapter( unohelper.Base, XKeyListener ):
    def __init__(self, oProcToCall):
        self.oProcToCall = oProcToCall

    def keyPressed(self, KeyEvent):
        if callable( self.oProcToCall ):
            self.oProcToCall(KeyEvent)

    def disposing(self, Event):
        # TODO: Implement ?
        pass
Private