diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-12-10 18:59:00 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-12-10 23:52:01 +0100 |
commit | 2ac8a544e7d22fd30c31870e5b3cbd22f52ce875 (patch) | |
tree | 73f1c46016ab21f15247b8c2637d7774764d5006 /sw | |
parent | 115761cb1aa554890015aeb2062f0d645f4cb0a5 (diff) |
mailmerge: Make this more readable, and prefer a constructor over assignment.
Change-Id: I9296964902c3490c73ecf7ee9c2a3623c195c386
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dbui/mmpreparemergepage.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index 7b8d649fc7f5..662f94f885a6 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -123,19 +123,20 @@ void SwMailMergePrepareMergePage:: MoveHdl_Impl(Control* pCtrl) m_pNextPB->Enable(bValid && !bIsLast); m_pLastPB->Enable(bValid && !bIsLast); m_pExcludeCB->Check(rConfigItem.IsRecordExcluded( rConfigItem.GetResultSetPosition() )); + //now the record has to be merged into the source document const SwDBData& rDBData = rConfigItem.GetCurrentDBData(); - Sequence<Any> vSelection = { makeAny(rConfigItem.GetResultSetPosition()) }; - auto aArgs(::comphelper::InitPropertySequence({ + Sequence<Any> vSelection({ makeAny(rConfigItem.GetResultSetPosition()) }); + svx::ODataAccessDescriptor aDescriptor(::comphelper::InitPropertySequence({ {"Selection", makeAny(vSelection)}, - {"DataSourceName", makeAny(rDBData.sDataSource)}, + {"DataSourceName", makeAny(rDBData.sDataSource)}, {"Command", makeAny(rDBData.sCommand)}, {"CommandType", makeAny(rDBData.nCommandType)}, {"ActiveConnection", makeAny(rConfigItem.GetConnection().getTyped())}, {"Filter", makeAny(rConfigItem.GetFilter())}, {"Cursor", makeAny(rConfigItem.GetResultSet())} })); - svx::ODataAccessDescriptor aDescriptor(aArgs); + SwWrtShell& rSh = m_pWizard->GetSwView()->GetWrtShell(); SwMergeDescriptor aMergeDesc( DBMGR_MERGE, rSh, aDescriptor ); rSh.GetDBManager()->MergeNew(aMergeDesc); |