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 | |
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')
28 files changed, 132 insertions, 109 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 569469065e15..f4ae8aa3e738 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1002,19 +1002,22 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation case SID_REPLYTO_POSTIT: { const SfxUnoAnyItem aItem( SID_REPLYTO_POSTIT, Any( xAnnotation ) ); - pDispatcher->Execute( SID_REPLYTO_POSTIT, SfxCallMode::ASYNCHRON, &aItem, 0 ); + pDispatcher->ExecuteList(SID_REPLYTO_POSTIT, + SfxCallMode::ASYNCHRON, { &aItem }); break; } case SID_DELETE_POSTIT: { const SfxUnoAnyItem aItem( SID_DELETE_POSTIT, Any( xAnnotation ) ); - pDispatcher->Execute( SID_DELETE_POSTIT, SfxCallMode::ASYNCHRON, &aItem, 0 ); + pDispatcher->ExecuteList(SID_DELETE_POSTIT, SfxCallMode::ASYNCHRON, + { &aItem }); break; } case SID_DELETEALLBYAUTHOR_POSTIT: { const SfxStringItem aItem( SID_DELETEALLBYAUTHOR_POSTIT, sAuthor ); - pDispatcher->Execute( SID_DELETEALLBYAUTHOR_POSTIT, SfxCallMode::ASYNCHRON, &aItem, 0 ); + pDispatcher->ExecuteList( SID_DELETEALLBYAUTHOR_POSTIT, + SfxCallMode::ASYNCHRON, { &aItem }); break; } case SID_DELETEALL_POSTIT: diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index a8c065c74cda..c3606cae3f83 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -678,8 +678,9 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) { SfxBoolItem aIsChangedItem(SID_MODIFYPAGE, !bIsDocEmpty); SfxUInt32Item eAutoLayout( ID_VAL_WHATLAYOUT, (sal_uInt32) AUTOLAYOUT_TITLE ); - pViewFrame->GetDispatcher()->Execute(SID_MODIFYPAGE, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aIsChangedItem, &eAutoLayout, 0L); + pViewFrame->GetDispatcher()->ExecuteList(SID_MODIFYPAGE, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aIsChangedItem, &eAutoLayout }); } // clear document info diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx index 2bd4b7b7749a..78066ac0d657 100644 --- a/sd/source/ui/app/tmplctrl.cxx +++ b/sd/source/ui/app/tmplctrl.cxx @@ -122,7 +122,8 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt ) { SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PK_STANDARD); SfxStringItem aStyle( ATTR_PRESLAYOUT_NAME, pMaster->GetName() ); - pViewFrame->GetDispatcher()->Execute(SID_PRESENTATION_LAYOUT,SfxCallMode::SLOT, &aStyle, 0L ); + pViewFrame->GetDispatcher()->ExecuteList( + SID_PRESENTATION_LAYOUT, SfxCallMode::SLOT, { &aStyle }); pViewFrame->GetBindings().Invalidate(SID_PRESENTATION_LAYOUT); pViewFrame->GetBindings().Invalidate(SID_STATUS_LAYOUT); } 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); diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 0295166d9964..dcec27d767a3 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -197,8 +197,11 @@ DrawDocShell::~DrawDocShell() pFrame = SfxViewFrame::GetFirst( this ); if( pFrame ) - pFrame->GetDispatcher()->Execute( - SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L); + { + pFrame->GetDispatcher()->ExecuteList( + SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aItem }); + } } void DrawDocShell::GetState(SfxItemSet &rSet) diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 76898a62cac7..4488b7bb2eff 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -721,9 +721,10 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt) !mpDocSh->IsReadOnly()) { SfxUInt16Item aItem(SID_TEXTEDIT, 2); - mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_TEXTEDIT, SfxCallMode::ASYNCHRON | - SfxCallMode::RECORD, &aItem, 0L); + mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList( + SID_TEXTEDIT, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aItem }); } else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRUP) { diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx index 79757080dc4e..5a753bb25895 100644 --- a/sd/source/ui/func/fuoltext.cxx +++ b/sd/source/ui/func/fuoltext.cxx @@ -155,15 +155,17 @@ bool FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt) if ( rMEvt.IsMod1() ) { // open in new frame - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aBrowseItem, &aReferer }); } else { // open in current frame SfxFrameItem aFrameItem( SID_DOCFRAME, pFrame ); - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } } } diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index b39c56910356..6d6c9fa7c8d2 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -820,11 +820,10 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) // try to activate textedit mode for the selected object SfxStringItem aInputString(SID_ATTR_CHAR, OUString(rKEvt.GetCharCode())); - mpViewShell->GetViewFrame()->GetDispatcher()->Execute( + mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList( SID_ATTR_CHAR, SfxCallMode::ASYNCHRON, - &aInputString, - 0L); + { &aInputString }); // consumed bReturn = true; @@ -869,11 +868,10 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) mpView->MarkObj(pCandidate, mpView->GetSdrPageView()); SfxStringItem aInputString(SID_ATTR_CHAR, OUString(rKEvt.GetCharCode())); - mpViewShell->GetViewFrame()->GetDispatcher()->Execute( + mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList( SID_ATTR_CHAR, SfxCallMode::ASYNCHRON, - &aInputString, - 0L); + { &aInputString }); // consumed bReturn = true; diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index fbd0587ea3e2..2979c9099416 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -259,8 +259,9 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) SfxUInt16Item aItem(SID_TEXTEDIT, 1); mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_TEXTEDIT, SfxCallMode::SYNCHRON | - SfxCallMode::RECORD, &aItem, 0L); + ExecuteList(SID_TEXTEDIT, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, + { &aItem }); return bReturn; // CAUTION, due to the synchronous slot the object is deleted now } } @@ -285,15 +286,17 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod1()) { // Open in new frame - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aBrowseItem, &aReferer }); } else { // Open in current frame SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } bReturn = true; @@ -1249,9 +1252,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); SfxBoolItem aBrowseItem( SID_BROWSE, true ); mpWindow->ReleaseMouse(); - pFrame->GetDispatcher()-> - Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); bAnimated = true; } @@ -1273,8 +1276,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) { // Jump to Bookmark (Page or Object) SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark()); - mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_NAVIGATOR_OBJECT, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L); + mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList( + SID_NAVIGATOR_OBJECT, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); bAnimated = true; } break; @@ -1291,8 +1295,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); SfxBoolItem aBrowseItem( SID_BROWSE, true ); pFrame->GetDispatcher()-> - Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); + ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } bAnimated = true; @@ -1304,8 +1309,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) // Jump to the previous page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_PREVIOUS); mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, 0L); + ExecuteList(SID_NAVIGATOR_PAGE, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aItem }); bAnimated = true; } break; @@ -1315,8 +1321,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) // Jump to the next page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_NEXT); mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, 0L); + ExecuteList(SID_NAVIGATOR_PAGE, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aItem }); bAnimated = true; } break; @@ -1326,8 +1333,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) // Jump to the first page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_FIRST); mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, 0L); + ExecuteList(SID_NAVIGATOR_PAGE, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aItem }); bAnimated = true; } break; @@ -1337,8 +1345,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) // Jump to the last page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_LAST); mpViewShell->GetViewFrame()->GetDispatcher()-> - Execute(SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, 0L); + ExecuteList(SID_NAVIGATOR_PAGE, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aItem }); bAnimated = true; } break; @@ -1381,11 +1390,9 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) - pViewFrm->GetDispatcher()->Execute( SID_OPENDOC, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aUrl, - &aBrowsing, - 0L ); + pViewFrm->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aUrl, &aBrowsing }); } bAnimated = true; diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 9aecfe3d046e..f5d83bdf8465 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -342,15 +342,17 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod1()) { // open in new frame - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aBrowseItem, &aReferer }); } else { // open in current frame SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); - pFrame->GetDispatcher()->Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); + pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } } else diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 482d9cd9d66b..6f99264c71a7 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1546,11 +1546,11 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const css::awt::Mo SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) - pViewFrm->GetDispatcher()->Execute( SID_OPENDOC, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aUrl, - &aBrowsing, - 0L ); + { + pViewFrm->GetDispatcher()->ExecuteList( SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aUrl, &aBrowsing }); + } } } break; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index a839bdca04c3..25aebfa3c579 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -1019,8 +1019,10 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri // inform navigator about change SfxBoolItem aItem( SID_NAVIGATOR_INIT, true ); if (mrSlideSorter.GetViewShell() != nullptr) - mrSlideSorter.GetViewShell()->GetDispatcher()->Execute( - SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + mrSlideSorter.GetViewShell()->GetDispatcher()->ExecuteList( + SID_NAVIGATOR_INIT, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aItem }); } return bSuccess; diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 2720f6370af4..064fb2c50821 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -208,7 +208,8 @@ void TableDesignWidget::ApplyStyle() { SfxDispatcher* pDispatcher = getDispatcher( mrBase ); SfxStringItem aArg( SID_TABLE_STYLE, sStyleName ); - pDispatcher->Execute(SID_INSERT_TABLE, SfxCallMode::ASYNCHRON, &aArg, 0 ); + pDispatcher->ExecuteList(SID_INSERT_TABLE, SfxCallMode::ASYNCHRON, + { &aArg }); } } catch( Exception& ) diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index e7cfe2bb4788..5a0207637d65 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -478,7 +478,8 @@ void SdUnoDrawView::SetZoom( sal_Int16 nZoom ) SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); if( pDispatcher ) { - pDispatcher->Execute(SID_ATTR_ZOOM,SfxCallMode::SYNCHRON,&aZoomItem, 0L); + pDispatcher->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, + { &aZoomItem }); } } } @@ -528,7 +529,8 @@ void SdUnoDrawView::SetZoomType ( sal_Int16 nType ) return; } SvxZoomItem aZoomItem( eZoomType ); - pDispatcher->Execute(SID_ATTR_ZOOM,SfxCallMode::SYNCHRON,&aZoomItem, 0L); + pDispatcher->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, + { &aZoomItem }); } } } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0ad60d106942..b5f667e16bcb 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1399,9 +1399,8 @@ void Outliner::EnterEditMode (bool bGrabFocus) // Make FuText the current function. SfxUInt16Item aItem (SID_TEXTEDIT, 1); std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); - pViewShell->GetDispatcher()-> - Execute(SID_TEXTEDIT, SfxCallMode::SYNCHRON | - SfxCallMode::RECORD, &aItem, 0L); + pViewShell->GetDispatcher()->ExecuteList(SID_TEXTEDIT, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aItem }); // To be consistent with the usual behaviour in the Office the text // object that is put into edit mode would have also to be selected. diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index de29408f2abd..710f073b59bb 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -162,8 +162,8 @@ void DrawViewShell::SelectionHasChanged() //Update3DWindow(); // 3D-Controller SfxBoolItem aItem( SID_3D_STATE, true ); - GetViewFrame()->GetDispatcher()->Execute( - SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList( + SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); SdrOle2Obj* pOleObj = nullptr; diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 68aa34b767b4..b2b123d5c585 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1049,8 +1049,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // The value (sal_uInt16)0xFFFF means set bullet on/off. SfxUInt16Item aItem(FN_SVX_SET_BULLET, (sal_uInt16)0xFFFF); - GetViewFrame()->GetDispatcher()->Execute(FN_SVX_SET_BULLET, - SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList(FN_SVX_SET_BULLET, + SfxCallMode::RECORD, { &aItem }); } break; @@ -1058,8 +1058,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // The value (sal_uInt16)0xFFFF means set bullet on/off. SfxUInt16Item aItem(FN_SVX_SET_NUMBER, (sal_uInt16)0xFFFF); - GetViewFrame()->GetDispatcher()->Execute(FN_SVX_SET_NUMBER, - SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList(FN_SVX_SET_NUMBER, + SfxCallMode::RECORD, { &aItem }); } break; @@ -1737,12 +1737,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if (pViewFrm) - pViewFrm->GetDispatcher()->Execute( SID_OPENDOC, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aUrl, &aTarget, - &aFrm, &aReferer, - &aNewView, &aBrowsing, - nullptr); + { + pViewFrm->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aUrl, &aTarget, &aFrm, &aReferer, + &aNewView, &aBrowsing }); + } } } } diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 477b5b79413d..6c6396d24dd1 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -73,8 +73,8 @@ void DrawViewShell::ModelHasChanged() GetViewFrame()->GetBindings().Invalidate( SID_NAVIGATOR_STATE, true ); SfxBoolItem aItem( SID_3D_STATE, true ); - GetViewFrame()->GetDispatcher()->Execute( - SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList( + SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); // now initialize the TextEditOutliner which was newly created by the draw engine ::Outliner* pOutliner = mpDrawView->GetTextEditOutliner(); @@ -300,9 +300,9 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView) if ( mpDrawView->IsDesignMode() != pView->IsDesignMode() ) { SfxBoolItem aDesignModeItem( SID_FM_DESIGN_MODE, pView->IsDesignMode() ); - GetViewFrame()->GetDispatcher()->Execute(SID_FM_DESIGN_MODE, + GetViewFrame()->GetDispatcher()->ExecuteList(SID_FM_DESIGN_MODE, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aDesignModeItem, nullptr); + { &aDesignModeItem }); } // has to be called in the end, because it executes a WriteFrameViewData() diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index b4ece57c30c5..0a2958c2776b 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -177,8 +177,8 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) else if( nType == css::gallery::GalleryItemType::MEDIA ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() ); - GetViewFrame()->GetDispatcher()->Execute(SID_INSERT_AVMEDIA, - SfxCallMode::SYNCHRON, &aMediaURLItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_INSERT_AVMEDIA, + SfxCallMode::SYNCHRON, { &aMediaURLItem }); } GetDocSh()->SetWaitCursor( false ); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 35cfb9e6593e..52cd788cf58a 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -749,8 +749,8 @@ void DrawViewShell::Notify (SfxBroadcaster&, const SfxHint& rHint) mbReadOnly = GetDocSh()->IsReadOnly(); SfxBoolItem aItem( SID_FM_DESIGN_MODE, !mbReadOnly ); - GetViewFrame()->GetDispatcher()->Execute( SID_FM_DESIGN_MODE, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_FM_DESIGN_MODE, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } } diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index eb6842c8eb29..3369ee40ca55 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -121,8 +121,8 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName ) // inform navigator about change SfxBoolItem aItem( SID_NAVIGATOR_INIT, true ); - GetViewFrame()->GetDispatcher()->Execute(SID_NAVIGATOR_INIT, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, nullptr); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_NAVIGATOR_INIT, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); // Tell the slide sorter about the name change (necessary for // accessibility.) diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 6cf3b4e9a9b1..2d0d157606ed 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -135,8 +135,8 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq ) SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); SfxBoolItem aBrowseItem(SID_BROWSE, true); pFrame->GetDispatcher()-> - Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, nullptr); + ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } SfxBindings& rBindings = GetViewFrame()->GetBindings(); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index d22f581206cc..fe585eed2c7e 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -618,8 +618,8 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) // Make FuText the current function. SfxUInt16Item aItem (SID_TEXTEDIT, 1); GetViewFrame()->GetDispatcher()-> - Execute(SID_TEXTEDIT, SfxCallMode::SYNCHRON | - SfxCallMode::RECORD, &aItem, nullptr); + ExecuteList(SID_TEXTEDIT, SfxCallMode::SYNCHRON | + SfxCallMode::RECORD, { &aItem }); // Put text object into edit mode. GetView()->SdrBeginTextEdit(static_cast<SdrTextObj*>(pObj), pPageView); break; diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index 7964e5dcd305..a2fe62bb2d36 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -139,9 +139,9 @@ void DrawViewShell::AssignFrom3DWindow() // transform text into 3D sal_uInt16 nSId = SID_CONVERT_TO_3D; SfxBoolItem aItem( nSId, true ); - GetViewFrame()->GetDispatcher()->Execute( + GetViewFrame()->GetDispatcher()->ExecuteList( nSId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aItem, nullptr); + { &aItem }); // Determine if a FILL attribute is set. // If not, hard set a fill attribute diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index d673e06c3410..bc696eecf9df 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -125,7 +125,8 @@ void PresentationViewShell::Activate( bool bIsMDIActivate ) { SfxBoolItem aItem( SID_NAVIGATOR_INIT, true ); - GetViewFrame()->GetDispatcher()->Execute( SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_NAVIGATOR_INIT, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); if( xSlideShow.is() ) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index e7543a0ff0f5..30b9f30637e5 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -316,11 +316,10 @@ void ViewShell::Activate(bool bIsMDIActivate) // thus, the Navigator will also get a current status SfxBoolItem aItem( SID_NAVIGATOR_INIT, true ); if (GetDispatcher() != nullptr) - GetDispatcher()->Execute( + GetDispatcher()->ExecuteList( SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aItem, - 0L); + { &aItem }); SfxViewShell* pViewShell = GetViewShell(); OSL_ASSERT (pViewShell!=nullptr); |