diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-03-24 13:43:46 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-03-24 22:40:41 +0100 |
commit | e637b6743a506ef74c93ccbe15ab6642f3baa34f (patch) | |
tree | 8318b820a833163d64f6b55e5c08b23978999bbd /sw/source/uibase/uno/unomailmerge.cxx | |
parent | 3e33c891ab9c49e6fb4b3767c5e6daae651ebc82 (diff) |
MM: move email subject and address into descriptor
Both are not related to the DBManager, but the mail merge job.
While at it, also drop the insane bSubjectIsFilename handling, add
an independent sPath, rename sAddressFromColumn to a more general
sDBcolumn, as it's also used for file name lookup in FILE mode, and
unify the DB column data handling.
Change-Id: I1b583f4a67279a229329ba7cd15fb8d2c215737c
Diffstat (limited to 'sw/source/uibase/uno/unomailmerge.cxx')
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index dcf1b39154d0..d5b9d97ff55d 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -700,7 +700,6 @@ uno::Any SAL_CALL SwXMailMerge::execute( aMergeDesc.pMailMergeConfigItem = pMMConfigItem.get(); break; case MailMergeType::FILE: - case MailMergeType::MAIL: { INetURLObject aURLObj; aURLObj.SetSmartProtocol( INetProtocol::File ); @@ -731,23 +730,22 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (!aPath.isEmpty() && !aPath.endsWith(aDelim)) aPath += aDelim; if (bCurFileNameFromColumn) - pMgr->SetEMailColumn( aCurFileNamePrefix ); + aMergeDesc.sDBcolumn = aCurFileNamePrefix; else { aPath += aCurFileNamePrefix; - pMgr->SetEMailColumn( OUString() ); - } - pMgr->SetSubject( aPath ); - if(MailMergeType::FILE == nCurOutputType) - { - aMergeDesc.sSaveToFilter = m_sSaveFilter; - aMergeDesc.sSaveToFilterOptions = m_sSaveFilterOptions; - aMergeDesc.aSaveToFilterData = m_aSaveFilterData; - aMergeDesc.bCreateSingleFile = m_bSaveAsSingleFile; } - else + + aMergeDesc.sPath = aPath; + aMergeDesc.sSaveToFilter = m_sSaveFilter; + aMergeDesc.sSaveToFilterOptions = m_sSaveFilterOptions; + aMergeDesc.aSaveToFilterData = m_aSaveFilterData; + aMergeDesc.bCreateSingleFile = m_bSaveAsSingleFile; + } + break; + case MailMergeType::MAIL: { - pMgr->SetEMailColumn( m_sAddressFromColumn ); + aMergeDesc.sDBcolumn = m_sAddressFromColumn; if(m_sAddressFromColumn.isEmpty()) throw RuntimeException("Mail address column not set.", static_cast < cppu::OWeakObject * > ( this ) ); aMergeDesc.sSaveToFilter = m_sAttachmentFilter; @@ -769,7 +767,6 @@ uno::Any SAL_CALL SwXMailMerge::execute( if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected()) throw RuntimeException("Failed to connect to mail server.", static_cast < cppu::OWeakObject * > ( this ) ); } - } break; } |