merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / dlelstnr.hxx
blob225f470b44b072bfb81f0992775de0c6bff242c6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _DLELSTNR_HXX_
29 #define _DLELSTNR_HXX_
31 #include <cppuhelper/weak.hxx>
32 #include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
33 #include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
34 #include <com/sun/star/frame/XTerminateListener.hpp>
35 #include <com/sun/star/frame/XDesktop.hpp>
36 #include <cppuhelper/implbase2.hxx> // helper for implementations
39 namespace com { namespace sun { namespace star {
40 namespace linguistic2 {
41 class XDictionaryList;
42 class XLinguServiceManager;
43 class XProofreadingIterator;
45 namespace frame {
46 class XTerminateListener;
48 } } }
50 ///////////////////////////////////////////////////////////////////////////
51 // SwLinguServiceEventListener
52 // is a EventListener that triggers spellchecking
53 // and hyphenation when relevant changes (to the
54 // dictionaries of the dictionary list, or properties) were made.
57 class SwLinguServiceEventListener :
58 public cppu::WeakImplHelper2
60 com::sun::star::linguistic2::XLinguServiceEventListener,
61 com::sun::star::frame::XTerminateListener
64 com::sun::star::uno::Reference<
65 com::sun::star::frame::XDesktop > xDesktop;
66 com::sun::star::uno::Reference<
67 com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr;
68 com::sun::star::uno::Reference<
69 com::sun::star::linguistic2::XProofreadingIterator > xGCIterator;
71 // disallow use of copy-constructor and assignment operator
72 SwLinguServiceEventListener(const SwLinguServiceEventListener &);
73 SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &);
75 public:
76 SwLinguServiceEventListener();
77 virtual ~SwLinguServiceEventListener();
79 // XEventListener
80 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
82 // XDictionaryListEventListener
83 virtual void SAL_CALL processDictionaryListEvent( const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent) throw( ::com::sun::star::uno::RuntimeException );
85 // XLinguServiceEventListener
86 virtual void SAL_CALL processLinguServiceEvent( const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent ) throw(::com::sun::star::uno::RuntimeException);
88 // XTerminateListener
89 virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
90 virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
94 #endif