20#ifndef INCLUDED_SFX2_SOURCE_INC_EVENTSUPPLIER_HXX
21#define INCLUDED_SFX2_SOURCE_INC_EVENTSUPPLIER_HXX
25#include <com/sun/star/document/DocumentEvent.hpp>
26#include <com/sun/star/container/XNameReplace.hpp>
27#include <com/sun/star/document/XDocumentEventListener.hpp>
28#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
29#include <com/sun/star/uno/Reference.hxx>
30#include <com/sun/star/uno/Type.hxx>
37 class NamedValueCollection;
44class SfxEvents_Impl final :
public ::cppu::WeakImplHelper< css::container::XNameReplace, css::document::XDocumentEventListener >
47 std::vector< css::uno::Sequence < css::beans::PropertyValue > >
maEventData;
48 css::uno::Reference< css::document::XDocumentEventBroadcaster >
mxBroadcaster;
54 css::uno::Reference< css::document::XDocumentEventBroadcaster >
const & xBroadcaster );
58 virtual void SAL_CALL
replaceByName(
const OUString & aName,
const css::uno::Any & aElement )
override;
61 virtual css::uno::Any SAL_CALL
getByName(
const OUString& aName )
override;
62 virtual css::uno::Sequence< OUString > SAL_CALL
getElementNames()
override;
73 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
79 const ::comphelper::NamedValueCollection& i_eventDescriptor,
82 static void Execute( css::uno::Sequence < css::beans::PropertyValue >
const & aEventData,
const css::document::DocumentEvent& aTrigger,
SfxObjectShell* pDoc );
static std::unique_ptr< SvxMacro > ConvertToMacro(const css::uno::Any &rElement, SfxObjectShell *pDoc)
css::uno::Sequence< OUString > maEventNames
virtual ~SfxEvents_Impl() override
css::uno::Reference< css::document::XDocumentEventBroadcaster > mxBroadcaster
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
virtual sal_Bool SAL_CALL hasElements() override
SfxEvents_Impl(SfxObjectShell *pShell, css::uno::Reference< css::document::XDocumentEventBroadcaster > const &xBroadcaster)
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL documentEventOccured(const css::document::DocumentEvent &aEvent) override
static void NormalizeMacro(const css::uno::Any &rIn, css::uno::Any &rOut, SfxObjectShell *pDoc)
std::vector< css::uno::Sequence< css::beans::PropertyValue > > maEventData
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
SfxObjectShell * mpObjShell
static bool isScriptURLAllowed(const OUString &aScriptURL)
Check if script URL whitelist exists, and if so, if current script url is part of it.
static void Execute(css::uno::Sequence< css::beans::PropertyValue > const &aEventData, const css::document::DocumentEvent &aTrigger, SfxObjectShell *pDoc)