summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-04-09 15:57:12 +0300
committerTor Lillqvist <tml@collabora.com>2018-05-31 13:53:27 +0300
commita9f7d22fa80c422275259c57e9c0d50cd8a0447e (patch)
tree92efe650346f62bb6ac271ce8443494ccfe3356b /sw
parent2774593a4b23ba831b3b4d5729a241416634e917 (diff)
We need to keep an ooo::vba::word::XDocument ref in the SwDocShell for...
... Application callbacks that want to pass a such. DocumentBeforeClose() is one. (Not yet implemented.) Change-Id: I1e065d608a55e054fb41b0006a76c731915f3ebb
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docsh.hxx3
-rw-r--r--sw/source/uibase/app/docsh.cxx5
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index d93f626b585b..d61cd712a51a 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -23,6 +23,7 @@
#include <rtl/ref.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <ooo/vba/XSinkCaller.hpp>
+#include <ooo/vba/word/XDocument.hpp>
#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
#include "swdllapi.h"
@@ -88,6 +89,7 @@ class SW_DLLPUBLIC SwDocShell
///< SID_MAIL_EXPORT_FINISHED needs to restore
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationDocumentEventsCaller;
+ css::uno::Reference< ooo::vba::word::XDocument> mxAutomationDocumentObject;
/// Methods for access to doc.
SAL_DLLPRIVATE void AddLink();
@@ -315,6 +317,7 @@ public:
void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller);
void CallAutomationDocumentEventSinks(const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments);
+ void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument > const& xDocument);
};
/** Find the right DocShell and create a new one:
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index fadf271a19c3..96608f2f1dee 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1389,4 +1389,9 @@ void SwDocShell::CallAutomationDocumentEventSinks(const OUString& Method, css::u
mxAutomationDocumentEventsCaller->CallSinks(Method, Arguments);
}
+void SwDocShell::RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument > const& xDocument)
+{
+ mxAutomationDocumentObject = xDocument;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */