sw/inc/dbmgr.hxx | 5 ----- sw/source/ui/dbui/dbmgr.cxx | 5 ----- sw/source/ui/dbui/mmoutputpage.cxx | 2 -- sw/source/ui/uiview/view2.cxx | 3 --- 4 files changed, 15 deletions(-)
New commits: commit e3e6ad0e5c36531d8002c24c5e41a99ff597c095 Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Fri Jan 10 23:36:52 2014 +0100 Drop unused nMergeType from SwNewDBMgr All code uses the nMergeType from the SwMergeDescriptor. Actually there is just code setting the nMergeType in the SwNewDBMgr but none reading or comparing it. I don't know if the removed assignments actually should work on a SwMergeDescriptor object, so some parts of mail merge may already have been broken. Change-Id: Ic8c52e6171f122d3837d9f2de81053e30ac8f5b7 Reviewed-on: https://gerrit.libreoffice.org/7432 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index daee01a..f99468d 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -190,7 +190,6 @@ friend class SwConnectionDisposedListener_Impl; OUString sEMailAddrFld; ///< Mailing: Column name of email address. OUString sSubject; ///< Mailing: Subject OUString sAttached; ///< Mailing: Attached Files. - sal_uInt16 nMergeType; sal_Bool bInitDBFields : 1; sal_Bool bSingleJobs : 1; ///< Printing job when called from Basic. sal_Bool bCancel : 1; ///< Mail merge save canceled. @@ -224,10 +223,6 @@ public: SwNewDBMgr(); ~SwNewDBMgr(); - /// Current merge type. Cf. DBMgrOptions-enum. - inline sal_uInt16 GetMergeType() const { return nMergeType; } - inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; } - /// MailMergeEvent source const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; } void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; } diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 5fe808a..4616520 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -314,8 +314,6 @@ static sal_Bool lcl_GetColumnCnt(SwDSParam* pParam, --------------------------------------------------------------------*/ sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc ) { - SetMergeType( rMergeDesc.nMergeType ); - OSL_ENSURE(!bInMerge && !pImpl->pMergeData, "merge already activated!"); SwDBData aData; @@ -707,7 +705,6 @@ sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox, Description: CTOR --------------------------------------------------------------------*/ SwNewDBMgr::SwNewDBMgr() : - nMergeType(DBMGR_INSERT), bInitDBFields(sal_False), bInMerge(sal_False), bMergeSilent(sal_False), @@ -1351,8 +1348,6 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, SW_MOD()->SetView(&pSourceShell->GetView()); } - - nMergeType = DBMGR_INSERT; } if(bEMail) diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index eb15e73..eb32ac9 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -838,7 +838,6 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) sPages += " - "; sPages += OUString::number( rEndInfo.nEndPageInTarget ); - SwWrtShell& rSh = pTargetView->GetWrtShell(); pTargetView->SetMailMergeConfigItem(&rConfigItem, 0, sal_False); if(m_pTempPrinter) { @@ -851,7 +850,6 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell(); SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh)); - rSh.GetNewDBMgr()->SetMergeType( DBMGR_MERGE_DOCUMENTS ); SfxBoolItem aMergeSilent(SID_SILENT, sal_False); m_pWizard->enableButtons(WZB_CANCEL, sal_False); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 2601473..e6b413b 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1056,7 +1056,6 @@ void SwView::Execute(SfxRequest &rReq) aData = rSh.GetDBData(); rSh.EnterStdMode(); // force change in text shell; necessary for mixing DB fields AttrChangedNotify( &rSh ); - pNewDBMgr->SetMergeType( DBMGR_MERGE ); Sequence<PropertyValue> aProperties(3); PropertyValue* pValues = aProperties.getArray(); @@ -2346,8 +2345,6 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) if (pNewDBMgr) { - pNewDBMgr->SetMergeType( DBMGR_MERGE ); - Sequence<PropertyValue> aProperties(3); PropertyValue* pValues = aProperties.getArray(); pValues[0].Name = "DataSourceName"; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits