update dev300-m57
[ooovba.git] / sw / inc / dlelstnr.hxx
blob93c4d1cd5bf8e3bee337cc570585bd30d52639a1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlelstnr.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DLELSTNR_HXX_
32 #define _DLELSTNR_HXX_
34 #include <cppuhelper/weak.hxx>
35 #include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
36 #include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
37 #include <com/sun/star/frame/XTerminateListener.hpp>
38 #include <com/sun/star/frame/XDesktop.hpp>
39 #include <cppuhelper/implbase2.hxx> // helper for implementations
42 namespace com { namespace sun { namespace star {
43 namespace linguistic2 {
44 class XDictionaryList;
45 class XLinguServiceManager;
46 class XProofreadingIterator;
48 namespace frame {
49 class XTerminateListener;
51 } } }
53 ///////////////////////////////////////////////////////////////////////////
54 // SwLinguServiceEventListener
55 // is a EventListener that triggers spellchecking
56 // and hyphenation when relevant changes (to the
57 // dictionaries of the dictionary list, or properties) were made.
60 class SwLinguServiceEventListener :
61 public cppu::WeakImplHelper2
63 com::sun::star::linguistic2::XLinguServiceEventListener,
64 com::sun::star::frame::XTerminateListener
67 com::sun::star::uno::Reference<
68 com::sun::star::frame::XDesktop > xDesktop;
69 com::sun::star::uno::Reference<
70 com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr;
71 com::sun::star::uno::Reference<
72 com::sun::star::linguistic2::XProofreadingIterator > xGCIterator;
74 // disallow use of copy-constructor and assignment operator
75 SwLinguServiceEventListener(const SwLinguServiceEventListener &);
76 SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &);
78 public:
79 SwLinguServiceEventListener();
80 virtual ~SwLinguServiceEventListener();
82 // XEventListener
83 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
85 // XDictionaryListEventListener
86 virtual void SAL_CALL processDictionaryListEvent( const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent) throw( ::com::sun::star::uno::RuntimeException );
88 // XLinguServiceEventListener
89 virtual void SAL_CALL processLinguServiceEvent( const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent ) throw(::com::sun::star::uno::RuntimeException);
91 // XTerminateListener
92 virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
93 virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
97 #endif