summaryrefslogtreecommitdiff
path: root/sw/source
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 /sw/source
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 'sw/source')
-rw-r--r--sw/source/ui/index/cnttab.cxx12
-rw-r--r--sw/source/uibase/app/apphdl.cxx11
-rw-r--r--sw/source/uibase/app/docsh2.cxx23
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx15
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx12
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx3
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx5
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx6
-rw-r--r--sw/source/uibase/shells/basesh.cxx4
-rw-r--r--sw/source/uibase/shells/drformsh.cxx5
-rw-r--r--sw/source/uibase/shells/frmsh.cxx7
-rw-r--r--sw/source/uibase/shells/tabsh.cxx4
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx18
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx15
-rw-r--r--sw/source/uibase/uiview/view.cxx10
-rw-r--r--sw/source/uibase/uiview/view2.cxx11
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx4
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx13
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx4
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx11
-rw-r--r--sw/source/uibase/utlui/navipi.cxx4
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx4
24 files changed, 119 insertions, 90 deletions
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 });
}
}
}