diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-03-23 14:35:24 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-31 12:16:13 +0200 |
commit | 6c8c727ffd97e247f1ea43c1a47a55e6d5f68331 (patch) | |
tree | 2fdffdffc01a7016f370c1ba94653a9d9e679422 /sw/inc/docsh.hxx | |
parent | 9673511526660ff23169456b2cce560d968107b3 (diff) |
Add Document.Close event generation
Use a similar idea as for the Application events. Use the SwDocShell
to keep the XSinkCaller. Call the Close event from
SwXTextDocument::close().
Change-Id: Ie873238c5a966fc859d45b59f424ae0e9f4fbfc7
Reviewed-on: https://gerrit.libreoffice.org/55110
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sw/inc/docsh.hxx')
-rw-r--r-- | sw/inc/docsh.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 0be7ea783433..dc8214c534d8 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -22,6 +22,7 @@ #include <memory> #include <rtl/ref.hxx> #include <com/sun/star/uno/Sequence.h> +#include <ooo/vba/XSinkCaller.hpp> #include <sfx2/docfac.hxx> #include <sfx2/objsh.hxx> #include "swdllapi.h" @@ -86,6 +87,8 @@ class SW_DLLPUBLIC SwDocShell ///< whether SID_MAIL_PREPAREEXPORT removed content that ///< SID_MAIL_EXPORT_FINISHED needs to restore + css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationDocumentEventsCaller; + /// Methods for access to doc. SAL_DLLPRIVATE void AddLink(); SAL_DLLPRIVATE void RemoveLink(); @@ -309,6 +312,9 @@ public: virtual void SetChangeRecording( bool bActivate ) override; virtual void SetProtectionPassword( const OUString &rPassword ) override; virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override; + + void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller); + void CallAutomationDocumentEventSinks(const OUString& Method, const css::uno::Sequence< css::uno::Any >& Arguments); }; /** Find the right DocShell and create a new one: |