summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
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 'starmath')
-rw-r--r--starmath/source/ElementsDockingWindow.cxx4
-rw-r--r--starmath/source/dialog.cxx4
-rw-r--r--starmath/source/edit.cxx8
-rw-r--r--starmath/source/view.cxx8
4 files changed, 12 insertions, 12 deletions
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;