summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun4.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-03-30 17:55:05 +0200
committerMichael Stahl <mstahl@redhat.com>2016-03-31 11:19:23 +0000
commit51d7f466df85f679f54e4e690f8b5e602192eb7b (patch)
tree94a72abb002879ef4dca830ad652415521b8bdd5 /sc/source/ui/view/viewfun4.cxx
parent7a2d55a1943e51895d808e87f1766b44761a495a (diff)
sfx2: make SfxDispatcher::Execute() less variadic ...
... and less overloaded; C++11 initializer_list should make undefined behavior as fixed in ba0a866b83f016fd460320e7d057dd107e019f19 less likely. Change-Id: I15cc0804451b6a4fcbfaa623f9a30db222207865 Reviewed-on: https://gerrit.libreoffice.org/23666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc/source/ui/view/viewfun4.cxx')
-rw-r--r--sc/source/ui/view/viewfun4.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 0c9793e857fa..c46cbd578ab5 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -576,9 +576,9 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
if( ::avmedia::MediaWindow::isMediaURL( aStrURL, ""/*TODO?*/ ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL );
- return ( nullptr != GetViewData().GetDispatcher().Execute(
+ return ( nullptr != GetViewData().GetDispatcher().ExecuteList(
SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
- &aMediaURLItem, nullptr) );
+ { &aMediaURLItem }) );
}
if (!bLink) // for bLink only graphics or URL
@@ -605,8 +605,9 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
// Open Asynchronously, because it can also happen from D&D
// and that is not so good for the MAC...
- return ( nullptr != rDispatcher.Execute( SID_OPENDOC,
- SfxCallMode::ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, nullptr) );
+ return (nullptr != rDispatcher.ExecuteList(SID_OPENDOC,
+ SfxCallMode::ASYNCHRON,
+ { &aFileNameItem, &aFilterItem, &aTargetItem}));
}
}