LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/toolkit/helper - listenermultiplexer.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 25 52.0 %
Date: 2012-12-27 Functions: 13 91 14.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_
      21             : #define _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_
      22             : 
      23             : #include <toolkit/dllapi.h>
      24             : #include <com/sun/star/lang/XEventListener.hpp>
      25             : #include <com/sun/star/awt/XFocusListener.hpp>
      26             : #include <com/sun/star/awt/XWindowListener.hpp>
      27             : #include <com/sun/star/awt/XVclContainerListener.hpp>
      28             : #include <com/sun/star/awt/XKeyListener.hpp>
      29             : #include <com/sun/star/awt/XMouseListener.hpp>
      30             : #include <com/sun/star/awt/XMouseMotionListener.hpp>
      31             : #include <com/sun/star/awt/XPaintListener.hpp>
      32             : #include <com/sun/star/awt/XTopWindowListener.hpp>
      33             : #include <com/sun/star/awt/XTextListener.hpp>
      34             : #include <com/sun/star/awt/XActionListener.hpp>
      35             : #include <com/sun/star/awt/XItemListener.hpp>
      36             : #include <com/sun/star/awt/XTabListener.hpp>
      37             : #include <com/sun/star/container/XContainerListener.hpp>
      38             : #include <com/sun/star/awt/XSpinListener.hpp>
      39             : #include <com/sun/star/awt/XAdjustmentListener.hpp>
      40             : #include <com/sun/star/awt/XMenuListener.hpp>
      41             : #include <com/sun/star/awt/tree/XTreeExpansionListener.hpp>
      42             : #include <com/sun/star/awt/tree/XTreeEditListener.hpp>
      43             : #include <com/sun/star/view/XSelectionChangeListener.hpp>
      44             : #include <com/sun/star/util/VetoException.hpp>
      45             : #include <cppuhelper/weak.hxx>
      46             : #include <cppuhelper/interfacecontainer.hxx>
      47             : #include <osl/mutex.hxx>
      48             : #include <toolkit/helper/mutexhelper.hxx>
      49             : #include <toolkit/helper/macros.hxx>
      50             : #include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
      51             : #include <com/sun/star/awt/tab/XTabPageContainerListener.hpp>
      52             : //  ----------------------------------------------------
      53             : //  class ListenerMultiplexerBase
      54             : //  ----------------------------------------------------
      55             : 
      56             : class TOOLKIT_DLLPUBLIC ListenerMultiplexerBase : public MutexHelper,
      57             :                                 public ::cppu::OInterfaceContainerHelper,
      58             :                                 public ::com::sun::star::uno::XInterface
      59             : {
      60             : private:
      61             :     ::cppu::OWeakObject&    mrContext;
      62             : 
      63             : protected:
      64        3976 :     ::cppu::OWeakObject&    GetContext() { return mrContext; }
      65             : 
      66             : public:
      67             :     ListenerMultiplexerBase( ::cppu::OWeakObject& rSource );
      68             :     virtual ~ListenerMultiplexerBase();
      69             : 
      70             :     // ::com::sun::star::uno::XInterface
      71             :     ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
      72           0 :     void                        SAL_CALL acquire() throw()  { mrContext.acquire(); }
      73           0 :     void                        SAL_CALL release() throw()  { mrContext.release(); }
      74             : };
      75             : 
      76             : 
      77             : //  ----------------------------------------------------
      78             : //  class EventListenerMultiplexer
      79             : //  ----------------------------------------------------
      80         368 : DECL_LISTENERMULTIPLEXER_START( EventListenerMultiplexer, ::com::sun::star::lang::XEventListener )
      81             : DECL_LISTENERMULTIPLEXER_END
      82             : 
      83             : //  ----------------------------------------------------
      84             : //  class FocusListenerMultiplexer
      85             : //  ----------------------------------------------------
      86         361 : DECL_LISTENERMULTIPLEXER_START( FocusListenerMultiplexer, ::com::sun::star::awt::XFocusListener )
      87             :     void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException);
      88             :     void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw(::com::sun::star::uno::RuntimeException);
      89             : DECL_LISTENERMULTIPLEXER_END
      90             : 
      91             : 
      92             : //  ----------------------------------------------------
      93             : //  class WindowListenerMultiplexer
      94             : //  ----------------------------------------------------
      95         361 : DECL_LISTENERMULTIPLEXER_START( WindowListenerMultiplexer, ::com::sun::star::awt::XWindowListener )
      96             :     void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException);
      97             :     void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw(::com::sun::star::uno::RuntimeException);
      98             :     void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
      99             :     void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     100             : DECL_LISTENERMULTIPLEXER_END
     101             : 
     102             : 
     103             : 
     104             : //  ----------------------------------------------------
     105             : //  class VclContainerListenerMultiplexer
     106             : //  ----------------------------------------------------
     107         359 : DECL_LISTENERMULTIPLEXER_START( VclContainerListenerMultiplexer, ::com::sun::star::awt::XVclContainerListener )
     108             :     void SAL_CALL windowAdded( const ::com::sun::star::awt::VclContainerEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     109             :     void SAL_CALL windowRemoved( const ::com::sun::star::awt::VclContainerEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     110             : DECL_LISTENERMULTIPLEXER_END
     111             : 
     112             : //  ----------------------------------------------------
     113             : //  class KeyListenerMultiplexer
     114             : //  ----------------------------------------------------
     115         361 : DECL_LISTENERMULTIPLEXER_START( KeyListenerMultiplexer, ::com::sun::star::awt::XKeyListener )
     116             :     void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     117             :     void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     118             : DECL_LISTENERMULTIPLEXER_END
     119             : 
     120             : //  ----------------------------------------------------
     121             : //  class MouseListenerMultiplexer
     122             : //  ----------------------------------------------------
     123         361 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( MouseListenerMultiplexer, ::com::sun::star::awt::XMouseListener )
     124             :     void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     125             :     void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     126             :     void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     127             :     void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     128             : DECL_LISTENERMULTIPLEXER_END
     129             : 
     130             : //  ----------------------------------------------------
     131             : //  class MouseMotionListenerMultiplexer
     132             : //  ----------------------------------------------------
     133         361 : DECL_LISTENERMULTIPLEXER_START( MouseMotionListenerMultiplexer, ::com::sun::star::awt::XMouseMotionListener )
     134             :     void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     135             :     void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     136             : DECL_LISTENERMULTIPLEXER_END
     137             : 
     138             : //  ----------------------------------------------------
     139             : //  class PaintListenerMultiplexer
     140             : //  ----------------------------------------------------
     141         361 : DECL_LISTENERMULTIPLEXER_START( PaintListenerMultiplexer, ::com::sun::star::awt::XPaintListener )
     142             :     void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw(::com::sun::star::uno::RuntimeException);
     143             : DECL_LISTENERMULTIPLEXER_END
     144             : 
     145             : //  ----------------------------------------------------
     146             : //  class TopWindowListenerMultiplexer
     147             : //  ----------------------------------------------------
     148         359 : DECL_LISTENERMULTIPLEXER_START( TopWindowListenerMultiplexer, ::com::sun::star::awt::XTopWindowListener )
     149             :     void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     150             :     void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     151             :     void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     152             :     void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     153             :     void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     154             :     void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     155             :     void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw(::com::sun::star::uno::RuntimeException);
     156             : DECL_LISTENERMULTIPLEXER_END
     157             : 
     158             : //  ----------------------------------------------------
     159             : //  class TextListenerMultiplexer
     160             : //  ----------------------------------------------------
     161           2 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TextListenerMultiplexer, ::com::sun::star::awt::XTextListener )
     162             :     void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     163             : DECL_LISTENERMULTIPLEXER_END
     164             : 
     165             : //  ----------------------------------------------------
     166             : //  class ActionListenerMultiplexer
     167             : //  ----------------------------------------------------
     168           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( ActionListenerMultiplexer, ::com::sun::star::awt::XActionListener )
     169             :     void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     170             : DECL_LISTENERMULTIPLEXER_END
     171             : 
     172             : //  ----------------------------------------------------
     173             : //  class ItemListenerMultiplexer
     174             : //  ----------------------------------------------------
     175           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( ItemListenerMultiplexer, ::com::sun::star::awt::XItemListener )
     176             :     void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     177             : DECL_LISTENERMULTIPLEXER_END
     178             : 
     179             : //  ----------------------------------------------------
     180             : //  class TabListenerMultiplexer
     181             : //  ----------------------------------------------------
     182           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabListenerMultiplexer, ::com::sun::star::awt::XTabListener )
     183             :     void SAL_CALL inserted( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
     184             :     void SAL_CALL removed( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
     185             :     void SAL_CALL changed( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException);
     186             :     void SAL_CALL activated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
     187             :     void SAL_CALL deactivated( ::sal_Int32 ID ) throw (::com::sun::star::uno::RuntimeException);
     188             : DECL_LISTENERMULTIPLEXER_END
     189             : 
     190             : //  ----------------------------------------------------
     191             : //  class ContainerListenerMultiplexer
     192             : //  ----------------------------------------------------
     193           2 : DECL_LISTENERMULTIPLEXER_START( ContainerListenerMultiplexer, ::com::sun::star::container::XContainerListener )
     194             :     void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     195             :     void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     196             :     void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
     197             : DECL_LISTENERMULTIPLEXER_END
     198             : 
     199             : //  ----------------------------------------------------
     200             : //  class SpinListenerMultiplexer
     201             : //  ----------------------------------------------------
     202           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( SpinListenerMultiplexer, ::com::sun::star::awt::XSpinListener )
     203             :     void SAL_CALL up( const ::com::sun::star::awt::SpinEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     204             :     void SAL_CALL down( const ::com::sun::star::awt::SpinEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     205             :     void SAL_CALL first( const ::com::sun::star::awt::SpinEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     206             :     void SAL_CALL last( const ::com::sun::star::awt::SpinEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     207             : DECL_LISTENERMULTIPLEXER_END
     208             : 
     209             : //  ----------------------------------------------------
     210             : //  class AdjustmentListenerMultiplexer
     211             : //  ----------------------------------------------------
     212           0 : DECL_LISTENERMULTIPLEXER_START( AdjustmentListenerMultiplexer, ::com::sun::star::awt::XAdjustmentListener )
     213             :     void SAL_CALL adjustmentValueChanged( const ::com::sun::star::awt::AdjustmentEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     214             : DECL_LISTENERMULTIPLEXER_END
     215             : 
     216             : //  ----------------------------------------------------
     217             : //  class MenuListenerMultiplexer
     218             : //  ----------------------------------------------------
     219          63 : DECL_LISTENERMULTIPLEXER_START( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener )
     220             :     void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     221             :     void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     222             :     void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     223             :     void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
     224             : DECL_LISTENERMULTIPLEXER_END
     225             : 
     226             : //  ----------------------------------------------------
     227             : //  class TreeSelectionListenerMultiplexer
     228             : //  ----------------------------------------------------
     229           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TreeSelectionListenerMultiplexer, ::com::sun::star::view::XSelectionChangeListener )
     230             :     virtual void SAL_CALL selectionChanged( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     231             : DECL_LISTENERMULTIPLEXER_END
     232             : 
     233             : //  ----------------------------------------------------
     234             : //  class TreeExpansionListenerMultiplexer
     235             : //  ----------------------------------------------------
     236           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TreeExpansionListenerMultiplexer, ::com::sun::star::awt::tree::XTreeExpansionListener )
     237             :     virtual void SAL_CALL requestChildNodes( const ::com::sun::star::awt::tree::TreeExpansionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     238             :     virtual void SAL_CALL treeExpanding( const ::com::sun::star::awt::tree::TreeExpansionEvent& aEvent ) throw (::com::sun::star::awt::tree::ExpandVetoException, ::com::sun::star::uno::RuntimeException);
     239             :     virtual void SAL_CALL treeCollapsing( const ::com::sun::star::awt::tree::TreeExpansionEvent& aEvent ) throw (::com::sun::star::awt::tree::ExpandVetoException, ::com::sun::star::uno::RuntimeException);
     240             :     virtual void SAL_CALL treeExpanded( const ::com::sun::star::awt::tree::TreeExpansionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     241             :     virtual void SAL_CALL treeCollapsed( const ::com::sun::star::awt::tree::TreeExpansionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     242             : DECL_LISTENERMULTIPLEXER_END
     243             : 
     244             : //  ----------------------------------------------------
     245             : //  class TreeEditListenerMultiplexer
     246             : //  ----------------------------------------------------
     247           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TreeEditListenerMultiplexer, ::com::sun::star::awt::tree::XTreeEditListener )
     248             :     virtual void SAL_CALL nodeEditing( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::uno::RuntimeException,::com::sun::star::util::VetoException);
     249             :     virtual void SAL_CALL nodeEdited( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node, const ::rtl::OUString& NewText ) throw (::com::sun::star::uno::RuntimeException);
     250             : DECL_LISTENERMULTIPLEXER_END
     251             : 
     252             : //  ----------------------------------------------------
     253             : //  class SelectionListenerMultiplexer
     254             : //  ----------------------------------------------------
     255           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( SelectionListenerMultiplexer, ::com::sun::star::awt::grid::XGridSelectionListener )
     256             :     void SAL_CALL selectionChanged( const ::com::sun::star::awt::grid::GridSelectionEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     257             : DECL_LISTENERMULTIPLEXER_END
     258             : 
     259             : //  ----------------------------------------------------
     260             : //  class TabPageListenerMultiplexer
     261             : //  ----------------------------------------------------
     262           0 : DECL_LISTENERMULTIPLEXER_START_DLLPUB( TabPageListenerMultiplexer, ::com::sun::star::awt::tab::XTabPageContainerListener )
     263             :     void SAL_CALL tabPageActivated( const ::com::sun::star::awt::tab::TabPageActivatedEvent& aEvent ) throw (::com::sun::star::uno::RuntimeException);
     264             : DECL_LISTENERMULTIPLEXER_END
     265             : 
     266             : #endif // _TOOLKIT_HELPER_LISTENERMULTIPLEXER_HXX_
     267             : 
     268             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10