Kaydet (Commit) 6942e188 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

tdf#89592: use initializer list

Change-Id: If3ca55d4dc42975785a4978e473ddf78e7713912
üst 88298839
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
*/ */
#include <mmpreparemergepage.hxx> #include <mmpreparemergepage.hxx>
#include <comphelper/propertysequence.hxx>
#include <mailmergewizard.hxx> #include <mailmergewizard.hxx>
#include <mmconfigitem.hxx> #include <mmconfigitem.hxx>
#include <dbui.hrc> #include <dbui.hrc>
...@@ -116,25 +118,16 @@ IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl) ...@@ -116,25 +118,16 @@ IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
m_pExcludeCB->Check(rConfigItem.IsRecordExcluded( rConfigItem.GetResultSetPosition() )); m_pExcludeCB->Check(rConfigItem.IsRecordExcluded( rConfigItem.GetResultSetPosition() ));
//now the record has to be merged into the source document //now the record has to be merged into the source document
const SwDBData& rDBData = rConfigItem.GetCurrentDBData(); const SwDBData& rDBData = rConfigItem.GetCurrentDBData();
Sequence<Any> vSelection = { makeAny(rConfigItem.GetResultSetPosition()) };
Sequence< PropertyValue > aArgs(7); auto aArgs(::comphelper::InitPropertySequence({
Sequence<Any> aSelection(1); {"Selection", makeAny(vSelection)},
aSelection[0] <<= rConfigItem.GetResultSetPosition(); {"DataSourceNamea", makeAny(rDBData.sDataSource)},
aArgs[0].Name = "Selection"; {"Command", makeAny(rDBData.sCommand)},
aArgs[0].Value <<= aSelection; {"CommandType", makeAny(rDBData.nCommandType)},
aArgs[1].Name = "DataSourceName"; {"ActiveConnection", makeAny(rConfigItem.GetConnection().getTyped())},
aArgs[1].Value <<= rDBData.sDataSource; {"Filter", makeAny(rConfigItem.GetFilter())},
aArgs[2].Name = "Command"; {"Cursor", makeAny(rConfigItem.GetResultSet())}
aArgs[2].Value <<= rDBData.sCommand; }));
aArgs[3].Name = "CommandType";
aArgs[3].Value <<= rDBData.nCommandType;
aArgs[4].Name = "ActiveConnection";
aArgs[4].Value <<= rConfigItem.GetConnection().getTyped();
aArgs[5].Name = "Filter";
aArgs[5].Value <<= rConfigItem.GetFilter();
aArgs[6].Name = "Cursor";
aArgs[6].Value <<= rConfigItem.GetResultSet();
svx::ODataAccessDescriptor aDescriptor(aArgs); svx::ODataAccessDescriptor aDescriptor(aArgs);
SwWrtShell& rSh = m_pWizard->GetSwView()->GetWrtShell(); SwWrtShell& rSh = m_pWizard->GetSwView()->GetWrtShell();
SwMergeDescriptor aMergeDesc( DBMGR_MERGE, rSh, aDescriptor ); SwMergeDescriptor aMergeDesc( DBMGR_MERGE, rSh, aDescriptor );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment