diff options
Diffstat (limited to 'sfx2/source/notify/eventsupplier.cxx')
-rw-r--r-- | sfx2/source/notify/eventsupplier.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 933581c7fd..c1f6ee3767 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,14 +42,14 @@ #include <com/sun/star/util/XURLTransformer.hpp> #endif #include <tools/urlobj.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> #include <sfx2/appuno.hxx> #include <sfx2/objsh.hxx> #include <sfx2/sfxbasemodel.hxx> #include <sfx2/evntconf.hxx> -#include <svtools/eventcfg.hxx> +#include <unotools/eventcfg.hxx> -#include <svtools/securityoptions.hxx> +#include <unotools/securityoptions.hxx> #include <comphelper/processfactory.hxx> #include "eventsupplier.hxx" @@ -339,7 +339,7 @@ void SAL_CALL SfxEvents_Impl::notifyEvent( const DOCEVENTOBJECT& aEvent ) throw( aGuard.clear(); Execute( aEventData, css::document::DocumentEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any()), mpObjShell ); } - + //-------------------------------------------------------------------------------------------------------- // --- ::lang::XEventListener --- //-------------------------------------------------------------------------------------------------------- @@ -593,7 +593,7 @@ sal_Bool SAL_CALL ModelCollectionEnumeration::hasMoreElements() return (m_pEnumerationIt != m_lModels.end()); // <- SAFE } - + css::uno::Any SAL_CALL ModelCollectionEnumeration::nextElement() throw(css::container::NoSuchElementException, css::lang::WrappedTargetException , @@ -609,10 +609,10 @@ css::uno::Any SAL_CALL ModelCollectionEnumeration::nextElement() ++m_pEnumerationIt; aLock.clear(); // <- SAFE - + return css::uno::makeAny(xModel); } - + SFX_IMPL_XSERVICEINFO( SfxGlobalEvents_Impl, "com.sun.star.frame.GlobalEventBroadcaster", "com.sun.star.comp.sfx2.GlobalEventBroadcaster" ) SFX_IMPL_ONEINSTANCEFACTORY( SfxGlobalEvents_Impl ); @@ -650,7 +650,7 @@ css::uno::Reference< css::container::XNameReplace > SAL_CALL SfxGlobalEvents_Imp } //----------------------------------------------------------------------------- -void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener) +void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener) throw(css::uno::RuntimeException) { // container is threadsafe @@ -694,7 +694,7 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const css::document::EventObject { css::document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any()); implts_notifyJobExecution(aEvent); - implts_checkAndExecuteEventBindings(aDocEvent); + implts_checkAndExecuteEventBindings(aDocEvent); implts_notifyListener(aDocEvent); } @@ -712,7 +712,7 @@ void SAL_CALL SfxGlobalEvents_Impl::disposing(const css::lang::EventObject& aEve throw(css::uno::RuntimeException) { css::uno::Reference< css::frame::XModel > xDoc(aEvent.Source, UNO_QUERY); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -728,9 +728,9 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement) { css::uno::Reference< css::frame::XModel > xDoc; aElement >>= xDoc; - + sal_Bool bHas = sal_False; - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -738,8 +738,8 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement) bHas = sal_True; aLock.clear(); // <- SAFE - - return bHas; + + return bHas; } //----------------------------------------------------------------------------- @@ -755,7 +755,7 @@ void SAL_CALL SfxGlobalEvents_Impl::insert( const css::uno::Any& aElement ) ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."), static_cast< css::container::XSet* >(this), 0); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -792,7 +792,7 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement ) ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."), static_cast< css::container::XSet* >(this), 0); - + // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); TModelList::iterator pIt = impl_searchDoc(xDoc); @@ -800,10 +800,10 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement ) throw css::container::NoSuchElementException( ::rtl::OUString(), static_cast< css::container::XSet* >(this)); - m_lModels.erase(pIt); + m_lModels.erase(pIt); aLock.clear(); // <- SAFE - + css::uno::Reference< css::document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, UNO_QUERY ); if (xDocBroadcaster.is()) xDocBroadcaster->removeDocumentEventListener(this); @@ -829,7 +829,7 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxGlobalEvents_Imp UNO_QUERY); aLock.clear(); // <- SAFE - + return xEnum; } @@ -879,7 +879,7 @@ void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const css::docume css::uno::Reference< css::container::XNameReplace > xEvents = m_xEvents; aLock.clear(); // <- SAFE - + css::uno::Any aAny; if (xEvents.is()) aAny = xEvents->getByName(aEvent.EventName); @@ -907,7 +907,7 @@ TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Refere { if (!xModel.is()) return m_lModels.end(); - + TModelList::iterator pIt; for ( pIt = m_lModels.begin(); pIt != m_lModels.end() ; @@ -917,7 +917,7 @@ TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Refere if (xContainerDoc == xModel) break; } - + return pIt; } |