summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-01-12 14:16:51 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-04-03 16:36:22 +0200
commit02ebdf3146d582f7b6c9e3b91d7c2baab4a5fadd (patch)
tree748bbe4a52b1a2d9ee53222bb6fbaca975cc5e6a /scripting
parent56b8f9af4c0b3954708db574001c593ded70dbab (diff)
Filter out "SynchronMode" too
Change-Id: I2c5111ee34929b9740796f5e1f08b3a8a58218e4 Reviewed-on: https://gerrit.libreoffice.org/51964 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 2147cbf6204ebca8fb5a306ad5d81215b1175ac2) Reviewed-on: https://gerrit.libreoffice.org/52089 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/52312
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index cf125b3ac84d..6aaa2055bd90 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -186,10 +186,12 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
int argCount = 0;
for ( int index = 0; index < lArgs.getLength(); index++ )
{
- // Sometimes we get a propertyval with name = "Referer"
- // this is not an argument to be passed to script, so
- // ignore.
- if ( lArgs[ index ].Name != "Referer" ||
+ // Sometimes we get a propertyval with name = "Referer" or "SynchronMode". These
+ // are not actual arguments to be passed to script, but flags describing the
+ // call, so ignore. Who thought that passing such "meta-arguments" mixed in with
+ // real arguments was a good idea?
+ if ( (lArgs[ index ].Name != "Referer" &&
+ lArgs[ index ].Name != "SynchronMode") ||
lArgs[ index ].Name.isEmpty() ) //TODO:???
{
inArgs.realloc( ++argCount );