summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx14
-rw-r--r--xmloff/source/script/XMLEventImportHelper.cxx3
2 files changed, 15 insertions, 2 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index fdf943d775a3..cf55462b4602 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -57,6 +57,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/documentconstants.hxx>
+#include <comphelper/documentinfo.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/propertysequence.hxx>
#include <unotools/fontcvt.hxx>
@@ -399,7 +400,8 @@ SvXMLImport::SvXMLImport(
maNamespaceHandler( new SvXMLImportFastNamespaceHandler() ),
mxFastDocumentHandler( nullptr ),
mbIsFormsSupported( true ),
- mbIsTableShapeSupported( false )
+ mbIsTableShapeSupported( false ),
+ mbNotifyMacroEventRead( false )
{
SAL_WARN_IF( !xContext.is(), "xmloff.core", "got no service manager" );
InitCtor_();
@@ -2177,6 +2179,16 @@ void SvXMLImport::registerNamespaces()
}
}
+void SvXMLImport::NotifyMacroEventRead()
+{
+ if (mbNotifyMacroEventRead)
+ return;
+
+ comphelper::DocumentInfo::notifyMacroEventRead(mxModel);
+
+ mbNotifyMacroEventRead = true;
+}
+
SvXMLImportFastNamespaceHandler::SvXMLImportFastNamespaceHandler()
{
}
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx
index 0e45525856af..93fd43da93e8 100644
--- a/xmloff/source/script/XMLEventImportHelper.cxx
+++ b/xmloff/source/script/XMLEventImportHelper.cxx
@@ -36,7 +36,6 @@ XMLEventImportHelper::XMLEventImportHelper() :
{
}
-
XMLEventImportHelper::~XMLEventImportHelper()
{
// delete factories
@@ -117,6 +116,8 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext(
const OUString& rXmlEventName,
const OUString& rLanguage)
{
+ rImport.NotifyMacroEventRead();
+
SvXMLImportContext* pContext = nullptr;
// translate event name form xml to api