diff options
129 files changed, 728 insertions, 563 deletions
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 5edfd67460d7..638b7b9dabeb 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -136,7 +136,8 @@ void MediaFloater::dispatchCurrentURL() url = mpMediaWindow->getURL(); } const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, url ); - pDispatcher->Execute(SID_INSERT_AVMEDIA, SfxCallMode::RECORD, &aMediaURLItem, nullptr); + pDispatcher->ExecuteList(SID_INSERT_AVMEDIA, SfxCallMode::RECORD, + { &aMediaURLItem }); } } diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 131e510cc1ea..36c5b95b815e 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -309,9 +309,9 @@ void LibBox::NotifyIDE() OUString aLibName = pEntry->GetLibName(); SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->Execute( - SID_BASICIDE_LIBSELECTED, - SfxCallMode::SYNCHRON, &aDocumentItem, &aLibNameItem, nullptr + pDispatcher->ExecuteList( + SID_BASICIDE_LIBSELECTED, SfxCallMode::SYNCHRON, + { &aDocumentItem, &aLibNameItem } ); } ReleaseFocus(); diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 652d53f4e504..6d450e217a2a 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -930,9 +930,9 @@ bool TreeListBox::OpenCurrent() aDesc.GetLibName(), aDesc.GetName(), aDesc.GetMethodName(), ConvertType(aDesc.GetType()) ); - pDispatcher->Execute( - SID_BASICIDE_SHOWSBX, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr + pDispatcher->ExecuteList( + SID_BASICIDE_SHOWSBX, SfxCallMode::SYNCHRON, + { &aSbxItem } ); return true; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index ae6a9375f3f8..d0ab4a3c0658 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -554,8 +554,8 @@ void TabBar::EndRenaming() SfxUInt16Item aID( SID_BASICIDE_ARG_TABID, GetEditPageId() ); SfxStringItem aNewName( SID_BASICIDE_ARG_MODULENAME, GetEditText() ); if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->Execute( SID_BASICIDE_NAMECHANGEDONTAB, - SfxCallMode::SYNCHRON, &aID, &aNewName, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_NAMECHANGEDONTAB, + SfxCallMode::SYNCHRON, { &aID, &aNewName }); } } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 4070b5062de5..894c23a7ef67 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -679,8 +679,8 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) if (SfxDispatcher* pDispatcher = GetDispatcher()) { - pDispatcher->Execute(SID_BASICIDE_EDITMACRO, - SfxCallMode::ASYNCHRON, &aInfoItem, nullptr); + pDispatcher->ExecuteList(SID_BASICIDE_EDITMACRO, + SfxCallMode::ASYNCHRON, { &aInfoItem }); } EndDialog(Macro_Edit); } @@ -691,8 +691,8 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) DeleteMacro(); if (SfxDispatcher* pDispatcher = GetDispatcher()) { - pDispatcher->Execute( SID_BASICIDE_UPDATEMODULESOURCE, - SfxCallMode::SYNCHRON, &aInfoItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_UPDATEMODULESOURCE, + SfxCallMode::SYNCHRON, { &aInfoItem }); } CheckButtons(); UpdateFields(); @@ -720,8 +720,8 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) if (SfxDispatcher* pDispatcher = GetDispatcher()) { - pDispatcher->Execute(SID_BASICIDE_EDITMACRO, - SfxCallMode::ASYNCHRON, &aInfoItem, nullptr); + pDispatcher->ExecuteList(SID_BASICIDE_EDITMACRO, + SfxCallMode::ASYNCHRON, { &aInfoItem }); } StoreMacroDescription(); EndDialog(Macro_New); diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index a2632191b50d..cd700809f804 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -631,8 +631,8 @@ IMPL_LINK_TYPED( LibPage, ButtonHdl, Button *, pButton, void ) OUString aLibName( SvTabListBox::GetEntryText( pCurEntry, 0 ) ); SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->Execute( SID_BASICIDE_LIBSELECTED, - SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_LIBSELECTED, + SfxCallMode::ASYNCHRON, { &aDocItem, &aLibNameItem }); EndTabDialog(); return; } @@ -1355,8 +1355,8 @@ void LibPage::DeleteCurrent() SfxUsrAnyItem aDocItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( m_aCurDocument.getDocumentOrNull() ) ); SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->Execute( SID_BASICIDE_LIBREMOVED, - SfxCallMode::SYNCHRON, &aDocItem, &aLibNameItem, 0 ); + pDispatcher->ExecuteList(SID_BASICIDE_LIBREMOVED, + SfxCallMode::SYNCHRON, { &aDocItem, &aLibNameItem }); // remove library from module and dialog library containers if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) @@ -1534,8 +1534,8 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE ); if (SfxDispatcher* pDispatcher = GetDispatcher()) - pDispatcher->Execute( SID_BASICIDE_SBXINSERTED, - SfxCallMode::SYNCHRON, &aSbxItem, 0 ); + pDispatcher->ExecuteList(SID_BASICIDE_SBXINSERTED, + SfxCallMode::SYNCHRON, { &aSbxItem }); if( pBasicBox ) { diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 982f77dfa279..bf5b6ae32a89 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -121,8 +121,8 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT if (SfxDispatcher* pDispatcher = GetDispatcher()) { SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, rNewText, ConvertType( eType ) ); - pDispatcher->Execute( SID_BASICIDE_SBXRENAMED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXRENAMED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } // OV-Bug?! @@ -354,8 +354,8 @@ TriState ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeLi if( pDispatcher ) { SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rSourceDoc, aSourceLibName, aSourceName, ConvertType( eType ) ); - pDispatcher->Execute( SID_BASICIDE_SBXDELETED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXDELETED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } } @@ -446,8 +446,8 @@ TriState ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeLi if( pDispatcher ) { SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDestDoc, aDestLibName, aSourceName, ConvertType( eType ) ); - pDispatcher->Execute( SID_BASICIDE_SBXINSERTED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXINSERTED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } } @@ -717,8 +717,8 @@ IMPL_LINK_TYPED( ObjectPage, ButtonHdl, Button *, pButton, void ) } SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aModName, TreeListBox::ConvertType( aDesc.GetType() ) ); - pDispatcher->Execute(SID_BASICIDE_SHOWSBX, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList(SID_BASICIDE_SHOWSBX, + SfxCallMode::SYNCHRON, { &aSbxItem }); } } else // Nur Lib selektiert @@ -737,8 +737,8 @@ IMPL_LINK_TYPED( ObjectPage, ButtonHdl, Button *, pButton, void ) SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); if ( pDispatcher ) { - pDispatcher->Execute(SID_BASICIDE_LIBSELECTED, - SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, nullptr); + pDispatcher->ExecuteList(SID_BASICIDE_LIBSELECTED, + SfxCallMode::ASYNCHRON, { &aDocItem, &aLibNameItem }); } } EndTabDialog(); @@ -844,8 +844,8 @@ void ObjectPage::NewDialog() SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, TYPE_DIALOG ); if (SfxDispatcher* pDispatcher = GetDispatcher()) { - pDispatcher->Execute( SID_BASICIDE_SBXINSERTED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXINSERTED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName ); SvTreeListEntry* pRootEntry = m_pBasicBox->FindRootEntry( aDocument, eLocation ); @@ -900,8 +900,8 @@ void ObjectPage::DeleteCurrent() if (SfxDispatcher* pDispatcher = GetDispatcher()) { SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aName, TreeListBox::ConvertType( eType ) ); - pDispatcher->Execute( SID_BASICIDE_SBXDELETED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXDELETED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } try @@ -1003,8 +1003,8 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE ); if (SfxDispatcher* pDispatcher = GetDispatcher()) { - pDispatcher->Execute( SID_BASICIDE_SBXINSERTED, - SfxCallMode::SYNCHRON, &aSbxItem, nullptr); + pDispatcher->ExecuteList( SID_BASICIDE_SBXINSERTED, + SfxCallMode::SYNCHRON, { &aSbxItem }); } LibraryLocation eLocation = rDocument.getLibraryLocation( aLibName ); SvTreeListEntry* pRootEntry = rBasicBox.FindRootEntry( rDocument, eLocation ); diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 02b29e70f086..b423b1cc0627 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -211,8 +211,8 @@ void SvxHpLinkDlg::Apply() aItemSet.GetItem (SID_HYPERLINK_SETLINK)); OUString aStrEmpty; if ( aItem->GetURL() != aStrEmpty ) - GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SfxCallMode::ASYNCHRON | - SfxCallMode::RECORD, aItem, 0L); + GetDispatcher()->ExecuteList(SID_HYPERLINK_SETLINK, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem }); static_cast<SvxHyperlinkTabPageBase*>( GetTabPage( GetCurPageId() ) )->DoApply(); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 479d6a961ed9..2545c726f4fd 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -354,10 +354,9 @@ void SvxHyperlinkNewDocTp::DoApply () SfxStringItem aFlags (SID_OPTIONS, aStrFlags); // open url - const SfxPoolItem* pReturn = GetDispatcher()->Execute( SID_OPENDOC, - SfxCallMode::SYNCHRON, - &aName, &aFlags, - &aFrame, &aReferer, 0L ); + const SfxPoolItem* pReturn = GetDispatcher()->ExecuteList( + SID_OPENDOC, SfxCallMode::SYNCHRON, + { &aName, &aFlags, &aFrame, &aReferer }); // save new doc const SfxViewFrameItem *pItem = dynamic_cast<const SfxViewFrameItem*>( pReturn ); // SJ: pReturn is NULL if the Hyperlink @@ -368,9 +367,9 @@ void SvxHyperlinkNewDocTp::DoApply () { SfxStringItem aNewName( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC, - SfxCallMode::SYNCHRON, - &aNewName, 0L ); + pViewFrame->GetDispatcher()->ExecuteList( + SID_SAVEASDOC, SfxCallMode::SYNCHRON, + { &aNewName }); } } diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 0bbd5c7ffbe9..8357b71482c4 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1351,7 +1351,8 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet if ( pViewFrame ) { SfxDispatcher* pDispatch = pViewFrame->GetDispatcher(); - pDispatch->Execute( SID_ATTR_YEAR2000, SfxCallMode::ASYNCHRON, pItem, 0L); + pDispatch->ExecuteList(SID_ATTR_YEAR2000, + SfxCallMode::ASYNCHRON, { pItem }); } aMisc.SetYear2000(nY2K); } @@ -1431,25 +1432,25 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) pItem = nullptr; if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); + pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); + pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, false, &pItem )) { - pDispatch->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); + pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); bSaveSpellCheck = true; } if( SfxItemState::SET == rSet.GetItemState(SID_AUTOSPELL_CHECK, false, &pItem )) { bool bOnlineSpelling = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - pDispatch->Execute(SID_AUTOSPELL_CHECK, - SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, pItem, 0L); + pDispatch->ExecuteList(SID_AUTOSPELL_CHECK, + SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, { pItem }); xProp->setIsSpellAuto( bOnlineSpelling ); } @@ -1467,7 +1468,8 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) SfxViewFrame* _pViewFrame = SfxViewFrame::GetFirst(); while ( _pViewFrame ) { - _pViewFrame->GetDispatcher()->Execute(pItem->Which(), SfxCallMode::ASYNCHRON, pItem, 0L); + _pViewFrame->GetDispatcher()->ExecuteList(pItem->Which(), + SfxCallMode::ASYNCHRON, { pItem }); _pViewFrame = SfxViewFrame::GetNext( *_pViewFrame ); } } diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index bbb2df16b6eb..5ce479e2bd0a 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -23,12 +23,12 @@ #include <sfx2/dllapi.h> #include <sal/types.h> -#include <stdarg.h> - #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> #include <o3tl/typed_flags_set.hxx> +#include <initializer_list> + class SfxSlotServer; class SfxShell; class SfxRequest; @@ -129,9 +129,9 @@ public: SfxItemSet* pInternalArgs, sal_uInt16 nModi = 0); - const SfxPoolItem* Execute( sal_uInt16 nSlot, + const SfxPoolItem* ExecuteList( sal_uInt16 nSlot, SfxCallMode nCall, - const SfxPoolItem *pArg1, ... ); + std::initializer_list<SfxPoolItem const*> args); const SfxPoolItem* Execute( sal_uInt16 nSlot, SfxCallMode nCall, diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 12bc05c6046c..0e2256620ffe 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -921,12 +921,11 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, const SdrM // No SID_SILENT anymore 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 }); + } } bool ScGlobal::IsSystemRTL() diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 50545c0baabb..38c10aa2e79f 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2275,9 +2275,9 @@ void ScPosWnd::DoEnter() SfxStringItem aPosItem( SID_CURRENTCELL, aText ); SfxBoolItem aUnmarkItem( FN_PARAM_1, true ); // remove existing selection - pViewSh->GetViewData().GetDispatcher().Execute( SID_CURRENTCELL, + pViewSh->GetViewData().GetDispatcher().ExecuteList( SID_CURRENTCELL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aPosItem, &aUnmarkItem, nullptr); + { &aPosItem, &aUnmarkItem }); } } } diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index c34d14619f76..795467cadc83 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -496,10 +496,9 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre // Execute the "new style" slot, complete with undo and all necessary updates. // The return value (SfxUInt16Item) is ignored, look for new styles instead. - pDisp->Execute( SID_STYLE_NEW, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, - &aFamilyItem, - &aRefItem, - nullptr); + pDisp->ExecuteList(SID_STYLE_NEW, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, + { &aFamilyItem, &aRefItem }); if (bLocked) pDisp->Lock(true); diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 412b7667fe93..d1bc0232708c 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -508,7 +508,8 @@ void ScPivotLayoutDialog::ApplyChanges() SfxDispatcher* pDispatcher = GetBindings().GetDispatcher(); SfxCallMode nCallMode = SfxCallMode::SLOT | SfxCallMode::RECORD; - const SfxPoolItem* pResult = pDispatcher->Execute(SID_PIVOT_TABLE, nCallMode, &aPivotItem, nullptr, 0); + const SfxPoolItem* pResult = pDispatcher->ExecuteList(SID_PIVOT_TABLE, + nCallMode, { &aPivotItem }); if (pResult != nullptr) { diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 2ff6d879b3f5..d02fad0a53c9 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -404,9 +404,9 @@ IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void) SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( SID_CONSOLIDATE, + GetBindings().GetDispatcher()->ExecuteList(SID_CONSOLIDATE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aOutItem, 0L, 0L ); + { &aOutItem }); Close(); } else diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 82235105e780..ab777fbb78fe 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -729,9 +729,9 @@ IMPL_LINK_TYPED( ScFilterDlg, EndDlgHdl, Button*, pBtn, void ) { SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, + GetBindings().GetDispatcher()->ExecuteList(FID_FILTER_OK, SfxCallMode::SLOT | SfxCallMode::RECORD, - GetOutputItem(), 0L, 0L ); + { GetOutputItem() }); Close(); } } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 6ed9c5d03ca9..b29e08247d91 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -372,9 +372,9 @@ IMPL_LINK_TYPED( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn, void ) { SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, - SfxCallMode::SLOT | SfxCallMode::RECORD, - GetOutputItem( theOutParam, theFilterArea ), 0L, 0L ); + GetBindings().GetDispatcher()->ExecuteList(FID_FILTER_OK, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { GetOutputItem(theOutParam, theFilterArea) }); Close(); } else diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index c78ea2e7572f..225fb2f0318b 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -85,8 +85,8 @@ bool SearchResultsDlg::Close() SfxBoolItem aItem(SID_SEARCH_RESULTS_DIALOG, false); if (pDispacher) { - pDispacher->Execute(SID_SEARCH_RESULTS_DIALOG, - SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, nullptr); + pDispacher->ExecuteList(SID_SEARCH_RESULTS_DIALOG, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 09b7f5c18202..8a4a0f0641aa 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1098,8 +1098,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) { SfxStringItem aApp(SID_DOC_SERVICE, OUString("com.sun.star.sheet.SpreadsheetDocument")); SfxStringItem aTarget(SID_TARGETNAME, OUString("_blank")); - GetViewData()->GetDispatcher().Execute( - SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, &aApp, &aTarget, 0L); + GetViewData()->GetDispatcher().ExecuteList( + SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, + { &aApp, &aTarget }); } break; default: diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 53fc65741ed7..d22425905d0c 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -531,9 +531,9 @@ void ScFormulaDlg::dispatch(bool _bOK, bool _bMatrixChecked) clear(); - GetBindings().GetDispatcher()->Execute( SID_INS_FUNCTION, + GetBindings().GetDispatcher()->ExecuteList( SID_INS_FUNCTION, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aRetItem, &aStrItem, &aMatItem, nullptr); + { &aRetItem, &aStrItem, &aMatItem }); } void ScFormulaDlg::setDispatcherLock( bool bLock ) { diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 07982d39963f..29f0f7e3f974 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -236,9 +236,9 @@ IMPL_LINK_TYPED( ScSolverDlg, BtnHdl, Button*, pBtn, void ) SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( SID_SOLVE, + GetBindings().GetDispatcher()->ExecuteList(SID_SOLVE, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aOutItem, 0L, 0L ); + { &aOutItem }); Close(); } else RaiseError( SOLVERR_NOFORMULA ); diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 0ae7eab15343..8cf0202b979d 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -312,9 +312,9 @@ IMPL_LINK_TYPED( ScTabOpDlg, BtnHdl, Button*, pBtn, void ) SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( SID_TABOP, + GetBindings().GetDispatcher()->ExecuteList(SID_TABOP, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aOutItem, 0L, 0L ); + { &aOutItem }); Close(); } } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index e48e57cabb73..331870be1d15 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -925,9 +925,9 @@ void ScNavigatorDlg::SetCurrentCell( SCCOL nColNo, SCROW nRowNo ) SfxStringItem aPosItem( SID_CURRENTCELL, aAddr ); SfxBoolItem aUnmarkItem( FN_PARAM_1, bUnmark ); // cancel selektion - rBindings.GetDispatcher()->Execute( SID_CURRENTCELL, + rBindings.GetDispatcher()->ExecuteList(SID_CURRENTCELL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aPosItem, &aUnmarkItem, 0L ); + { &aPosItem, &aUnmarkItem }); } } @@ -936,9 +936,9 @@ void ScNavigatorDlg::SetCurrentCellStr( const OUString& rName ) ppBoundItems[0]->ClearCache(); SfxStringItem aNameItem( SID_CURRENTCELL, rName ); - rBindings.GetDispatcher()->Execute( SID_CURRENTCELL, + rBindings.GetDispatcher()->ExecuteList(SID_CURRENTCELL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aNameItem, 0L ); + { &aNameItem }); } void ScNavigatorDlg::SetCurrentTable( SCTAB nTabNo ) @@ -947,9 +947,9 @@ void ScNavigatorDlg::SetCurrentTable( SCTAB nTabNo ) { // Table for basic is base-1 SfxUInt16Item aTabItem( SID_CURRENTTAB, static_cast<sal_uInt16>(nTabNo) + 1 ); - rBindings.GetDispatcher()->Execute( SID_CURRENTTAB, + rBindings.GetDispatcher()->ExecuteList(SID_CURRENTTAB, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aTabItem, 0L ); + { &aTabItem }); } } @@ -975,17 +975,17 @@ void ScNavigatorDlg::SetCurrentTableStr( const OUString& rName ) void ScNavigatorDlg::SetCurrentObject( const OUString& rName ) { SfxStringItem aNameItem( SID_CURRENTOBJECT, rName ); - rBindings.GetDispatcher()->Execute( SID_CURRENTOBJECT, + rBindings.GetDispatcher()->ExecuteList( SID_CURRENTOBJECT, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aNameItem, 0L ); + { &aNameItem }); } void ScNavigatorDlg::SetCurrentDoc( const OUString& rDocName ) // activate { SfxStringItem aDocItem( SID_CURRENTDOC, rDocName ); - rBindings.GetDispatcher()->Execute( SID_CURRENTDOC, + rBindings.GetDispatcher()->ExecuteList( SID_CURRENTDOC, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aDocItem, 0L ); + { &aDocItem }); } ScTabViewShell* ScNavigatorDlg::GetTabViewShell() diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index cd3d248c29ea..eaa620a2451f 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -169,7 +169,8 @@ void ScScenarioListBox::ExecuteScenarioSlot( sal_uInt16 nSlotId ) if( SfxViewFrame* pViewFrm = SfxViewFrame::Current() ) { SfxStringItem aStringItem( nSlotId, GetSelectEntry() ); - pViewFrm->GetDispatcher()->Execute( nSlotId, SfxCallMode::SLOT | SfxCallMode::RECORD, &aStringItem, 0L, 0L ); + pViewFrm->GetDispatcher()->ExecuteList(nSlotId, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aStringItem } ); } } diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 541d38d84e29..b0e26329b9f9 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -505,9 +505,9 @@ IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_BtnHdl, Button*, pBtn, void ) { SetDispatcherLock( false ); SwitchToDocument(); - GetBindings().GetDispatcher()->Execute( SID_CHANGE_PRINTAREA, - SfxCallMode::SLOT | SfxCallMode::RECORD, - &aPrintArea, &aRepeatRow, &aRepeatCol, &aEntireSheet, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_CHANGE_PRINTAREA, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aPrintArea, &aRepeatRow, &aRepeatCol, &aEntireSheet }); } Close(); diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 64fa31c4b586..83d404941414 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -148,7 +148,8 @@ IMPL_LINK_TYPED( AlignmentPropertyPanel, ReferenceEdgeHdl, Button*, pControl, vo else eMode = SVX_ROTATE_MODE_STANDARD; SvxRotateModeItem aItem(eMode,ATTR_ROTATE_MODE); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_ALIGN_LOCKPOS, SfxCallMode::RECORD, &aItem, 0l); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_ALIGN_LOCKPOS, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED( AlignmentPropertyPanel, AngleModifiedHdl, Edit&, void ) @@ -185,15 +186,15 @@ IMPL_LINK_NOARG_TYPED( AlignmentPropertyPanel, AngleModifiedHdl, Edit&, void ) sal_Int64 nTmp = (sal_Int64)fTmp*100; SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,(sal_uInt32) nTmp); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, &aAngleItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, { &aAngleItem }); } IMPL_LINK_NOARG_TYPED( AlignmentPropertyPanel, ClickStackHdl, Button*, void ) { bool bVertical = mpCBStacked->IsChecked(); SfxBoolItem aStackItem( SID_ATTR_ALIGN_STACKED, bVertical ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, &aStackItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, { &aStackItem }); } IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, MFLeftIndentMdyHdl, Edit&, void) { @@ -201,7 +202,8 @@ IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, MFLeftIndentMdyHdl, Edit&, void) sal_uInt16 nVal = (sal_uInt16)mpMFLeftIndent->GetValue(); SfxUInt16Item aItem( SID_ATTR_ALIGN_INDENT, (sal_uInt16)CalcToUnit( nVal, SFX_MAPUNIT_TWIP ) ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_ALIGN_INDENT, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_ALIGN_INDENT, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, CBOXMergnCellClkHdl, Button*, void) @@ -223,7 +225,8 @@ IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, CBOXWrapTextClkHdl, Button*, void) { bool bState = mpCBXWrapText->IsChecked(); SfxBoolItem aItem( SID_ATTR_ALIGN_LINEBREAK , bState); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_ALIGN_LINEBREAK, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_ALIGN_LINEBREAK, + SfxCallMode::RECORD, { &aItem }); } VclPtr<vcl::Window> AlignmentPropertyPanel::Create ( diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 866f47df3be2..8280bc3ed43f 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -162,8 +162,10 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void) SvxLineItem aLineItem2( SID_ATTR_BORDER_DIAG_TLBR ); aLineItem1.SetLine( nullptr ); //modify aLineItem2.SetLine( nullptr ); //modify - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, &aLineItem1, 0L); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, &aLineItem2, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, { &aLineItem1 }); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, { &aLineItem2 }); } break; case TBI_BORDER1_ALL: @@ -197,7 +199,8 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER, SfxCallMode::RECORD, &aBorderOuter, &aBorderInner, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner }); mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); } @@ -265,21 +268,24 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER, SfxCallMode::RECORD, &aBorderOuter, &aBorderInner, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner}); } else if(nId == TBI_BORDER2_BLTR) { editeng::SvxBorderLine aTmp( nullptr, 1 ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_BLTR ); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, &aLineItem, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, { &aLineItem }); } else if(nId == TBI_BORDER2_TLBR) { editeng::SvxBorderLine aTmp( nullptr, 1 ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_TLBR ); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, &aLineItem, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, { &aLineItem }); } mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); @@ -336,7 +342,8 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_ATTR_BORDER, SfxCallMode::RECORD, &aBorderOuter, &aBorderInner, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner }); pTop.reset(); pBottom.reset(); diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx index c4f9c718bfe6..59a25ed95e8b 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.cxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx @@ -176,7 +176,8 @@ IMPL_LINK_TYPED(CellLineStyleControl, VSSelectHdl, ValueSet*, pControl, void) editeng::SvxBorderLine aTmp; aTmp.GuessLinesWidths(nStyle, n1, n2, n3); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_FRAME_LINESTYLE, SfxCallMode::RECORD, &aLineItem, 0L); + mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + SID_FRAME_LINESTYLE, SfxCallMode::RECORD, { &aLineItem }); SetAllNoSel(); mrCellAppearancePropertyPanel.EndCellLineStylePopupMode(); } diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 3240d40692c4..9802c9c06b52 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -110,7 +110,8 @@ IMPL_LINK_TYPED( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox&, rBox, if( nVal != mnCategorySelected ) { SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT, nVal ); - GetBindings()->GetDispatcher()->Execute(SID_NUMBER_TYPE_FORMAT, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_NUMBER_TYPE_FORMAT, + SfxCallMode::RECORD, { &aItem }); mnCategorySelected = nVal; } } @@ -149,7 +150,8 @@ IMPL_LINK_NOARG_TYPED( NumberFormatPropertyPanel, NumFormatValueHdl, Edit&, void aFormat += sBreak; SfxStringItem aItem( SID_NUMBER_FORMAT, aFormat ); - GetBindings()->GetDispatcher()->Execute(SID_NUMBER_FORMAT, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_NUMBER_FORMAT, + SfxCallMode::RECORD, { &aItem }); } VclPtr<vcl::Window> NumberFormatPropertyPanel::Create ( diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 136cde1dabbf..33de00a7a216 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1749,8 +1749,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta SfxInt16Item aPosXItem( SID_RANGE_COL, nPosX ); SfxInt32Item aPosYItem( SID_RANGE_ROW, nPosY ); - pViewData->GetDispatcher().Execute( SID_FILL_SELECT, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aPosXItem, &aPosYItem, nullptr ); + pViewData->GetDispatcher().ExecuteList(SID_FILL_SELECT, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aPosXItem, &aPosYItem }); } nButtonDown = 0; @@ -2455,8 +2456,9 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // cell cursor isn't visible after making selection, it would jump // back to the origin of the selection where the cell cursor is. SfxBoolItem aAlignCursorItem( FN_PARAM_2, false ); - pDisp->Execute( SID_CURRENTCELL, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aPosItem, &aAlignCursorItem, nullptr ); + pDisp->ExecuteList(SID_CURRENTCELL, + SfxCallMode::SLOT | SfxCallMode::RECORD, + { &aPosItem, &aAlignCursorItem }); pViewData->GetView()->InvalidateAttribs(); } @@ -4120,8 +4122,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos SfxStringItem aNameItem( SID_CHART_NAME, aChartName ); SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName ); sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; - pViewData->GetDispatcher().Execute( nId, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aRangeItem, &aNameItem, nullptr ); + pViewData->GetDispatcher().ExecuteList(nId, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aRangeItem, &aNameItem }); bDone = true; } else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) ) diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 7e7c29dfbc81..8f8eb13eb036 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -270,8 +270,8 @@ void ScTabControl::Select() { // sheet for basic is 1-based SfxUInt16Item aItem( SID_CURRENTTAB, nPage + 1 ); - rDisp.Execute( SID_CURRENTTAB, SfxCallMode::SLOT | SfxCallMode::RECORD, - &aItem, nullptr ); + rDisp.ExecuteList(SID_CURRENTTAB, + SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem }); } SfxBindings& rBind = pViewData->GetBindings(); diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 8f1fd2410ad9..874e6c0c42a3 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -112,8 +112,8 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) bReadOnly = GetViewData().GetSfxDocShell()->IsReadOnly(); SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadOnly); - GetViewData().GetDispatcher().Execute( SID_FM_DESIGN_MODE, SfxCallMode::ASYNCHRON, - &aItem, nullptr); + GetViewData().GetDispatcher().ExecuteList(SID_FM_DESIGN_MODE, + SfxCallMode::ASYNCHRON, { &aItem }); UpdateInputContext(); } diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index aa08427f8077..170e8be91777 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -84,8 +84,8 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq ) // for sounds (linked or not), insert a hyperlink button, // like in Impress and Writer 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 }); } } diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 0807a154f13e..844b664ec961 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -298,10 +298,10 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) // execute request (which stores the SearchItem) aSearchItem.SetWhich(SID_SEARCH_ITEM); - GetViewData().GetDispatcher().Execute( FID_SEARCH_NOW, + GetViewData().GetDispatcher().ExecuteList(FID_SEARCH_NOW, rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON : SfxCallMode::RECORD, - &aSearchItem, nullptr); + { &aSearchItem }); const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId()); if (pChildWindow) @@ -335,10 +335,10 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) SvxSearchItem aSearchItem = ScGlobal::GetSearchItem(); aSearchItem.SetWhich(SID_SEARCH_ITEM); - GetViewData().GetDispatcher().Execute( FID_SEARCH_NOW, + GetViewData().GetDispatcher().ExecuteList( FID_SEARCH_NOW, rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON : SfxCallMode::RECORD, - &aSearchItem, nullptr); + { &aSearchItem }); } break; // case FID_SEARCH_COUNT: diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 3ed76c8f9a60..fb47310614bd 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2552,9 +2552,9 @@ void ScViewFunc::MoveTable( SfxStringItem aItem( SID_FILE_NAME, aUrl ); SfxStringItem aTarget( SID_TARGETNAME, OUString("_blank") ); - const SfxPoolItem* pRetItem = GetViewData().GetDispatcher().Execute( + const SfxPoolItem* pRetItem = GetViewData().GetDispatcher().ExecuteList( SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, - &aItem, &aTarget, nullptr); + { &aItem, &aTarget }); if ( pRetItem ) { if ( dynamic_cast<const SfxObjectItem*>( pRetItem) != nullptr ) 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})); } } diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index c08c791e2dd8..4d983797914b 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -406,8 +406,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, // asynchronous, to avoid doing the whole import in drop handler SfxDispatcher& rDisp = GetViewData().GetDispatcher(); - rDisp.Execute(SID_SBA_IMPORT, SfxCallMode::ASYNCHRON, - &aDataDesc, &aTarget, &aAreaNew, nullptr ); + rDisp.ExecuteList(SID_SBA_IMPORT, SfxCallMode::ASYNCHRON, + { &aDataDesc, &aTarget, &aAreaNew }); bRet = true; } diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index c4acfc923b2b..51e0e8b64e63 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -111,9 +111,9 @@ static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, ScDocument OUString aAddrText(rRange.Format(ScRefFlags::RANGE_ABS_3D, pDoc)); SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText); SfxBoolItem aUnmarkItem(FN_PARAM_1, true); // remove existing selection - pView->GetDispatcher().Execute( + pView->GetDispatcher().ExecuteList( SID_CURRENTCELL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, - &aPosItem, &aUnmarkItem, nullptr); + { &aPosItem, &aUnmarkItem }); } void ScViewFunc::MarkAndJumpToRanges(const ScRangeList& rRanges) diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 3b3e7407de09..3b289998cf32 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -382,7 +382,8 @@ void ScViewUtil::SetFullScreen( SfxViewShell& rViewShell, bool bSet ) if( IsFullScreen( rViewShell ) != bSet ) { SfxBoolItem aItem( SID_WIN_FULLSCREEN, bSet ); - rViewShell.GetDispatcher()->Execute(SID_WIN_FULLSCREEN, SfxCallMode::RECORD, &aItem, nullptr); + rViewShell.GetDispatcher()->ExecuteList(SID_WIN_FULLSCREEN, + SfxCallMode::RECORD, { &aItem }); } } diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index f1c990172bc4..1d6775f496c0 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -261,7 +261,8 @@ void SdTiledRenderingTest::testPostKeyEvent() SdrView* pView = pViewShell->GetView(); pView->MarkObj(pTextObj, pView->GetSdrPageView()); SfxStringItem aInputString(SID_ATTR_CHAR, "x"); - pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR, SfxCallMode::SYNCHRON, &aInputString, 0); + pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR, + SfxCallMode::SYNCHRON, { &aInputString }); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); @@ -288,7 +289,8 @@ void SdTiledRenderingTest::testPostMouseEvent() SdrView* pView = pViewShell->GetView(); pView->MarkObj(pTextObj, pView->GetSdrPageView()); SfxStringItem aInputString(SID_ATTR_CHAR, "x"); - pViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR, SfxCallMode::SYNCHRON, &aInputString, 0); + pViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR, + SfxCallMode::SYNCHRON, { &aInputString }); CPPUNIT_ASSERT(pView->GetTextEditObject()); EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView(); // Did we manage to go after the first character? 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); diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index ad9e9d49abc5..4685749f473e 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -149,10 +149,9 @@ bool ImplDdeService::MakeTopic( const OUString& rNm ) SfxBoolItem aSilent(SID_SILENT, sal_True); SfxDispatcher* pDispatcher = SfxGetpApp()->GetDispatcher_Impl(); - const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC, + const SfxPoolItem* pRet = pDispatcher->ExecuteList(SID_OPENDOC, SfxCallMode::SYNCHRON, - &aName, &aNewView, - &aSilent, 0L ); + { &aName, &aNewView, &aSilent }); if( pRet && dynamic_cast< const SfxViewFrameItem *>( pRet ) != nullptr && ((SfxViewFrameItem*)pRet)->GetFrame() && diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 07a1deef8619..9500ceb5af3c 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -314,7 +314,9 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri SfxStringItem aReferer( SID_REFERER, OUString("private:user") ); SfxStringItem aFlags( SID_OPTIONS, OUString("T") ); SfxBoolItem aHidden( SID_HIDDEN, true ); - const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SfxCallMode::SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L ); + const SfxPoolItem *pRet = GetDispatcher_Impl()->ExecuteList( + SID_OPENDOC, SfxCallMode::SYNCHRON, + { &aName, &aHidden, &aReferer, &aFlags } ); const SfxObjectItem *pObj = dynamic_cast<const SfxObjectItem*>( pRet ); if ( pObj ) xDoc = dynamic_cast<SfxObjectShell*>( pObj->GetShell() ); @@ -520,12 +522,14 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) SfxStringItem aName( SID_FILE_NAME, aObj.GetMainURL( INetURLObject::NO_DECODE ) ); SfxStringItem aTemplName( SID_TEMPLATE_NAME, aTemplateName ); SfxStringItem aTemplRegionName( SID_TEMPLATE_REGIONNAME, aTemplateRegion ); - pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, eMode, &aName, &aTarget, &aReferer, &aTemplName, &aTemplRegionName, 0L ); + pRet = GetDispatcher_Impl()->ExecuteList(SID_OPENDOC, eMode, + {&aName, &aTarget, &aReferer, &aTemplName, &aTemplRegionName}); } else { SfxStringItem aName( SID_FILE_NAME, "private:factory" ); - pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, eMode, &aName, &aTarget, &aReferer, 0L ); + pRet = GetDispatcher_Impl()->ExecuteList(SID_OPENDOC, eMode, + { &aName, &aTarget, &aReferer } ); } if ( pRet ) diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index f467783104ce..822a851b6a84 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -185,7 +185,8 @@ namespace SfxStringItem aURL(SID_FILE_NAME, OUString(".component:Bibliography/View1")); SfxStringItem aRef(SID_REFERER, OUString("private:user")); SfxStringItem aTarget(SID_TARGETNAME, OUString("_blank")); - SfxViewFrame::Current()->GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, &aURL, &aRef, &aTarget, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON, { &aURL, &aRef, &aTarget }); } catch (const Exception & e) { @@ -299,7 +300,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) SfxStringItem aNameItem( SID_FILE_NAME, OUString("vnd.sun.star.cmd:logout") ); SfxStringItem aReferer( SID_REFERER, "private/user" ); - pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SfxCallMode::SLOT, &aNameItem, &aReferer, 0L ); + pAppData_Impl->pAppDispat->ExecuteList(SID_OPENDOC, + SfxCallMode::SLOT, { &aNameItem, &aReferer }); return; } @@ -625,7 +627,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } - pCurrentShell->GetDispatcher()->Execute(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, &aZoom, 0L); + pCurrentShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom }); break; } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index f0d4327bd64e..dc710dd886d5 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1017,8 +1017,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, @param nSlot the Id of the executing function @param eCall SfxCallMode::SYNCRHON, ..._ASYNCHRON or ..._SLOT - @param pArg1 First parameter - @param ... Zero terminated list of parameters + @param args list of SfxPoolItem arguments @return Pointer to the SfxPoolItem valid to the next run though the Message-Loop, which contains the return @@ -1030,13 +1029,13 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, [Example] pDispatcher->Execute( SID_OPENDOCUMENT, SfxCallMode::SYNCHRON, - &SfxStringItem( SID_FILE_NAME, "\\tmp\\temp.sdd" ), - &SfxStringItem( SID_FILTER_NAME, "StarDraw Presentation" ), - &SfxBoolItem( SID_DOC_READONLY, sal_False ), - 0L ); + { &SfxStringItem( SID_FILE_NAME, "\\tmp\\temp.sdd" ), + &SfxStringItem( SID_FILTER_NAME, "StarDraw Presentation" ), + &SfxBoolItem( SID_DOC_READONLY, sal_False ), + }); */ -const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, - const SfxPoolItem* pArg1, ...) +const SfxPoolItem* SfxDispatcher::ExecuteList(sal_uInt16 nSlot, SfxCallMode eCall, + std::initializer_list<SfxPoolItem const*> args) { if ( IsLocked(nSlot) ) return nullptr; @@ -1048,13 +1047,11 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, { SfxAllItemSet aSet( pShell->GetPool() ); - va_list pVarArgs; - va_start( pVarArgs, pArg1 ); - for ( const SfxPoolItem *pArg = pArg1; - pArg; - pArg = va_arg( pVarArgs, const SfxPoolItem* ) ) + for (const SfxPoolItem *pArg : args) + { + assert(pArg); MappedPut_Impl( aSet, *pArg ); - va_end(pVarArgs); + } SfxRequest aReq( nSlot, eCall, aSet ); _Execute( *pShell, *pSlot, aReq, eCall ); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 851eb5430938..84dff54daeb5 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -385,9 +385,9 @@ bool SfxModelessDialog::Close() { // Execute with Parameters, since Toggle is ignored by some ChildWindows. SfxBoolItem aValue( pImp->pMgr->GetType(), false); - pBindings->GetDispatcher_Impl()->Execute( + pBindings->GetDispatcher_Impl()->ExecuteList( pImp->pMgr->GetType(), - SfxCallMode::RECORD|SfxCallMode::SYNCHRON, &aValue, 0L ); + SfxCallMode::RECORD|SfxCallMode::SYNCHRON, { &aValue } ); return true; } @@ -498,9 +498,9 @@ bool SfxFloatingWindow::Close() { // Execute with Parameters, since Toggle is ignored by some ChildWindows. SfxBoolItem aValue( pImp->pMgr->GetType(), false); - pBindings->GetDispatcher_Impl()->Execute( + pBindings->GetDispatcher_Impl()->ExecuteList( pImp->pMgr->GetType(), - SfxCallMode::RECORD|SfxCallMode::SYNCHRON, &aValue, 0L ); + SfxCallMode::RECORD|SfxCallMode::SYNCHRON, { &aValue }); return true; } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 28011c99ab32..caf0c64b0203 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1661,8 +1661,9 @@ bool SfxDockingWindow::Close() return true; SfxBoolItem aValue( pMgr->GetType(), false); - pBindings->GetDispatcher_Impl()->Execute( - pMgr->GetType(), SfxCallMode::RECORD | SfxCallMode::ASYNCHRON, &aValue, 0L ); + pBindings->GetDispatcher_Impl()->ExecuteList( + pMgr->GetType(), SfxCallMode::RECORD | SfxCallMode::ASYNCHRON, + { &aValue }); return true; } diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 0cb4a836985f..780fb404c037 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -141,7 +141,8 @@ SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl() SfxBoolItem aItem( FN_PARAM_1, true ); css::uno::Reference< css::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder(); if ( xRecorder.is() ) - pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SfxCallMode::SYNCHRON, &aItem, 0L ); + pBindings->GetDispatcher()->ExecuteList(SID_STOP_RECORDING, + SfxCallMode::SYNCHRON, { &aItem }); } bool SfxRecordingFloatWrapper_Impl::QueryClose() @@ -193,7 +194,8 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl( // start recording SfxBoolItem aItem( SID_RECORDMACRO, true ); - GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SfxCallMode::SYNCHRON, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_RECORDMACRO, + SfxCallMode::SYNCHRON, { &aItem }); } SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl() diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index e0f10e91a612..86af63d112c3 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1701,7 +1701,7 @@ void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry) nActFamily = nEntry; SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl(); SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry ); - pDispat->Execute( SID_STYLE_FAMILY, SfxCallMode::SYNCHRON, &aItem, 0L ); + pDispat->ExecuteList(SID_STYLE_FAMILY, SfxCallMode::SYNCHRON, { &aItem }); pBindings->Invalidate( SID_STYLE_FAMILY ); pBindings->Update( SID_STYLE_FAMILY ); UpdateFamily_Impl(); diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 154e40697730..cfe9d7331158 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -236,11 +236,10 @@ namespace sfx2 EndTracking(); const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() ); const SfxBoolItem aVisibility( nChildWindowId, false ); - GetBindings().GetDispatcher()->Execute( + GetBindings().GetDispatcher()->ExecuteList( nChildWindowId, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, - &aVisibility, - nullptr + { &aVisibility } ); } } diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 02029f6486f6..ab2572c52eb4 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -359,12 +359,16 @@ void SfxVersionDialog::Open_Impl() { // there is a password, it should be used during the opening SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ); - pViewFrame->GetDispatcher()->Execute( - SID_OPENDOC, SfxCallMode::ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L ); + pViewFrame->GetDispatcher()->ExecuteList( + SID_OPENDOC, SfxCallMode::ASYNCHRON, + { &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem }); } else - pViewFrame->GetDispatcher()->Execute( - SID_OPENDOC, SfxCallMode::ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, 0L ); + { + pViewFrame->GetDispatcher()->ExecuteList( + SID_OPENDOC, SfxCallMode::ASYNCHRON, + { &aFile, &aItem, &aTarget, &aReferer }); + } Close(); } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 92ba81e4f522..de663cfb0b11 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1255,9 +1255,9 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq) { SfxStringItem aName( SID_FILE_NAME, aFileName ); SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, true ); - SfxGetpApp()->GetAppDispatcher_Impl()->Execute( - SID_OPENDOC, SfxCallMode::ASYNCHRON, &aName, - &aCreateView, 0L); + SfxGetpApp()->GetAppDispatcher_Impl()->ExecuteList( + SID_OPENDOC, SfxCallMode::ASYNCHRON, + { &aName, &aCreateView }); } } } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 3c803a9a1a7e..6d1672c73c50 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2660,7 +2660,8 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) if ( pDispat ) { SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLibName, aModuleName, OUString(), OUString() ); - pDispat->Execute( SID_BASICIDE_UPDATEMODULESOURCE, SfxCallMode::SYNCHRON, &aInfoItem, 0L ); + pDispat->ExecuteList(SID_BASICIDE_UPDATEMODULESOURCE, + SfxCallMode::SYNCHRON, { &aInfoItem }); } } } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 11cf17ed7317..d1aa7548d4c0 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1758,10 +1758,10 @@ bool SfxViewShell::IsShowView_Impl() const void SfxViewShell::JumpToMark( const OUString& rMark ) { SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark ); - GetViewFrame()->GetDispatcher()->Execute( + GetViewFrame()->GetDispatcher()->ExecuteList( SID_JUMPTOMARK, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, - &aMarkItem, 0L ); + { &aMarkItem }); } void SfxViewShell::SetController( SfxBaseController* pController ) diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 86266d653c56..3f03ba877731 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -758,9 +758,9 @@ IMPL_LINK_TYPED(SmElementsDockingWindow, SelectClickHandler, SmElement&, rElemen if (pViewSh) { - pViewSh->GetViewFrame()->GetDispatcher()->Execute( + pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList( SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD, - new SfxStringItem(SID_INSERTCOMMANDTEXT, rElement.getText()), 0); + { new SfxStringItem(SID_INSERTCOMMANDTEXT, rElement.getText()) }); } } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 06475aa0d639..bf452d2c53f6 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1520,9 +1520,9 @@ IMPL_LINK_NOARG_TYPED( SmSymbolDialog, GetClickHdl, Button*, void ) OUStringBuffer aText; aText.append('%').append(pSym->GetName()).append(' '); - rViewSh.GetViewFrame()->GetDispatcher()->Execute( + rViewSh.GetViewFrame()->GetDispatcher()->ExecuteList( SID_INSERTSYMBOL, SfxCallMode::RECORD, - new SfxStringItem(SID_INSERTSYMBOL, aText.makeStringAndClear()), 0); + { new SfxStringItem(SID_INSERTSYMBOL, aText.makeStringAndClear()) }); } } diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 509ddc4abbfd..c1d06c8111e7 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -395,9 +395,9 @@ IMPL_LINK_TYPED( SmEditWindow, MenuSelectHdl, Menu *, pMenu, bool ) { SmViewShell *pViewSh = rCmdBox.GetView(); if (pViewSh) - pViewSh->GetViewFrame()->GetDispatcher()->Execute( + pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList( SID_INSERTCOMMAND, SfxCallMode::RECORD, - new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()), 0); + { new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()) }); return false; } @@ -1070,9 +1070,9 @@ void SmEditWindow::Flush() SmViewShell *pViewSh = rCmdBox.GetView(); if (pViewSh) { - pViewSh->GetViewFrame()->GetDispatcher()->Execute( + pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList( SID_TEXT, SfxCallMode::RECORD, - new SfxStringItem(SID_TEXT, GetText()), 0); + { new SfxStringItem(SID_TEXT, GetText()) }); } } if (aCursorMoveIdle.IsActive()) diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index f17f9768252c..860f4a8c2582 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1520,9 +1520,9 @@ void SmViewShell::Execute(SfxRequest& rReq) { if (pWin->IsAllSelected()) { - GetViewFrame()->GetDispatcher()->Execute( + GetViewFrame()->GetDispatcher()->ExecuteList( SID_COPYOBJECT, SfxCallMode::RECORD, - new SfxVoidItem(SID_COPYOBJECT), 0); + { new SfxVoidItem(SID_COPYOBJECT) }); } else pWin->Copy(); @@ -1546,9 +1546,9 @@ void SmViewShell::Execute(SfxRequest& rReq) } if( bCallExec ) { - GetViewFrame()->GetDispatcher()->Execute( + GetViewFrame()->GetDispatcher()->ExecuteList( SID_PASTEOBJECT, SfxCallMode::RECORD, - new SfxVoidItem(SID_PASTEOBJECT), 0); + { new SfxVoidItem(SID_PASTEOBJECT) }); } } break; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 9156d265db81..e9a7e4c0f229 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -192,7 +192,8 @@ IMPL_LINK_TYPED( MaskData, PipetteHdl, ToolBox*, pTbx, void ) SfxBoolItem aBItem( SID_BMPMASK_PIPETTE, pTbx->IsItemChecked( pTbx->GetItemId(0) ) ); - rBindings.GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aBItem, 0L ); + rBindings.GetDispatcher()->ExecuteList(SID_BMPMASK_PIPETTE, OWN_CALLMODE, + { &aBItem }); } IMPL_LINK_TYPED( MaskData, CbxHdl, Button*, pButton, void ) @@ -304,7 +305,8 @@ IMPL_LINK_TYPED( MaskData, FocusLbHdl, Control&, rControl, void ) IMPL_LINK_NOARG_TYPED(MaskData, ExecHdl, Button*, void) { SfxBoolItem aBItem( SID_BMPMASK_EXEC, true ); - rBindings.GetDispatcher()->Execute( SID_BMPMASK_EXEC, OWN_CALLMODE, &aBItem, 0L ); + rBindings.GetDispatcher()->ExecuteList(SID_BMPMASK_EXEC, OWN_CALLMODE, + { &aBItem }); } void ColorWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& /*Rect*/) @@ -512,7 +514,8 @@ void SvxBmpMask::onSelect( MaskSet* pSet ) bool SvxBmpMask::Close() { SfxBoolItem aItem2( SID_BMPMASK_PIPETTE, false ); - GetBindings().GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aItem2, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_BMPMASK_PIPETTE, + OWN_CALLMODE, { &aItem2 }); return SfxDockingWindow::Close(); } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 93e3d91e2e76..630550f3f1f5 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -322,8 +322,9 @@ bool SvxSuperContourDlg::Close() if ( nRet == RET_YES ) { SfxBoolItem aBoolItem( SID_CONTOUR_EXEC, true ); - GetBindings().GetDispatcher()->Execute( - SID_CONTOUR_EXEC, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, &aBoolItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_CONTOUR_EXEC, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, + { &aBoolItem }); } else if ( nRet == RET_CANCEL ) bRet = false; @@ -438,8 +439,9 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx, void ) if (nId == mnApplyId) { SfxBoolItem aBoolItem( SID_CONTOUR_EXEC, true ); - GetBindings().GetDispatcher()->Execute( - SID_CONTOUR_EXEC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aBoolItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_CONTOUR_EXEC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aBoolItem }); } else if (nId == mnWorkSpaceId) { diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 89e90261189d..8a56f4c3a0cc 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -530,8 +530,9 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, XFormTextShadowXValItem aXItem( nSaveShadowX ); XFormTextShadowYValItem aYItem( nSaveShadowY ); - GetBindings().GetDispatcher()->Execute( - SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD, &aXItem, &aYItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD, + { &aXItem, &aYItem }); } } else @@ -556,8 +557,9 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem, m_pMtrFldShadowY->SetValue(nSaveShadowSize); XFormTextShadowXValItem aXItem(nSaveShadowAngle); XFormTextShadowYValItem aYItem(nSaveShadowSize); - GetBindings().GetDispatcher()->Execute( - SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD, &aXItem, &aYItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList( + SID_FORMTEXT_SHDWXVAL, SfxCallMode::RECORD, + { &aXItem, &aYItem }); } } } @@ -663,7 +665,8 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectStyleHdl_Impl, ToolBox *, void) eStyle = XFT_SLANTY; XFormTextStyleItem aItem( eStyle ); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_STYLE, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_STYLE, + SfxCallMode::RECORD, { &aItem }); SetStyle_Impl( &aItem ); nLastStyleTbxId = nId; } @@ -676,7 +679,8 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectAdjustHdl_Impl, ToolBox *, void) if (nId == nAdjustMirrorId) { XFormTextMirrorItem aItem(m_pTbxAdjust->IsItemChecked(nId)); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_MIRROR, SfxCallMode::SLOT, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_MIRROR, + SfxCallMode::SLOT, { &aItem }); } else if ( nId != nLastAdjustTbxId ) { @@ -690,7 +694,8 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectAdjustHdl_Impl, ToolBox *, void) eAdjust = XFT_RIGHT; XFormTextAdjustItem aItem(eAdjust); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_ADJUST, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_ADJUST, + SfxCallMode::RECORD, { &aItem }); SetAdjust_Impl(&aItem); nLastAdjustTbxId = nId; } @@ -703,12 +708,14 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectShadowHdl_Impl, ToolBox *, void) if (nId == nShowFormId) { XFormTextHideFormItem aItem(!m_pTbxShadow->IsItemChecked(nId)); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_HIDEFORM, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_HIDEFORM, + SfxCallMode::RECORD, { &aItem }); } else if (nId == nOutlineId) { XFormTextOutlineItem aItem(m_pTbxShadow->IsItemChecked(nId)); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_OUTLINE, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_OUTLINE, + SfxCallMode::RECORD, { &aItem }); } else if (nId != nLastShadowTbxId) { @@ -730,7 +737,8 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectShadowHdl_Impl, ToolBox *, void) else if (nId == nShadowSlantId) eShadow = XFTSHADOW_SLANT; XFormTextShadowItem aItem(eShadow); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHADOW, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHADOW, + SfxCallMode::RECORD, { &aItem }); SetShadow_Impl(&aItem, true); } } @@ -789,14 +797,16 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, InputTimoutHdl_Impl, Idle *, void) XFormTextShadowYValItem aShadowYItem( nValueY ); // Slot-ID does not matter, the Exec method evaluates the entire item set - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_DISTANCE, SfxCallMode::RECORD, &aDistItem, - &aStartItem, &aShadowXItem, &aShadowYItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_DISTANCE, + SfxCallMode::RECORD, + { &aDistItem, &aStartItem, &aShadowXItem, &aShadowYItem }); } IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, ColorSelectHdl_Impl, ListBox&, void) { XFormTextShadowColorItem aItem( "", m_pShadowColorLB->GetSelectEntryColor() ); - GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_SHDWCOLOR, + SfxCallMode::RECORD, { &aItem }); } void SvxFontWorkDialog::SetColorList(const XColorListRef &pList) diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 39e801490e58..ccd81fdbb58b 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -250,8 +250,9 @@ bool SvxIMapDlg::Close() if( nRet == RET_YES ) { SfxBoolItem aBoolItem( SID_IMAP_EXEC, true ); - GetBindings().GetDispatcher()->Execute( - SID_IMAP_EXEC, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, &aBoolItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_IMAP_EXEC, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, + { &aBoolItem }); } else if( nRet == RET_CANCEL ) bRet = false; @@ -350,8 +351,9 @@ IMPL_LINK_TYPED( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx, void ) { URLLoseFocusHdl( *m_pURLBox ); SfxBoolItem aBoolItem( SID_IMAP_EXEC, true ); - GetBindings().GetDispatcher()->Execute( - SID_IMAP_EXEC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aBoolItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_IMAP_EXEC, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + { &aBoolItem }); } else if(nNewItemId == mnOpenId) DoOpen(); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index f30bd2eeee91..4567fc1e122c 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2050,7 +2050,7 @@ void SvxRuler::ApplyMargins() #endif // DEBUGLIN } - pBindings->GetDispatcher()->Execute( nId, SfxCallMode::RECORD, pItem, 0L ); + pBindings->GetDispatcher()->ExecuteList(nId, SfxCallMode::RECORD, { pItem }); if(mxTabStopItem.get()) UpdateTabs(); } @@ -2156,7 +2156,8 @@ void SvxRuler::ApplyIndents() mxParaItem->SetRight(nNewRight); sal_uInt16 nParagraphId = bHorz ? SID_ATTR_PARA_LRSPACE : SID_ATTR_PARA_LRSPACE_VERTICAL; - pBindings->GetDispatcher()->Execute( nParagraphId, SfxCallMode::RECORD, mxParaItem.get(), 0L ); + pBindings->GetDispatcher()->ExecuteList(nParagraphId, SfxCallMode::RECORD, + { mxParaItem.get() }); UpdateTabs(); } @@ -2237,7 +2238,8 @@ void SvxRuler::ApplyTabs() mxTabStopItem->Insert(aTabStop); } sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->ExecuteList(nTabStopId, SfxCallMode::RECORD, + { mxTabStopItem.get() }); UpdateTabs(); } @@ -2299,7 +2301,8 @@ void SvxRuler::ApplyBorders() sal_uInt16 nColId = mxRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : (bHorz ? SID_RULER_BORDERS : SID_RULER_BORDERS_VERTICAL); - pBindings->GetDispatcher()->Execute( nColId, SfxCallMode::RECORD, mxColumnItem.get(), &aFlag, 0L ); + pBindings->GetDispatcher()->ExecuteList(nColId, SfxCallMode::RECORD, + { mxColumnItem.get(), &aFlag }); } void SvxRuler::ApplyObject() @@ -2337,7 +2340,8 @@ void SvxRuler::ApplyObject() mxObjectItem->GetEndY()); mxObjectItem->SetEndY(nEndY); - pBindings->GetDispatcher()->Execute(SID_RULER_OBJECT, SfxCallMode::RECORD, mxObjectItem.get(), 0L); + pBindings->GetDispatcher()->ExecuteList(SID_RULER_OBJECT, + SfxCallMode::RECORD, { mxObjectItem.get() }); } void SvxRuler::PrepareProportional_Impl(RulerType eType) @@ -3367,7 +3371,8 @@ IMPL_LINK_TYPED( SvxRuler, TabMenuSelect, Menu *, pMenu, bool ) mxTabStopItem->Remove(mxRulerImpl->nIdx); mxTabStopItem->Insert(aTabStop); sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->ExecuteList(nTabStopId, + SfxCallMode::RECORD, { mxTabStopItem.get() }); UpdateTabs(); mxRulerImpl->nIdx = 0; } diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index b461bb7a64df..bd103da8e1d0 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -308,8 +308,8 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p if (pDispatcher != nullptr) { SfxBoolItem aItem( SID_3D_INIT, true ); - pDispatcher->Execute( - SID_3D_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + pDispatcher->ExecuteList(SID_3D_INIT, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } Reset(); @@ -2149,8 +2149,8 @@ IMPL_LINK_NOARG_TYPED(Svx3DWin, ClickUpdateHdl, Button*, void) if (pDispatcher != nullptr) { SfxBoolItem aItem( SID_3D_STATE, true ); - pDispatcher->Execute( - SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + pDispatcher->ExecuteList(SID_3D_STATE, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } } else @@ -2166,8 +2166,8 @@ IMPL_LINK_NOARG_TYPED(Svx3DWin, ClickAssignHdl, Button*, void) if (pDispatcher != nullptr) { SfxBoolItem aItem( SID_3D_ASSIGN, true ); - pDispatcher->Execute( - SID_3D_ASSIGN, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + pDispatcher->ExecuteList(SID_3D_ASSIGN, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } } @@ -2428,8 +2428,8 @@ IMPL_LINK_TYPED( Svx3DWin, ClickHdl, Button *, pButton, void ) if (pDispatcher != nullptr) { SfxBoolItem aItem( nSId, true ); - pDispatcher->Execute( - nSId, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + pDispatcher->ExecuteList(nSId, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); } } else if( bUpdatePreview ) @@ -2726,8 +2726,8 @@ void Svx3DWin::UpdatePreview() if (pDispatcher != nullptr) { SfxBoolItem aItem( SID_3D_STATE, true ); - pDispatcher->Execute( - SID_3D_STATE, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + pDispatcher->ExecuteList(SID_3D_STATE, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aItem }); } // Reset Flag bOnly3DChanged = false; @@ -2919,8 +2919,8 @@ void SvxConvertTo3DItem::StateChanged(sal_uInt16 /*_nId*/, SfxItemState eState, if (pDispatcher != nullptr) { SfxBoolItem aItem( SID_3D_STATE, true ); - pDispatcher->Execute( - SID_3D_STATE, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, &aItem, 0L); + pDispatcher->ExecuteList(SID_3D_STATE, + SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, { &aItem }); } } } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 268bceab00fc..15c9c3b48544 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -959,8 +959,9 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe FmInterfaceItem aIFaceItem( SID_FM_SHOW_PROPERTY_BROWSER, xColumnToInspect ); SfxBoolItem aShowItem( SID_FM_SHOW_PROPERTIES, eInspectorAction != eCloseInspector ); - pCurrentFrame->GetBindings().GetDispatcher()->Execute( SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON, - &aIFaceItem, &aShowItem, 0L ); + pCurrentFrame->GetBindings().GetDispatcher()->ExecuteList( + SID_FM_SHOW_PROPERTY_BROWSER, SfxCallMode::ASYNCHRON, + { &aIFaceItem, &aShowItem }); } } } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 16e04f349dd0..bce5d77cfa19 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -520,8 +520,9 @@ void FmFormShell::Execute(SfxRequest &rReq) // reusing the SID_FM_TOGGLECONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another // name, so I do not really have a big problem with this .... SfxBoolItem aGrabFocusIndicatorItem( SID_FM_TOGGLECONTROLFOCUS, true ); - GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSlot, SfxCallMode::ASYNCHRON, - &aGrabFocusIndicatorItem, nullptr ); + GetViewShell()->GetViewFrame()->GetDispatcher()->ExecuteList( + nSlot, SfxCallMode::ASYNCHRON, + { &aGrabFocusIndicatorItem }); } rReq.Done(); @@ -815,8 +816,9 @@ void FmFormShell::Execute(SfxRequest &rReq) // initially open the filter navigator, the whole form based filter is pretty useless without it SfxBoolItem aIdentifierItem( SID_FM_FILTER_NAVIGATOR, true ); - GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_FILTER_NAVIGATOR, SfxCallMode::ASYNCHRON, - &aIdentifierItem, nullptr ); + GetViewShell()->GetViewFrame()->GetDispatcher()->ExecuteList( + SID_FM_FILTER_NAVIGATOR, SfxCallMode::ASYNCHRON, + { &aIdentifierItem }); } break; } } diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index 6809c75e0603..0d61d41e0593 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -105,46 +105,48 @@ VclPtr<vcl::Window> AreaPropertyPanel::Create ( void AreaPropertyPanel::setFillTransparence(const XFillTransparenceItem& rItem) { - GetBindings()->GetDispatcher()->Execute( SID_ATTR_FILL_TRANSPARENCE, SfxCallMode::RECORD, &rItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_TRANSPARENCE, + SfxCallMode::RECORD, { &rItem }); } void AreaPropertyPanel::setFillFloatTransparence(const XFillFloatTransparenceItem& rItem) { - GetBindings()->GetDispatcher()->Execute( SID_ATTR_FILL_FLOATTRANSPARENCE, SfxCallMode::RECORD, &rItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_FLOATTRANSPARENCE, + SfxCallMode::RECORD, { &rItem }); } void AreaPropertyPanel::setFillStyle(const XFillStyleItem& rItem) { - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_FILL_STYLE, SfxCallMode::RECORD, &rItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_STYLE, + SfxCallMode::RECORD, { &rItem }); } void AreaPropertyPanel::setFillStyleAndColor(const XFillStyleItem* pStyleItem, const XFillColorItem& aColorItem) { - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, &aColorItem, pStyleItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_COLOR, + SfxCallMode::RECORD, { &aColorItem, pStyleItem }); } void AreaPropertyPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem, const XFillGradientItem& rGradientItem) { - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_FILL_GRADIENT, SfxCallMode::RECORD, &rGradientItem, pStyleItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_GRADIENT, + SfxCallMode::RECORD, { &rGradientItem, pStyleItem }); } void AreaPropertyPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem, const XFillHatchItem& rHatchItem) { - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_FILL_HATCH, SfxCallMode::RECORD, &rHatchItem, pStyleItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_HATCH, + SfxCallMode::RECORD, { &rHatchItem, pStyleItem }); } void AreaPropertyPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem, const XFillBitmapItem& rBitmapItem) { - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_FILL_BITMAP, SfxCallMode::RECORD, &rBitmapItem, pStyleItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_BITMAP, + SfxCallMode::RECORD, { &rBitmapItem, pStyleItem }); } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index d68bff3685e9..bfc477ddd0a0 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -137,7 +137,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyBrightnessHdl, Edit&, void ) { const sal_Int16 nBright = mpMtrBrightness->GetValue(); const SfxInt16Item aBrightItem( SID_ATTR_GRAF_LUMINANCE, nBright ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_LUMINANCE, SfxCallMode::RECORD, &aBrightItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_LUMINANCE, + SfxCallMode::RECORD, { &aBrightItem }); } @@ -145,7 +146,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyContrastHdl, Edit&, void ) { const sal_Int16 nContrast = mpMtrContrast->GetValue(); const SfxInt16Item aContrastItem( SID_ATTR_GRAF_CONTRAST, nContrast ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_CONTRAST, SfxCallMode::RECORD, &aContrastItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_CONTRAST, + SfxCallMode::RECORD, { &aContrastItem }); } @@ -153,7 +155,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyTransHdl, Edit&, void ) { const sal_Int16 nTrans = mpMtrTrans->GetValue(); const SfxInt16Item aTransItem( SID_ATTR_GRAF_TRANSPARENCE, nTrans ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_TRANSPARENCE, SfxCallMode::RECORD, &aTransItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_TRANSPARENCE, + SfxCallMode::RECORD, { &aTransItem }); } @@ -161,7 +164,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ClickColorModeHdl, ListBox&, void ) { const sal_Int16 nTrans = mpLBColorMode->GetSelectEntryPos(); const SfxInt16Item aTransItem( SID_ATTR_GRAF_MODE, nTrans ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_MODE, SfxCallMode::RECORD, &aTransItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_MODE, + SfxCallMode::RECORD, { &aTransItem }); } @@ -169,7 +173,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, RedHdl, Edit&, void ) { const sal_Int16 nRed = mpMtrRed->GetValue(); const SfxInt16Item aRedItem( SID_ATTR_GRAF_RED, nRed ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_RED, SfxCallMode::RECORD, &aRedItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_RED, + SfxCallMode::RECORD, { &aRedItem }); } @@ -177,7 +182,8 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, GreenHdl, Edit&, void ) { const sal_Int16 nGreen = mpMtrGreen->GetValue(); const SfxInt16Item aGreenItem( SID_ATTR_GRAF_GREEN, nGreen ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_GREEN, SfxCallMode::RECORD, &aGreenItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_GREEN, + SfxCallMode::RECORD, { &aGreenItem }); } @@ -185,7 +191,8 @@ IMPL_LINK_NOARG_TYPED(GraphicPropertyPanel, BlueHdl, Edit&, void) { const sal_Int16 nBlue = mpMtrBlue->GetValue(); const SfxInt16Item aBlueItem( SID_ATTR_GRAF_BLUE, nBlue ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_BLUE, SfxCallMode::RECORD, &aBlueItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_BLUE, + SfxCallMode::RECORD, { &aBlueItem }); } @@ -193,7 +200,8 @@ IMPL_LINK_NOARG_TYPED(GraphicPropertyPanel, GammaHdl, Edit&, void) { const sal_Int32 nGamma = mpMtrGamma->GetValue(); const SfxInt32Item nGammaItem( SID_ATTR_GRAF_GAMMA, nGamma ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_GAMMA, SfxCallMode::RECORD, &nGammaItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_GRAF_GAMMA, + SfxCallMode::RECORD, { &nGammaItem }); } diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 37e0dac0b3dc..135bd210af39 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -212,42 +212,50 @@ void LinePropertyPanel::HandleContextChange( void LinePropertyPanel::setLineStyle(const XLineStyleItem& rItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_STYLE, SfxCallMode::RECORD, &rItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_STYLE, + SfxCallMode::RECORD, { &rItem }); } void LinePropertyPanel::setLineDash(const XLineDashItem& rItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_DASH, SfxCallMode::RECORD, &rItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_DASH, + SfxCallMode::RECORD, { &rItem }); } void LinePropertyPanel::setLineEndStyle(const XLineEndItem* pItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINEEND_STYLE, SfxCallMode::RECORD, pItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINEEND_STYLE, + SfxCallMode::RECORD, { pItem }); } void LinePropertyPanel::setLineStartStyle(const XLineStartItem* pItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINEEND_STYLE, SfxCallMode::RECORD, pItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINEEND_STYLE, + SfxCallMode::RECORD, { pItem }); } void LinePropertyPanel::setLineJoint(const XLineJointItem* pItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_JOINT, SfxCallMode::RECORD, pItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_JOINT, + SfxCallMode::RECORD, { pItem }); } void LinePropertyPanel::setLineCap(const XLineCapItem* pItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_CAP, SfxCallMode::RECORD, pItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_CAP, + SfxCallMode::RECORD, { pItem }); } void LinePropertyPanel::setLineTransparency(const XLineTransparenceItem& rItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_STYLE, SfxCallMode::RECORD, &rItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_STYLE, + SfxCallMode::RECORD, { &rItem }); } void LinePropertyPanel::setLineWidth(const XLineWidthItem& rItem) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &rItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_LINE_WIDTH, + SfxCallMode::RECORD, { &rItem }); } }} // end of namespace svx::sidebar diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 4183ec06e507..82f8ca57b9bb 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -361,8 +361,8 @@ void ParaLineSpacingControl::ExecuteLineSpace() break; } - SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( - SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, &aSpacing, 0L); + SfxViewFrame::Current()->GetBindings().GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing }); } void ParaLineSpacingControl::SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_Int32 eSpace, long lValue) @@ -437,8 +437,8 @@ void ParaLineSpacingControl::ExecuteLineSpacing(sal_Int32 nEntry) else SetLineSpace(aSpacing, nEntry); - SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( - SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, &aSpacing, 0L); + SfxViewFrame::Current()->GetBindings().GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing }); // close when the user used the buttons EndPopupMode(); diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 127ce9fd6414..b50c587ab0ed 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -209,8 +209,8 @@ IMPL_LINK_NOARG_TYPED( ParaPropertyPanel, ModifyIndentHdl_Impl, Edit&, void) aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); aMargin.SetTextFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent, m_eLRSpaceUnit ) ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, { &aMargin }); } IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl, void) @@ -226,8 +226,8 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont case CombinedEnumContext(Application_WriterVariants, Context_Table): { SfxBoolItem aMargin( SID_INC_INDENT, true ); - GetBindings()->GetDispatcher()->Execute( - SID_INC_INDENT, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_INC_INDENT, SfxCallMode::RECORD, { &aMargin }); } break; default: @@ -241,8 +241,8 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); aMargin.SetTextFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent, m_eLRSpaceUnit ) ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, { &aMargin }); } } } @@ -255,8 +255,8 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont case CombinedEnumContext(Application_WriterVariants, Context_Table): { SfxBoolItem aMargin( SID_DEC_INDENT, true ); - GetBindings()->GetDispatcher()->Execute( - SID_DEC_INDENT, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_DEC_INDENT, SfxCallMode::RECORD, { &aMargin }); } break; default: @@ -275,8 +275,8 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); aMargin.SetTextFirstLineOfst( (const short)GetCoreValue( *mpFLineIndent, m_eLRSpaceUnit ) ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, { &aMargin }); } } } @@ -287,8 +287,8 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont aMargin.SetRight( (const long)GetCoreValue( *mpRightIndent, m_eLRSpaceUnit ) ); aMargin.SetTextFirstLineOfst( ((const short)GetCoreValue( *mpFLineIndent, m_eLRSpaceUnit ))*(-1) ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, { &aMargin }); } } @@ -299,8 +299,8 @@ IMPL_LINK_NOARG_TYPED( ParaPropertyPanel, ULSpaceHdl_Impl, Edit&, void) aMargin.SetUpper( (sal_uInt16)GetCoreValue( *mpTopDist, m_eULSpaceUnit ) ); aMargin.SetLower( (sal_uInt16)GetCoreValue( *mpBottomDist, m_eULSpaceUnit ) ); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_PARA_ULSPACE, SfxCallMode::RECORD, &aMargin, 0L); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_PARA_ULSPACE, SfxCallMode::RECORD, { &aMargin }); } // for Paragraph State change diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 11e4f005ffa2..154eed5cc370 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -437,8 +437,8 @@ IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, AngleModifiedHdl, Edit&, void ) SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X, basegfx::fround(mlRotX * fUIScale)); SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y, basegfx::fround(mlRotY * fUIScale)); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aAngleItem, &aRotXItem, &aRotYItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aAngleItem, &aRotXItem, &aRotYItem }); } @@ -452,8 +452,8 @@ IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, RotationHdl, DialControl*, void ) SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X, basegfx::fround(mlRotX * fUIScale)); SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y, basegfx::fround(mlRotY * fUIScale)); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aAngleItem, &aRotXItem, &aRotYItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aAngleItem, &aRotXItem, &aRotYItem }); } @@ -464,14 +464,14 @@ IMPL_LINK_TYPED( PosSizePropertyPanel, FlipHdl, ToolBox*, pBox, void ) if(aCommand == UNO_FLIPHORIZONTAL) { SfxVoidItem aHoriItem(SID_FLIP_HORIZONTAL); - GetBindings()->GetDispatcher()->Execute( - SID_FLIP_HORIZONTAL, SfxCallMode::RECORD, &aHoriItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_FLIP_HORIZONTAL, + SfxCallMode::RECORD, { &aHoriItem }); } else if(aCommand == UNO_FLIPVERTICAL) { SfxVoidItem aVertItem(SID_FLIP_VERTICAL); - GetBindings()->GetDispatcher()->Execute( - SID_FLIP_VERTICAL, SfxCallMode::RECORD, &aVertItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_FLIP_VERTICAL, + SfxCallMode::RECORD, { &aVertItem }); } } @@ -834,16 +834,20 @@ void PosSizePropertyPanel::executeSize() || nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_OLE) ) { - GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aWidthItem, &aHeightItem, &aPointItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aWidthItem, &aHeightItem, &aPointItem }); } else { if ( (mpMtrWidth->IsValueModified()) && (mpMtrHeight->IsValueModified())) - GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aWidthItem, &aHeightItem, &aPointItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aWidthItem, &aHeightItem, &aPointItem }); else if( mpMtrWidth->IsValueModified()) - GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aWidthItem, &aPointItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aWidthItem, &aPointItem }); else if ( mpMtrHeight->IsValueModified()) - GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aHeightItem, &aPointItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_TRANSFORM, + SfxCallMode::RECORD, { &aHeightItem, &aPointItem }); } } } @@ -867,8 +871,8 @@ void PosSizePropertyPanel::executePosX() SfxInt32Item aPosXItem( SID_ATTR_TRANSFORM_POS_X,(sal_uInt32) lX); SfxInt32Item aPosYItem( SID_ATTR_TRANSFORM_POS_Y,(sal_uInt32) lY); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aPosXItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_TRANSFORM, SfxCallMode::RECORD, { &aPosXItem }); } } @@ -889,8 +893,8 @@ void PosSizePropertyPanel::executePosY() SfxInt32Item aPosXItem( SID_ATTR_TRANSFORM_POS_X,(sal_uInt32) lX); SfxInt32Item aPosYItem( SID_ATTR_TRANSFORM_POS_Y,(sal_uInt32) lY); - GetBindings()->GetDispatcher()->Execute( - SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aPosYItem, 0L ); + GetBindings()->GetDispatcher()->ExecuteList( + SID_ATTR_TRANSFORM, SfxCallMode::RECORD, { &aPosYItem }); } } diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index 5bbfa3ee470e..563dd3c777bb 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -149,19 +149,22 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ClickShadowHdl, Button*, void) if( mpShowShadow->GetState() == TRISTATE_FALSE ) { SdrOnOffItem aItem(makeSdrShadowItem(false)); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_SHADOW, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW, + SfxCallMode::RECORD, { &aItem }); } else { SdrOnOffItem aItem(makeSdrShadowItem(true)); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_SHADOW, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW, + SfxCallMode::RECORD, { &aItem }); } } IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowColorHdl, ListBox&, void) { XColorItem aItem(makeSdrShadowColorItem(mpLBShadowColor->GetSelectEntryColor())); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_COLOR, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_COLOR, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransMetricHdl, Edit&, void) @@ -169,7 +172,8 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransMetricHdl, Edit&, vo sal_uInt16 nVal = mpShadowTransMetric->GetValue(); SetTransparencyValue(nVal); SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_TRANSPARENCE, SfxCallMode::RECORD, &aItem , 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_TRANSPARENCE, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransSliderHdl, Slider*, void) @@ -177,7 +181,8 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransSliderHdl, Slider*, sal_uInt16 nVal = mpShadowTransSlider->GetThumbPos(); SetTransparencyValue(nVal); SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) ); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_TRANSPARENCE, SfxCallMode::RECORD, &aItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_TRANSPARENCE, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowDistanceHdl, Edit&, void) @@ -197,8 +202,10 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowDistanceHdl, Edit&, void) } SdrMetricItem aXItem(makeSdrShadowXDistItem(nX)); SdrMetricItem aYItem(makeSdrShadowYDistItem(nY)); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_XDISTANCE, SfxCallMode::RECORD, &aXItem, 0L); - GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_YDISTANCE, SfxCallMode::RECORD, &aYItem, 0L); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_XDISTANCE, + SfxCallMode::RECORD, { &aXItem }); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_YDISTANCE, + SfxCallMode::RECORD, { &aYItem }); } void ShadowPropertyPanel::UpdateControls() diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index b52b194622a4..fc615541ec00 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -317,7 +317,8 @@ IMPL_LINK_TYPED(TextCharacterSpacingControl, VSSelHdl, ValueSet*, pControl, void nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit); nKern = (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else if(iPos == 2) @@ -325,13 +326,15 @@ IMPL_LINK_TYPED(TextCharacterSpacingControl, VSSelHdl, ValueSet*, pControl, void nVal = LogicToLogic(15, MAP_POINT, (MapUnit)eUnit); nKern = (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else if(iPos == 3) { SvxKerningItem aKernItem(0, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else if(iPos == 4) @@ -339,7 +342,8 @@ IMPL_LINK_TYPED(TextCharacterSpacingControl, VSSelHdl, ValueSet*, pControl, void nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit); nKern = (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else if(iPos == 5) @@ -347,7 +351,8 @@ IMPL_LINK_TYPED(TextCharacterSpacingControl, VSSelHdl, ValueSet*, pControl, void nVal = LogicToLogic(60, MAP_POINT, (MapUnit)eUnit); nKern = (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else if(iPos == 6) @@ -358,7 +363,8 @@ IMPL_LINK_TYPED(TextCharacterSpacingControl, VSSelHdl, ValueSet*, pControl, void nVal = LogicToLogic(mnCustomKern, MAP_POINT, (MapUnit)eUnit); nKern = (short)maEditKerning->Denormalize(nVal); SvxKerningItem aKernItem(nKern , SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); mnLastCus = SPACING_CLOSE_BY_CLICK_ICON; } else @@ -449,7 +455,8 @@ IMPL_LINK_NOARG_TYPED(TextCharacterSpacingControl, KerningModifyHdl, Edit&, void mnCustomKern = 0; } SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_KERNING, + SfxCallMode::RECORD, { &aKernItem }); } }} // end of namespace sidebar diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx index f9eb44651164..773103cb87ab 100644 --- a/svx/source/sidebar/text/TextUnderlineControl.cxx +++ b/svx/source/sidebar/text/TextUnderlineControl.cxx @@ -221,7 +221,8 @@ IMPL_LINK_TYPED(TextUnderlineControl, VSSelectHdl, ValueSet*, pControl, void) SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE); aLineItem.SetColor(mrTextPropertyPanel.GetUnderlineColor()); - mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_UNDERLINE, SfxCallMode::RECORD, &aLineItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_CHAR_UNDERLINE, + SfxCallMode::RECORD, { &aLineItem }); mrTextPropertyPanel.EndUnderlinePopupMode(); } } diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index f29dacf195e1..3832b9e279e3 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -333,8 +333,8 @@ void SvxColorDockingWindow::SetSize() bool SvxColorDockingWindow::Close() { SfxBoolItem aItem( SID_COLOR_CONTROL, false ); - GetBindings().GetDispatcher()->Execute( - SID_COLOR_CONTROL, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L ); + GetBindings().GetDispatcher()->ExecuteList(SID_COLOR_CONTROL, + SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem }); SfxDockingWindow::Close(); return true; } @@ -353,7 +353,8 @@ IMPL_LINK_NOARG_TYPED(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if ( nPos == 1 ) // unsichtbar { XFillStyleItem aXFillStyleItem( drawing::FillStyle_NONE ); - pDispatcher->Execute( nLeftSlot, SfxCallMode::RECORD, &aXFillStyleItem, 0L ); + pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + { &aXFillStyleItem }); } else { @@ -368,8 +369,8 @@ IMPL_LINK_NOARG_TYPED(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if ( pView && pView->IsTextEdit() ) { SvxColorItem aTextColorItem( aColor, SID_ATTR_CHAR_COLOR ); - pDispatcher->Execute( - SID_ATTR_CHAR_COLOR, SfxCallMode::RECORD, &aTextColorItem, 0L ); + pDispatcher->ExecuteList(SID_ATTR_CHAR_COLOR, + SfxCallMode::RECORD, { &aTextColorItem }); bDone = true; } } @@ -377,15 +378,16 @@ IMPL_LINK_NOARG_TYPED(SvxColorDockingWindow, SelectHdl, ValueSet*, void) { XFillStyleItem aXFillStyleItem( drawing::FillStyle_SOLID ); XFillColorItem aXFillColorItem( aStr, aColor ); - pDispatcher->Execute( - nLeftSlot, SfxCallMode::RECORD, &aXFillColorItem, &aXFillStyleItem, 0L ); + pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + { &aXFillColorItem, &aXFillStyleItem }); } } } else if ( nPos != 1 ) // unsichtbar { SvxColorItem aLeftColorItem( aColor, nLeftSlot ); - pDispatcher->Execute( nLeftSlot, SfxCallMode::RECORD, &aLeftColorItem, 0L ); + pDispatcher->ExecuteList(nLeftSlot, SfxCallMode::RECORD, + { &aLeftColorItem }); } } else @@ -395,7 +397,8 @@ IMPL_LINK_NOARG_TYPED(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if( nPos == 1 ) // unsichtbar { XLineStyleItem aXLineStyleItem( drawing::LineStyle_NONE ); - pDispatcher->Execute( nRightSlot, SfxCallMode::RECORD, &aXLineStyleItem, 0L ); + pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + { &aXLineStyleItem }); } else { @@ -415,20 +418,23 @@ IMPL_LINK_NOARG_TYPED(SvxColorDockingWindow, SelectHdl, ValueSet*, void) if ( eXLS == drawing::LineStyle_NONE ) { XLineStyleItem aXLineStyleItem( drawing::LineStyle_SOLID ); - pDispatcher->Execute( nRightSlot, SfxCallMode::RECORD, &aXLineStyleItem, 0L ); + pDispatcher->ExecuteList(nRightSlot, + SfxCallMode::RECORD, { &aXLineStyleItem }); } } } } XLineColorItem aXLineColorItem( aStr, aColor ); - pDispatcher->Execute( nRightSlot, SfxCallMode::RECORD, &aXLineColorItem, 0L ); + pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + { &aXLineColorItem }); } } else if ( nPos != 1 ) // unsichtbar { SvxColorItem aRightColorItem( aColor, nRightSlot ); - pDispatcher->Execute( nRightSlot, SfxCallMode::RECORD, &aRightColorItem, 0L ); + pDispatcher->ExecuteList(nRightSlot, SfxCallMode::RECORD, + { &aRightColorItem }); } } } diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index c57eab708220..12224cb05d6a 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -607,8 +607,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) mpLbFillAttr->Disable(); // #i122676# need to call a single SID_ATTR_FILL_STYLE change - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_STYLE, SfxCallMode::RECORD, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_STYLE, SfxCallMode::RECORD, + { &aXFillStyleItem }); break; } case drawing::FillStyle_SOLID: @@ -620,8 +621,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) const XFillColorItem aXFillColorItem( aTmpStr, aColor ); // #i122676# change FillStyle and Color in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, &aXFillColorItem, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_COLOR, SfxCallMode::RECORD, + { &aXFillColorItem, &aXFillStyleItem }); break; } case drawing::FillStyle_GRADIENT: @@ -651,8 +653,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient); // #i122676# change FillStyle and Gradient in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_GRADIENT, SfxCallMode::RECORD, &aXFillGradientItem, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_GRADIENT, SfxCallMode::RECORD, + { &aXFillGradientItem, &aXFillStyleItem }); mpLbFillAttr->SelectEntryPos(mnLastPosGradient); } } @@ -690,8 +693,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) const XFillHatchItem aXFillHatchItem(mpLbFillAttr->GetSelectEntry(), aHatch); // #i122676# change FillStyle and Hatch in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_HATCH, SfxCallMode::RECORD, &aXFillHatchItem, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_HATCH, SfxCallMode::RECORD, + { &aXFillHatchItem, &aXFillStyleItem }); mpLbFillAttr->SelectEntryPos(mnLastPosHatch); } } @@ -729,8 +733,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillTypeHdl, ListBox&, void) const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject()); // #i122676# change FillStyle and Bitmap in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_BITMAP, SfxCallMode::RECORD, &aXFillBitmapItem, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_BITMAP, SfxCallMode::RECORD, + { &aXFillBitmapItem, &aXFillStyleItem }); mpLbFillAttr->SelectEntryPos(mnLastPosBitmap); } } @@ -769,7 +774,9 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillAttrHdl, ListBox&, void) if(bFillStyleChange) { // #i122676# Single FillStyle change call needed here - SfxViewFrame::Current()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SfxCallMode::RECORD, &aXFillStyleItem, 0L); + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_STYLE, SfxCallMode::RECORD, + { &aXFillStyleItem }); } break; } @@ -791,10 +798,12 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillAttrHdl, ListBox&, void) const XGradient aGradient = aItem.GetGradientList()->GetGradient(nPos)->GetGradient(); const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient); - // #i122676# Change FillStale and Gradinet in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_GRADIENT, SfxCallMode::RECORD, &aXFillGradientItem, - bFillStyleChange ? &aXFillStyleItem : nullptr, 0L); + // #i122676# Change FillStyle and Gradinet in one call + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_GRADIENT, SfxCallMode::RECORD, + (bFillStyleChange) + ? std::initializer_list<SfxPoolItem const*>({ &aXFillGradientItem, &aXFillStyleItem }) + : std::initializer_list<SfxPoolItem const*>({ &aXFillGradientItem })); } } @@ -822,10 +831,12 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillAttrHdl, ListBox&, void) const XHatch aHatch = aItem.GetHatchList()->GetHatch(nPos)->GetHatch(); const XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch); - // #i122676# Change FillStale and Hatch in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_HATCH, SfxCallMode::RECORD, &aXFillHatchItem, - bFillStyleChange ? &aXFillStyleItem : nullptr, 0L); + // #i122676# Change FillStyle and Hatch in one call + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_HATCH, SfxCallMode::RECORD, + (bFillStyleChange) + ? std::initializer_list<SfxPoolItem const*>({ &aXFillHatchItem, &aXFillStyleItem }) + : std::initializer_list<SfxPoolItem const*>({ &aXFillHatchItem })); } } @@ -853,10 +864,12 @@ IMPL_LINK_NOARG_TYPED(SvxFillToolBoxControl, SelectFillAttrHdl, ListBox&, void) const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos); const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject()); - // #i122676# Change FillStale and Bitmap in one call - SfxViewFrame::Current()->GetDispatcher()->Execute( - SID_ATTR_FILL_BITMAP, SfxCallMode::RECORD, &aXFillBitmapItem, - bFillStyleChange ? &aXFillStyleItem : nullptr, 0L); + // #i122676# Change FillStyle and Bitmap in one call + SfxViewFrame::Current()->GetDispatcher()->ExecuteList( + SID_ATTR_FILL_BITMAP, SfxCallMode::RECORD, + (bFillStyleChange) + ? std::initializer_list<SfxPoolItem const*>({ &aXFillBitmapItem, &aXFillStyleItem }) + : std::initializer_list<SfxPoolItem const*>({ &aXFillBitmapItem })); } } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 7781b330bec8..9bd36380fd02 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2233,9 +2233,9 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, EditStyleHdl, Button*, pBtn, void) vcl::Window* pDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( pBtn ); static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(). - GetView().GetViewFrame()->GetDispatcher()->Execute( - SID_STYLE_EDIT, SfxCallMode::SYNCHRON|SfxCallMode::MODAL, - &aStyle, &aFamily, 0L); + GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, + SfxCallMode::SYNCHRON|SfxCallMode::MODAL, + { &aStyle, &aFamily }); Application::SetDefDialogParent( pDefDlgParent ); } } @@ -3746,9 +3746,9 @@ IMPL_LINK_TYPED( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn, void ) vcl::Window* pDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( pBtn ); SwWrtShell& rSh = static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(); - rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( - SID_STYLE_EDIT, SfxCallMode::SYNCHRON|SfxCallMode::MODAL, - &aStyle, &aFamily, 0L); + rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_STYLE_EDIT, + SfxCallMode::SYNCHRON|SfxCallMode::MODAL, + { &aStyle, &aFamily }); Application::SetDefDialogParent( pDefDlgParent ); } } diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 896b365d579e..745399066df8 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -275,9 +275,10 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL) SfxStringItem aTargetFrameName( SID_TARGETNAME, OUString("_blank") ); SfxBoolItem aHidden( SID_HIDDEN, true ); SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle()); - const SfxObjectItem* pItem = static_cast<const SfxObjectItem*>(pView->GetViewFrame()->GetDispatcher()-> - Execute(SID_OPENDOC, SfxCallMode::SYNCHRON, - &aURL, &aHidden, &aReferer, &aTargetFrameName, 0L)); + const SfxObjectItem* pItem = static_cast<const SfxObjectItem*>( + pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::SYNCHRON, + { &aURL, &aHidden, &aReferer, &aTargetFrameName })); SfxShell* pShell = pItem ? pItem->GetShell() : nullptr; if(pShell) @@ -301,8 +302,8 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL) { SfxStringItem aFactory(SID_NEWDOCDIRECT, SwDocShell::Factory().GetFilterContainer()->GetName()); const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>( - pView->GetViewFrame()->GetDispatcher()->Execute(SID_NEWDOCDIRECT, - SfxCallMode::SYNCHRON, &aFactory, 0L)); + pView->GetViewFrame()->GetDispatcher()->ExecuteList( + SID_NEWDOCDIRECT, SfxCallMode::SYNCHRON, { &aFactory })); SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr; pNewView = pViewFrame ? dynamic_cast<SwView*>( pViewFrame->GetViewShell() ) : nullptr; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5bd534872163..1273ff71ce67 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -625,8 +625,9 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxStringItem aName(SID_FILE_NAME, sPath); SfxStringItem aFilter(SID_FILTER_NAME, pHtmlFlt->GetName()); const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>( - pViewFrame->GetDispatcher()->Execute( - SID_SAVEASDOC, SfxCallMode::SYNCHRON, &aName, &aFilter, 0L )); + pViewFrame->GetDispatcher()->ExecuteList( + SID_SAVEASDOC, SfxCallMode::SYNCHRON, + { &aName, &aFilter })); if(!pBool || !pBool->GetValue()) break; } @@ -1077,12 +1078,9 @@ void SwDocShell::Execute(SfxRequest& rReq) std::unique_ptr<SfxFrameItem> pFrameItem(new SfxFrameItem( SID_DOCFRAME, pViewShell->GetViewFrame() )); SfxDispatcher* pDispatch = pViewShell->GetDispatcher(); - pDispatch->Execute( - SID_OPENDOC, - SfxCallMode::ASYNCHRON, - &aName, - &aReferer, - pFrameItem.get(), 0L ); + pDispatch->ExecuteList(SID_OPENDOC, + SfxCallMode::ASYNCHRON, + { &aName, &aReferer, pFrameItem.get() }); break; } pViewShell = SfxViewShell::GetNext(*pViewShell); @@ -1136,8 +1134,9 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxStringItem aApp(SID_DOC_SERVICE, OUString("com.sun.star.text.TextDocument")); SfxStringItem aTarget(SID_TARGETNAME, OUString("_blank")); - pViewShell->GetDispatcher()->Execute( - SID_OPENDOC, SfxCallMode::API|SfxCallMode::SYNCHRON, &aApp, &aTarget, 0L); + pViewShell->GetDispatcher()->ExecuteList(SID_OPENDOC, + SfxCallMode::API|SfxCallMode::SYNCHRON, + { &aApp, &aTarget }); } break; case SID_CLASSIFICATION_APPLY: @@ -1315,10 +1314,10 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie SfxUsrAnyItem aShellItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( GetModel() ) ); OUString aLibName( pBasic->GetName() ); SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); - pSrcView->GetViewFrame()->GetDispatcher()->Execute( + pSrcView->GetViewFrame()->GetDispatcher()->ExecuteList( SID_BASICIDE_LIBREMOVED, SfxCallMode::SYNCHRON, - &aShellItem, &aLibNameItem, 0L ); + { &aShellItem, &aLibNameItem }); // Only the modules are deleted from the standard-lib if( nLibCount ) diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 0728ad75f079..6c1be51f9bb6 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2553,9 +2553,9 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, ""/*TODO?*/ ) ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aMediaURLStr ); - rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( + rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList( SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON, - &aMediaURLItem, 0L ); + { &aMediaURLItem }); } #else if (false) @@ -2694,11 +2694,12 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, rView.StopShellTimer(); SfxStringItem aDataDesc( nWh, sText ); - rView.GetViewFrame()->GetDispatcher()->Execute( - nWh, SfxCallMode::ASYNCHRON, &aDataDesc, - pConnectionItem.get(), pColumnItem.get(), - pSourceItem.get(), pCommandItem.get(), pCommandTypeItem.get(), - pColumnNameItem.get(), pSelectionItem.get(), pCursorItem.get(), 0L); + rView.GetViewFrame()->GetDispatcher()->ExecuteList( + nWh, SfxCallMode::ASYNCHRON, + { &aDataDesc, pConnectionItem.get(), pColumnItem.get(), + pSourceItem.get(), pCommandItem.get(), pCommandTypeItem.get(), + pColumnNameItem.get(), pSelectionItem.get(), + pCursorItem.get() }); } else { diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index f0f056d4b255..2070b4c787c0 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -245,8 +245,10 @@ void SwPageBreakWin::Select( ) rSh.SetSelection( *pNd ); SfxStringItem aItem(pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), "textflow"); - pEditWin->GetView().GetViewFrame()->GetDispatcher()->Execute( - FN_FORMAT_TABLE_DLG, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, &aItem, nullptr ); + pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList( + FN_FORMAT_TABLE_DLG, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, + { &aItem }); rSh.Pop( false ); } @@ -258,8 +260,10 @@ void SwPageBreakWin::Select( ) SwPaM aPaM( *pNd ); SwPaMItem aPaMItem( pEditWin->GetView().GetPool( ).GetWhich( FN_PARAM_PAM ), &aPaM ); SfxStringItem aItem( pEditWin->GetView().GetPool( ).GetWhich( SID_PARA_DLG ), "textflow" ); - pEditWin->GetView().GetViewFrame()->GetDispatcher()->Execute( - SID_PARA_DLG, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, &aItem, &aPaMItem, nullptr ); + pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList( + SID_PARA_DLG, + SfxCallMode::SYNCHRON | SfxCallMode::RECORD, + { &aItem, &aPaMItem }); } rSh.LockView( bOldLock ); pEditWin->GrabFocus( ); diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index a25ea0615ca4..f2119ac00909 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1258,7 +1258,8 @@ bool SwFieldMgr::InsertField( { SfxStringItem aFormat(FN_NUMBER_FORMAT, pEntry->GetFormatstring()); pCurShell->GetView().GetViewFrame()->GetDispatcher()-> - Execute(FN_NUMBER_FORMAT, SfxCallMode::SYNCHRON, &aFormat, 0L); + ExecuteList(FN_NUMBER_FORMAT, SfxCallMode::SYNCHRON, + { &aFormat }); } SfxItemSet aBoxSet( pCurShell->GetAttrPool(), diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 66ff7a538359..dcdce1d6a3ed 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -109,8 +109,9 @@ void SwModelessRedlineAcceptDlg::Activate() bool bMod = pSh->IsModified(); SfxBoolItem aShow(FN_REDLINE_SHOW, true); - pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( - FN_REDLINE_SHOW, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, &aShow, 0L); + pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList( + FN_REDLINE_SHOW, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, + { &aShow }); if (!bMod) pSh->ResetModified(); pImplDlg->Init(); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 27df6fd819fc..d2e85e9e6c39 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -449,7 +449,8 @@ void SwZoomBox_Impl::Select() { SfxObjectShell* pCurrentShell = SfxObjectShell::Current(); - pCurrentShell->GetDispatcher()->Execute(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, &aZoom, 0L); + pCurrentShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, + SfxCallMode::ASYNCHRON, { &aZoom }); } ReleaseFocus(); } @@ -577,7 +578,8 @@ void SwJumpToSpecificBox_Impl::Select() SfxUInt16Item aPageNum(nSlotId); aPageNum.SetValue((sal_uInt16)sEntry.toInt32()); SfxObjectShell* pCurrentShell = SfxObjectShell::Current(); - pCurrentShell->GetDispatcher()->Execute(nSlotId, SfxCallMode::ASYNCHRON, &aPageNum, 0L); + pCurrentShell->GetDispatcher()->ExecuteList(nSlotId, SfxCallMode::ASYNCHRON, + { &aPageNum }); } bool SwJumpToSpecificBox_Impl::Notify( NotifyEvent& rNEvt ) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 44c1f42462e2..116d6644e3e4 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -739,7 +739,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) nGalleryItemType == css::gallery::GalleryItemType::MEDIA ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGalleryItem->GetURL() ); - GetView().GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON, &aMediaURLItem, 0L ); + GetView().GetViewFrame()->GetDispatcher()->ExecuteList( + SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON, + { &aMediaURLItem }); } } break; diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx index b74b525fe2aa..50058a1b65f3 100644 --- a/sw/source/uibase/shells/drformsh.cxx +++ b/sw/source/uibase/shells/drformsh.cxx @@ -98,8 +98,9 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) rTempView.GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON ); rTempView.StopShellTimer(); //issue a new command to insert the link - rTempView.GetViewFrame()->GetDispatcher()->Execute( - SID_HYPERLINK_SETLINK, SfxCallMode::ASYNCHRON, &rHLinkItem, 0); + rTempView.GetViewFrame()->GetDispatcher()->ExecuteList( + SID_HYPERLINK_SETLINK, SfxCallMode::ASYNCHRON, + { &rHLinkItem }); } else { diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 9d6892023f87..01b10e995a90 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -154,9 +154,10 @@ void SwFrameShell::Execute(SfxRequest &rReq) { // Frame already exists, open frame dialog for editing. SfxStringItem aDefPage(FN_FORMAT_FRAME_DLG, "columns"); - rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_FORMAT_FRAME_DLG, - SfxCallMode::SYNCHRON|SfxCallMode::RECORD, - &aDefPage, 0L ); + rSh.GetView().GetViewFrame()->GetDispatcher()->ExecuteList( + FN_FORMAT_FRAME_DLG, + SfxCallMode::SYNCHRON|SfxCallMode::RECORD, + { &aDefPage }); } else diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 71bdf6ae2dc9..d686b78ac472 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -944,7 +944,9 @@ void SwTableShell::Execute(SfxRequest &rReq) SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() ); SfxViewFrame* pVFrame = GetView().GetViewFrame(); if( pVFrame ) - pVFrame->GetDispatcher()->Execute( nDispatchSlot, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, &aCountItem, &aAfter, 0L); + pVFrame->GetDispatcher()->ExecuteList(nDispatchSlot, + SfxCallMode::SYNCHRON|SfxCallMode::RECORD, + { &aCountItem, &aAfter }); } } break; diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index 7040be9a445f..f4a594dc4422 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -318,7 +318,8 @@ void PagePropertyPanel::ExecuteOrientationChange( const bool bLandscape ) mpPageSizeItem->SetSize(Size(nRotatedWidth, nRotatedHeight)); // apply changed attributes - GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE_SIZE, SfxCallMode::RECORD, mpPageSizeItem.get(), mpPageItem.get(), 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, + SfxCallMode::RECORD, { mpPageSizeItem.get(), mpPageItem.get() }); } // check, if margin values still fit to the changed page size. @@ -390,7 +391,8 @@ void PagePropertyPanel::ExecuteMarginLRChange( { mpPageLRMarginItem->SetLeft( nPageLeftMargin ); mpPageLRMarginItem->SetRight( nPageRightMargin ); - GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE_LRSPACE, SfxCallMode::RECORD, mpPageLRMarginItem.get(), 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_LRSPACE, + SfxCallMode::RECORD, { mpPageLRMarginItem.get() }); } void PagePropertyPanel::ExecuteMarginULChange( @@ -399,13 +401,15 @@ void PagePropertyPanel::ExecuteMarginULChange( { mpPageULMarginItem->SetUpper( nPageTopMargin ); mpPageULMarginItem->SetLower( nPageBottomMargin ); - GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE_ULSPACE, SfxCallMode::RECORD, mpPageULMarginItem.get(), 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_ULSPACE, + SfxCallMode::RECORD, { mpPageULMarginItem.get() }); } void PagePropertyPanel::ExecutePageLayoutChange( const bool bMirrored ) { mpPageItem->SetPageUsage( bMirrored ? SVX_PAGE_MIRROR : SVX_PAGE_ALL ); - GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE, SfxCallMode::RECORD, mpPageItem.get(), 0L ); + GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE, + SfxCallMode::RECORD, { mpPageItem.get() }); } IMPL_LINK_TYPED( PagePropertyPanel, ClickMarginHdl, ToolBox*, pToolBox, void ) @@ -438,7 +442,8 @@ void PagePropertyPanel::ExecuteSizeChange( const Paper ePaper ) } mpPageSizeItem->SetSize( aPageSize ); - mpBindings->GetDispatcher()->Execute(SID_ATTR_PAGE_SIZE, SfxCallMode::RECORD, mpPageSizeItem.get(), 0L ); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, + SfxCallMode::RECORD, { mpPageSizeItem.get() }); } IMPL_LINK_TYPED( PagePropertyPanel, ClickSizeHdl, ToolBox*, pToolBox, void ) @@ -464,7 +469,8 @@ VclPtr< svx::sidebar::PopupControl> PagePropertyPanel::CreatePageColumnControl( void PagePropertyPanel::ExecuteColumnChange( const sal_uInt16 nColumnType ) { mpPageColumnTypeItem->SetValue( nColumnType ); - mpBindings->GetDispatcher()->Execute(SID_ATTR_PAGE_COLUMN, SfxCallMode::RECORD, mpPageColumnTypeItem.get(), 0L ); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_COLUMN, + SfxCallMode::RECORD, { mpPageColumnTypeItem.get() }); } IMPL_LINK_TYPED( PagePropertyPanel, ClickColumnHdl, ToolBox*, pToolBox, void ) diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index bb111180e491..be381bfe6cb1 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -222,14 +222,16 @@ void WrapPropertyPanel::UpdateSpacingLB() IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, EditContourHdl, Button*, void) { SfxBoolItem aItem(SID_CONTOUR_DLG, true); - mpBindings->GetDispatcher()->Execute(SID_CONTOUR_DLG, SfxCallMode::RECORD, &aItem, 0L); + mpBindings->GetDispatcher()->ExecuteList(SID_CONTOUR_DLG, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, EnableContourHdl, Button*, void) { bool IsContour = mpEnableContour->IsChecked(); SfxBoolItem aItem(FN_FRAME_WRAP_CONTOUR, IsContour); - mpBindings->GetDispatcher()->Execute(FN_FRAME_WRAP_CONTOUR, SfxCallMode::RECORD, &aItem, 0l); + mpBindings->GetDispatcher()->ExecuteList(FN_FRAME_WRAP_CONTOUR, + SfxCallMode::RECORD, { &aItem }); } IMPL_LINK_TYPED(WrapPropertyPanel, SpacingLBHdl, ListBox&, rBox, void) @@ -240,8 +242,10 @@ IMPL_LINK_TYPED(WrapPropertyPanel, SpacingLBHdl, ListBox&, rBox, void) SvxULSpaceItem aULItem(nVal, nVal, RES_UL_SPACE); nTop = nBottom = nLeft = nRight = nVal; - mpBindings->GetDispatcher()->Execute(SID_ATTR_LRSPACE, SfxCallMode::RECORD, &aLRItem, 0l); - mpBindings->GetDispatcher()->Execute(SID_ATTR_ULSPACE, SfxCallMode::RECORD, &aULItem, 0l); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_LRSPACE, + SfxCallMode::RECORD, { &aLRItem }); + mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_ULSPACE, + SfxCallMode::RECORD, { &aULItem }); } IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, WrapTypeHdl, Button*, void) @@ -272,7 +276,8 @@ IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, WrapTypeHdl, Button*, void) nSlot = FN_FRAME_NOWRAP; } SfxBoolItem bStateItem( nSlot, true ); - mpBindings->GetDispatcher()->Execute( nSlot, SfxCallMode::RECORD, &bStateItem, 0L ); + mpBindings->GetDispatcher()->ExecuteList(nSlot, + SfxCallMode::RECORD, { &bStateItem }); } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 36f8f12db6e1..c848f3790f0b 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -980,7 +980,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) !pVFrame->GetChildWindow( SID_NAVIGATOR )) { SfxBoolItem aNavi(SID_NAVIGATOR, true); - GetDispatcher().Execute(SID_NAVIGATOR, SfxCallMode::ASYNCHRON, &aNavi, 0L); + GetDispatcher().ExecuteList(SID_NAVIGATOR, SfxCallMode::ASYNCHRON, { &aNavi }); } uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); @@ -1606,8 +1606,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } } SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly); - GetDispatcher().Execute( SID_FM_DESIGN_MODE, SfxCallMode::ASYNCHRON, - &aItem, 0L ); + GetDispatcher().ExecuteList(SID_FM_DESIGN_MODE, + SfxCallMode::ASYNCHRON, { &aItem }); } break; @@ -1619,8 +1619,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) GetFormShell()->SetView( dynamic_cast<FmFormView*>( GetWrtShell().GetDrawView()) ); SfxBoolItem aItem( SID_FM_DESIGN_MODE, !GetDocShell()->IsReadOnly()); - GetDispatcher().Execute( SID_FM_DESIGN_MODE, SfxCallMode::SYNCHRON, - &aItem, 0L ); + GetDispatcher().ExecuteList(SID_FM_DESIGN_MODE, + SfxCallMode::SYNCHRON, { &aItem }); } } break; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a976ea9cda54..bce3daf1d48a 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -860,7 +860,8 @@ void SwView::Execute(SfxRequest &rReq) else { SfxBoolItem aItem( SID_WIN_FULLSCREEN, false ); - GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SfxCallMode::RECORD, &aItem, 0L ); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_WIN_FULLSCREEN, + SfxCallMode::RECORD, { &aItem }); bIgnore = true; } } @@ -1213,8 +1214,8 @@ void SwView::Execute(SfxRequest &rReq) if(nAlias && (m_nSelectionType & (nsSelectionType::SEL_DRW))) { SfxAllEnumItem aEnumItem(SID_OBJECT_ALIGN, nAlias - SID_OBJECT_ALIGN_LEFT); - GetViewFrame()->GetDispatcher()->Execute( - SID_OBJECT_ALIGN, SfxCallMode::ASYNCHRON, &aEnumItem, 0L); + GetViewFrame()->GetDispatcher()->ExecuteList(SID_OBJECT_ALIGN, + SfxCallMode::ASYNCHRON, { &aEnumItem }); } else if(nAlias) //these slots are either re-mapped to text or object alignment @@ -2360,8 +2361,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) EnableMailMerge(); //then show the "Data base only" field dialog SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, true); - pVFrame->GetDispatcher()->Execute(FN_INSERT_FIELD_DATA_ONLY, - SfxCallMode::SYNCHRON, &aOn, 0L); + pVFrame->GetDispatcher()->ExecuteList(FN_INSERT_FIELD_DATA_ONLY, + SfxCallMode::SYNCHRON, { &aOn }); return; } else diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 271fb33fe239..d7b652425263 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -536,9 +536,9 @@ IMPL_LINK_TYPED( SwView, ExecRulerClick, Ruler *, pRuler, void ) } SfxStringItem aDefPage(SID_PARA_DLG, sDefPage); - GetViewFrame()->GetDispatcher()->Execute( SID_PARA_DLG, + GetViewFrame()->GetDispatcher()->ExecuteList(SID_PARA_DLG, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, - &aDefPage, 0L ); + { &aDefPage }); } sal_uInt16 SwView::GetMoveType() diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index 7614724f9bc0..79228e460ccf 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -169,9 +169,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) { SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName); SfxBoolItem aSilent( SID_SILENT, true ); - GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC, + GetViewFrame()->GetDispatcher()->ExecuteList(SID_PRINTDOC, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, - &aPrinterName, &aSilent, 0L ); + { &aPrinterName, &aSilent }); } else { @@ -180,9 +180,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo)))); aInfoBox->Execute(); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); - GetViewFrame()->GetDispatcher()->Execute(SID_SW_EDITOPTIONS, + GetViewFrame()->GetDispatcher()->ExecuteList(SID_SW_EDITOPTIONS, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, - &aDefPage, 0L ); + { &aDefPage }); } } break; @@ -209,8 +209,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) if(RET_YES == nRet) { SfxBoolItem aBool(FN_QRY_MERGE, true); - GetViewFrame()->GetDispatcher()->Execute( - FN_QRY_MERGE, SfxCallMode::ASYNCHRON, &aBool, 0L); + GetViewFrame()->GetDispatcher()->ExecuteList( + FN_QRY_MERGE, SfxCallMode::ASYNCHRON, + { &aBool }); rReq.Ignore(); } return; diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index ee9ac7ca54c5..6b039a2c1a53 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -228,10 +228,10 @@ void SwXDispatch::dispatch(const util::URL& aURL, else if(aURL.Complete.equalsAscii(cURLFormLetter)) { SfxUsrAnyItem aDBProperties(FN_PARAM_DATABASE_PROPERTIES, uno::makeAny(aArgs)); - m_pView->GetViewFrame()->GetDispatcher()->Execute( + m_pView->GetViewFrame()->GetDispatcher()->ExecuteList( FN_MAILMERGE_WIZARD, SfxCallMode::ASYNCHRON, - &aDBProperties, 0L); + { &aDBProperties }); } #endif else if(aURL.Complete.equalsAscii(cURLDocumentDataSource)) diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index 71c34527f1a5..37f2828e683c 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -125,9 +125,9 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt ) if( nCurrId != USHRT_MAX) { SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] ); - SfxViewFrame::Current()->GetDispatcher()->Execute( FN_STAT_BOOKMARK, + SfxViewFrame::Current()->GetDispatcher()->ExecuteList(FN_STAT_BOOKMARK, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, - &aBookmark, 0L ); + { &aBookmark }); } } } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 36ecbb27c1a2..ae0bf5c2a009 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3181,8 +3181,8 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) { SwPtrItem aPtrItem( FN_INSERT_MULTI_TOX, const_cast<SwTOXBase *>(pBase)); m_pActiveShell->GetView().GetViewFrame()-> - GetDispatcher()->Execute(FN_INSERT_MULTI_TOX, - SfxCallMode::ASYNCHRON, &aPtrItem, 0L); + GetDispatcher()->ExecuteList(FN_INSERT_MULTI_TOX, + SfxCallMode::ASYNCHRON, { &aPtrItem }); } break; diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index b8136da4c126..16984874bce7 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -849,7 +849,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry { SfxStringItem aName(FN_EDIT_REGION, pCont->GetSection()->GetSectionName()); - rDispatch.Execute(FN_EDIT_REGION, SfxCallMode::ASYNCHRON, &aName, 0L); + rDispatch.ExecuteList(FN_EDIT_REGION, SfxCallMode::ASYNCHRON, + { &aName }); } } break; @@ -932,8 +933,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry SwDocShell::Factory().GetFilterContainer()->GetName()); const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>( - rDispatch.Execute(SID_NEWDOCDIRECT, - SfxCallMode::SYNCHRON, &aFactory, 0L)); + rDispatch.ExecuteList(SID_NEWDOCDIRECT, + SfxCallMode::SYNCHRON, { &aFactory })); // save at SfxFrame* pFrame = pItem ? pItem->GetFrame() : nullptr; @@ -1193,8 +1194,8 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont) SfxStringItem aTargetFrameName( SID_TARGETNAME, "_blank" ); SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle()); pActiveShell->GetView().GetViewFrame()->GetDispatcher()-> - Execute(SID_OPENDOC, SfxCallMode::ASYNCHRON, - &aURL, &aReadOnly, &aReferer, &aTargetFrameName, 0L); + ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON, + { &aURL, &aReadOnly, &aReferer, &aTargetFrameName }); } } diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 08cba7818e47..29fc8735e818 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1194,9 +1194,9 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt ) SfxStringItem aOptionsItem( SID_OPTIONS, OUString("HRC") ); SfxLinkItem aLink( SID_DONELINK, LINK( this, SwNavigationPI, DoneLink ) ); - GetActiveView()->GetViewFrame()->GetDispatcher()->Execute( + GetActiveView()->GetViewFrame()->GetDispatcher()->ExecuteList( SID_OPENDOC, SfxCallMode::ASYNCHRON, - &aFileItem, &aOptionsItem, &aLink, 0L ); + { &aFileItem, &aOptionsItem, &aLink }); } return nRet; } diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index d518c663ab74..cb847c2243c5 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -122,10 +122,10 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) // looks a bit awkward, but another way is not possible pStyle = pPool->operator[]( nCurrId - 1 ); SfxStringItem aStyle( FN_SET_PAGE_STYLE, pStyle->GetName() ); - pWrtShell->GetView().GetViewFrame()->GetDispatcher()->Execute( + pWrtShell->GetView().GetViewFrame()->GetDispatcher()->ExecuteList( FN_SET_PAGE_STYLE, SfxCallMode::SLOT|SfxCallMode::RECORD, - &aStyle, 0L ); + { &aStyle }); } } } |