tdf#152266 only warn about script:event-listener with non-empty targets

Change-Id: I19518c4872b522686b3df1881ccee02d840c3db4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143727
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx
index aa409e7..aebfd13 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 c5d7cb2..3ebc45c 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 e2619897..bab59a0 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)),