diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-03-30 17:55:05 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-03-31 11:19:23 +0000 |
commit | 51d7f466df85f679f54e4e690f8b5e602192eb7b (patch) | |
tree | 94a72abb002879ef4dca830ad652415521b8bdd5 /sd/source/ui/dlg | |
parent | 7a2d55a1943e51895d808e87f1766b44761a495a (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 'sd/source/ui/dlg')
-rw-r--r-- | sd/source/ui/dlg/NavigatorChildWindow.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 13 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 9 |
3 files changed, 14 insertions, 13 deletions
diff --git a/sd/source/ui/dlg/NavigatorChildWindow.cxx b/sd/source/ui/dlg/NavigatorChildWindow.cxx index 6796e23f9dec..2be517542021 100644 --- a/sd/source/ui/dlg/NavigatorChildWindow.cxx +++ b/sd/source/ui/dlg/NavigatorChildWindow.cxx @@ -36,11 +36,10 @@ void RequestNavigatorUpdate (SfxBindings* pBindings) && pBindings->GetDispatcher() != nullptr) { SfxBoolItem aItem (SID_NAVIGATOR_INIT, true); - pBindings->GetDispatcher()->Execute( + pBindings->GetDispatcher()->ExecuteList( SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aItem, - 0L); + { &aItem }); } } diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 5c129ca3fa58..97c43fb55fee 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -411,8 +411,8 @@ IMPL_LINK_TYPED( AnimationWindow, ClickGetObjectHdl, Button*, pBtn, void ) // Code now in AddObj() SfxBoolItem aItem( SID_ANIMATOR_ADD, true ); - GetBindings().GetDispatcher()->Execute( - SID_ANIMATOR_ADD, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_ANIMATOR_ADD, SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_TYPED( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void ) @@ -494,8 +494,8 @@ IMPL_LINK_NOARG_TYPED(AnimationWindow, ClickCreateGroupHdl, Button*, void) // Code now in CreatePresObj() SfxBoolItem aItem( SID_ANIMATOR_CREATE, true ); - GetBindings().GetDispatcher()->Execute( - SID_ANIMATOR_CREATE, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_ANIMATOR_CREATE, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(AnimationWindow, ModifyBitmapHdl, Edit&, void) @@ -693,8 +693,9 @@ bool AnimationWindow::Close() { SfxBoolItem aItem( SID_ANIMATION_OBJECTS, false ); - GetBindings().GetDispatcher()->Execute( - SID_ANIMATION_OBJECTS, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_ANIMATION_OBJECTS, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aItem }); SfxDockingWindow::Close(); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 8003a4aec1ee..92c42153758d 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -280,8 +280,8 @@ IMPL_LINK_NOARG_TYPED(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void) if( ePage != PAGE_NONE ) { SfxUInt16Item aItem( SID_NAVIGATOR_PAGE, (sal_uInt16)ePage ); - mpBindings->GetDispatcher()->Execute( - SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); + mpBindings->GetDispatcher()->ExecuteList(SID_NAVIGATOR_PAGE, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); } } @@ -374,8 +374,9 @@ IMPL_LINK_NOARG_TYPED(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool) if( !aStr.isEmpty() ) { SfxStringItem aItem( SID_NAVIGATOR_OBJECT, aStr ); - mpBindings->GetDispatcher()->Execute( - SID_NAVIGATOR_OBJECT, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); + mpBindings->GetDispatcher()->ExecuteList( + SID_NAVIGATOR_OBJECT, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); //set sign variable maTlbObjects->MarkCurEntry(aStr); |