bump product version to 4.2.0.1
[LibreOffice.git] / include / unotools / eventlisteneradapter.hxx
blob394c910be956538257d24d93d05417b38607405f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #include <unotools/unotoolsdllapi.h>
21 #ifndef INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
22 #define INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
23 #include <com/sun/star/lang/XComponent.hpp>
25 //.........................................................................
26 namespace utl
28 //.........................................................................
30 struct OEventListenerAdapterImpl;
31 //=====================================================================
32 //= OEventListenerAdapter
33 //=====================================================================
34 /** base class for non-UNO dispose listeners
36 class UNOTOOLS_DLLPUBLIC OEventListenerAdapter
38 friend class OEventListenerImpl;
40 private:
41 UNOTOOLS_DLLPRIVATE OEventListenerAdapter( const OEventListenerAdapter& _rSource ); // never implemented
42 UNOTOOLS_DLLPRIVATE const OEventListenerAdapter& operator=( const OEventListenerAdapter& _rSource ); // never implemented
44 protected:
45 OEventListenerAdapterImpl* m_pImpl;
47 protected:
48 OEventListenerAdapter();
49 virtual ~OEventListenerAdapter();
51 void startComponentListening( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxComp );
52 void stopComponentListening( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxComp );
53 void stopAllComponentListening( );
55 virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource ) = 0;
58 //.........................................................................
59 } // namespace utl
60 //.........................................................................
62 #endif // INCLUDED_UNOTOOLS_EVENTLISTENERADAPTER_HXX
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */