2000-09-18 11:15:01 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* $RCSfile: dlelstnr.hxx,v $
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* $Revision: 1.5 $
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* last change: $Author: rt $ $Date: 2005-09-09 01:40:15 $
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2005-09-08 19:40:15 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _DLELSTNR_HXX_
|
|
|
|
#define _DLELSTNR_HXX_
|
|
|
|
|
|
|
|
#include <cppuhelper/weak.hxx>
|
|
|
|
|
2000-10-27 05:55:57 -05:00
|
|
|
#ifndef _COM_SUN_STAR_LINGUISTIC2_XDICTIONARYLISTEVENTLISTENER_HPP_
|
|
|
|
#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
|
2000-09-18 11:15:01 -05:00
|
|
|
#endif
|
2001-02-27 07:53:05 -06:00
|
|
|
#ifndef _COM_SUN_STAR_LINGUISTIC2_XLINGUSERVICEEVENTLISTENER_HPP_
|
|
|
|
#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
|
|
|
|
#endif
|
2000-11-02 06:35:27 -06:00
|
|
|
#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_
|
|
|
|
#include <com/sun/star/frame/XTerminateListener.hpp>
|
|
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
|
|
|
|
#include <com/sun/star/frame/XDesktop.hpp>
|
2000-09-18 11:15:01 -05:00
|
|
|
#endif
|
|
|
|
|
2000-11-02 06:35:27 -06:00
|
|
|
#ifndef _CPPUHELPER_IMPLBASE2_HXX_
|
|
|
|
#include <cppuhelper/implbase2.hxx> // helper for implementations
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace linguistic2 {
|
|
|
|
class XDictionaryList;
|
2001-02-27 07:53:05 -06:00
|
|
|
class XLinguServiceManager;
|
2000-11-02 06:35:27 -06:00
|
|
|
}
|
|
|
|
namespace frame {
|
|
|
|
class XTerminateListener;
|
|
|
|
}
|
|
|
|
} } }
|
|
|
|
|
2000-09-18 11:15:01 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2001-02-27 07:53:05 -06:00
|
|
|
// SwLinguServiceEventListener
|
|
|
|
// is a EventListener that triggers spellchecking
|
|
|
|
// and hyphenation when relevant changes (to the
|
|
|
|
// dictionaries of the dictionary list, or properties) were made.
|
2000-09-18 11:15:01 -05:00
|
|
|
//
|
|
|
|
|
2001-02-27 07:53:05 -06:00
|
|
|
class SwLinguServiceEventListener :
|
2000-11-02 06:35:27 -06:00
|
|
|
public cppu::WeakImplHelper2
|
|
|
|
<
|
2001-02-27 07:53:05 -06:00
|
|
|
com::sun::star::linguistic2::XLinguServiceEventListener,
|
|
|
|
com::sun::star::frame::XTerminateListener
|
2000-11-02 06:35:27 -06:00
|
|
|
>
|
2000-09-18 11:15:01 -05:00
|
|
|
{
|
2001-02-27 07:53:05 -06:00
|
|
|
com::sun::star::uno::Reference<
|
|
|
|
com::sun::star::frame::XDesktop > xDesktop;
|
|
|
|
com::sun::star::uno::Reference<
|
|
|
|
com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr;
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
// disallow use of copy-constructor and assignment operator
|
2001-02-27 07:53:05 -06:00
|
|
|
SwLinguServiceEventListener(const SwLinguServiceEventListener &);
|
|
|
|
SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &);
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
public:
|
2001-02-27 07:53:05 -06:00
|
|
|
SwLinguServiceEventListener();
|
|
|
|
virtual ~SwLinguServiceEventListener();
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2000-10-27 05:55:57 -05:00
|
|
|
// XEventListener
|
|
|
|
virtual void SAL_CALL disposing(
|
2000-11-02 06:35:27 -06:00
|
|
|
const ::com::sun::star::lang::EventObject& rEventObj )
|
2000-10-27 05:55:57 -05:00
|
|
|
throw(::com::sun::star::uno::RuntimeException);
|
|
|
|
|
|
|
|
// XDictionaryListEventListener
|
|
|
|
virtual void SAL_CALL processDictionaryListEvent(
|
2000-11-02 06:35:27 -06:00
|
|
|
const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent)
|
2000-10-27 05:55:57 -05:00
|
|
|
throw( ::com::sun::star::uno::RuntimeException );
|
2000-11-02 06:35:27 -06:00
|
|
|
|
2001-02-27 07:53:05 -06:00
|
|
|
// XLinguServiceEventListener
|
|
|
|
virtual void SAL_CALL processLinguServiceEvent(
|
|
|
|
const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent )
|
|
|
|
throw(::com::sun::star::uno::RuntimeException);
|
|
|
|
|
2000-11-02 06:35:27 -06:00
|
|
|
// XTerminateListener
|
|
|
|
virtual void SAL_CALL queryTermination(
|
|
|
|
const ::com::sun::star::lang::EventObject& rEventObj )
|
|
|
|
throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL notifyTermination(
|
|
|
|
const ::com::sun::star::lang::EventObject& rEventObj )
|
|
|
|
throw(::com::sun::star::uno::RuntimeException);
|
2000-09-18 11:15:01 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|