20#include <com/sun/star/frame/Desktop.hpp>
21#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
22#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
23#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
24#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
29#include <com/sun/star/uno/Reference.h>
43using namespace ::com::sun::star::linguistic2::LinguServiceEventFlags;
54 m_xLngSvcMgr->addLinguServiceManagerListener(
static_cast<XLinguServiceEventListener *
>(
this) );
59 Reference< XLinguServiceEventBroadcaster > xBC(
m_xGCIterator, UNO_QUERY );
61 xBC->addLinguServiceEventListener(
static_cast<XLinguServiceEventListener *
>(
this) );
64 catch (
const uno::Exception&)
75 const LinguServiceEvent& rLngSvcEvent )
79 bool bIsSpellWrong = 0 != (rLngSvcEvent.nEvent & SPELL_WRONG_WORDS_AGAIN);
80 bool bIsSpellAll = 0 != (rLngSvcEvent.nEvent & SPELL_CORRECT_WORDS_AGAIN);
81 if (0 != (rLngSvcEvent.nEvent & PROOFREAD_AGAIN))
82 bIsSpellWrong = bIsSpellAll =
true;
83 if (bIsSpellWrong || bIsSpellAll)
87 if (!(rLngSvcEvent.nEvent & HYPHENATE_AGAIN))
104 const EventObject& rEventObj )
120 const EventObject& rEventObj )
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &rEventObj) override
virtual void SAL_CALL disposing(const css::lang::EventObject &rEventObj) override
XEventListener.
css::uno::Reference< css::linguistic2::XProofreadingIterator > m_xGCIterator
virtual ~SwLinguServiceEventListener() override
css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLngSvcMgr
SwLinguServiceEventListener()
virtual void SAL_CALL queryTermination(const css::lang::EventObject &rEventObj) override
XTerminateListener.
virtual void SAL_CALL processLinguServiceEvent(const css::linguistic2::LinguServiceEvent &rLngSvcEvent) override
XLinguServiceEventListener.
static void CheckSpellChanges(bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags)
static SwView * GetNextView(SwView const *)
static SwView * GetFirstView()
SwWrtShell & GetWrtShell() const
SwWrtShell * GetWrtShellPtr() const
#define TOOLS_WARN_EXCEPTION(area, stream)
Reference< XComponentContext > getProcessComponentContext()
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)