Skip to content

Commit

Permalink
tdf#152266 only warn about script:event-listener with non-empty targets
Browse files Browse the repository at this point in the history
Change-Id: I19518c4872b522686b3df1881ccee02d840c3db4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143727
Tested-by: Jenkins
Reviewed-by: Michael Stahl <[email protected]>
  • Loading branch information
Caolán McNamara authored and mistmist committed Dec 14, 2022
1 parent acfc2ae commit 30f1327
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions xmloff/source/script/XMLEventImportHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions xmloff/source/script/XMLScriptContextFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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) };

Expand Down
3 changes: 3 additions & 0 deletions xmloff/source/script/XMLStarBasicContextFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 30f1327

Please sign in to comment.