diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-08 16:25:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-08 19:45:00 +0000 |
commit | 8a33bde5288a4a652de35846aa34354044b872c3 (patch) | |
tree | 9631aa5852d88e277c8c919bac557af436711391 /xmloff | |
parent | c2c7c378ff8c1e3ba12420aa75189b9b1fe8515b (diff) |
tdf#152266 only warn about script:event-listener with non-empty targets
Change-Id: I19518c4872b522686b3df1881ccee02d840c3db4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143829
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/script/XMLEventImportHelper.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/script/XMLScriptContextFactory.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/script/XMLStarBasicContextFactory.cxx | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index aa409e77765d..aebfd13dc7ee 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.cxx @@ -102,8 +102,6 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( const OUString& rXmlEventName, const OUString& rLanguage) { - rImport.NotifyMacroEventRead(); - SvXMLImportContext* pContext = nullptr; // translate event name from xml to api diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx index c5d7cb2d0d05..3ebc45c1c98a 100644 --- a/xmloff/source/script/XMLScriptContextFactory.cxx +++ b/xmloff/source/script/XMLScriptContextFactory.cxx @@ -53,6 +53,9 @@ SvXMLImportContext* XMLScriptContextFactory::CreateContext( // else: ignore } + if (!sURLVal.isEmpty()) + rImport.NotifyMacroEventRead(); + Sequence<PropertyValue> aValues{ comphelper::makePropertyValue(gsEventType, OUString(gsScript)), comphelper::makePropertyValue(gsURL, sURLVal) }; diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx index e26198978596..bab59a0d7505 100644 --- a/xmloff/source/script/XMLStarBasicContextFactory.cxx +++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx @@ -81,6 +81,9 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext( sMacroNameVal = sMacroNameVal.copy( rDoc.getLength()+1 ); } + if (!sMacroNameVal.isEmpty()) + rImport.NotifyMacroEventRead(); + Sequence<PropertyValue> aValues { comphelper::makePropertyValue(gsEventType, OUString(gsStarBasic)), |