summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-03-30 17:55:05 +0200
committerMichael Stahl <mstahl@redhat.com>2016-03-31 11:19:23 +0000
commit51d7f466df85f679f54e4e690f8b5e602192eb7b (patch)
tree94a72abb002879ef4dca830ad652415521b8bdd5 /sc
parent7a2d55a1943e51895d808e87f1766b44761a495a (diff)
sfx2: make SfxDispatcher::Execute() less variadic ...
... and less overloaded; C++11 initializer_list should make undefined behavior as fixed in ba0a866b83f016fd460320e7d057dd107e019f19 less likely. Change-Id: I15cc0804451b6a4fcbfaa623f9a30db222207865 Reviewed-on: https://gerrit.libreoffice.org/23666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/global.cxx11
-rw-r--r--sc/source/ui/app/inputwin.cxx4
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx7
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx3
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx6
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx5
-rw-r--r--sc/source/ui/formdlg/formula.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx20
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx3
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx6
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx17
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.cxx21
-rw-r--r--sc/source/ui/sidebar/CellLineStyleControl.cxx3
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx15
-rw-r--r--sc/source/ui/view/tabcont.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx4
-rw-r--r--sc/source/ui/view/tabvwshe.cxx8
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
-rw-r--r--sc/source/ui/view/viewfun4.cxx9
-rw-r--r--sc/source/ui/view/viewfun5.cxx4
-rw-r--r--sc/source/ui/view/viewfun6.cxx4
-rw-r--r--sc/source/ui/view/viewutil.cxx3
29 files changed, 107 insertions, 88 deletions
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 });
}
}