LibreOffice Module sw (master)  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SwXMailMerge Class Reference

#include <unomailmerge.hxx>

Inheritance diagram for SwXMailMerge:
[legend]
Collaboration diagram for SwXMailMerge:
[legend]

Public Member Functions

 SwXMailMerge ()
 
void LaunchMailMergeEvent (const css::text::MailMergeEvent &rData) const
 
virtual css::uno::Any SAL_CALL execute (const css::uno::Sequence< css::beans::NamedValue > &Arguments) override
 
virtual void SAL_CALL cancel () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &aPropertyName, const css::uno::Any &aValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &PropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual void SAL_CALL addMailMergeEventListener (const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
 
virtual void SAL_CALL removeMailMergeEventListener (const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Protected Member Functions

virtual ~SwXMailMerge () override
 

Private Member Functions

void launchEvent (const css::beans::PropertyChangeEvent &rEvt) const
 
 SwXMailMerge (const SwXMailMerge &)=delete
 
SwXMailMergeoperator= (const SwXMailMerge &)=delete
 

Private Attributes

comphelper::OInterfaceContainerHelper2 m_aEvtListeners
 
comphelper::OInterfaceContainerHelper2 m_aMergeListeners
 
OPropertyListenerContainerHelper m_aPropListeners
 
const SfxItemPropertySetm_pPropSet
 
SfxObjectShellRef m_xDocSh
 
OUString m_aTmpFileName
 
css::uno::Sequence< css::uno::Any > m_aSelection
 
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet
 
css::uno::Reference< css::sdbc::XConnection > m_xConnection
 
css::uno::Reference< css::frame::XModel > m_xModel
 
OUString m_aDataSourceName
 
OUString m_aDataCommand
 
OUString m_aFilter
 
OUString m_aDocumentURL
 
OUString m_aOutputURL
 
OUString m_aFileNamePrefix
 
sal_Int32 m_nDataCommandType
 
sal_Int16 m_nOutputType
 
bool m_bEscapeProcessing
 
bool m_bSinglePrintJobs
 
bool m_bFileNameFromColumn
 
OUString m_sInServerPassword
 
OUString m_sOutServerPassword
 
OUString m_sSubject
 
OUString m_sAddressFromColumn
 
OUString m_sMailBody
 
OUString m_sAttachmentName
 
OUString m_sAttachmentFilter
 
css::uno::Sequence< OUString > m_aCopiesTo
 
css::uno::Sequence< OUString > m_aBlindCopiesTo
 
bool m_bSendAsHTML
 
bool m_bSendAsAttachment
 
css::uno::Sequence< css::beans::PropertyValue > m_aPrintSettings
 
bool m_bSaveAsSingleFile
 
OUString m_sSaveFilter
 
OUString m_sSaveFilterOptions
 
css::uno::Sequence< css::beans::PropertyValue > m_aSaveFilterData
 
bool m_bDisposing
 
SwDBManagerm_pMgr
 

Friends

class MailMergeExecuteFinalizer
 

Detailed Description

Definition at line 65 of file unomailmerge.hxx.

Constructor & Destructor Documentation

SwXMailMerge::SwXMailMerge ( const SwXMailMerge )
privatedelete
SwXMailMerge::~SwXMailMerge ( )
overrideprotectedvirtual

we still need to close the model and doc shell manually because there is no automatism that will do that later. #120086#

Definition at line 393 of file unomailmerge.cxx.

References CloseModelAndDocSh(), DeleteTmpFile_Impl(), m_aTmpFileName, m_xDocSh, and m_xModel.

SwXMailMerge::SwXMailMerge ( )

Member Function Documentation

void SAL_CALL SwXMailMerge::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual
void SAL_CALL SwXMailMerge::addMailMergeEventListener ( const css::uno::Reference< css::text::XMailMergeListener > &  xListener)
overridevirtual
void SAL_CALL SwXMailMerge::addPropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual
void SAL_CALL SwXMailMerge::addVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 1102 of file unomailmerge.cxx.

void SAL_CALL SwXMailMerge::cancel ( )
overridevirtual

cleanup in the execute function.

Definition at line 827 of file unomailmerge.cxx.

References GetMailMergeMutex(), m_pMgr, and SwDBManager::MergeCancel().

void SAL_CALL SwXMailMerge::dispose ( void  )
overridevirtual
uno::Any SAL_CALL SwXMailMerge::execute ( const css::uno::Sequence< css::beans::NamedValue > &  Arguments)
overridevirtual

Definition at line 432 of file unomailmerge.cxx.

References SwMergeDescriptor::aBlindCopiesTo, SwMergeDescriptor::aCopiesTo, Any, SwMergeDescriptor::aPrintOptions, SwMergeDescriptor::aSaveToFilterData, SwMergeDescriptor::bCreateSingleFile, SwMergeDescriptor::bSendAsAttachment, SwMergeDescriptor::bSendAsHTML, SwEditShell::CalcLayout(), svx::Command, svx::CommandType, svx::Connection, SwMailMergeHelper::ConnectToSmtpServer(), svx::Cursor, DBMGR_MERGE_EMAIL, DBMGR_MERGE_FILE, DBMGR_MERGE_PRINTER, DBMGR_MERGE_SHELL, DeleteTmpFile_Impl(), svx::EscapeProcessing, Exception, FILTER_XML, tools::SvRef< T >::get(), INetURLObject::GetBase(), SfxObjectShell::GetBaseModel(), SwEditShell::GetDBManager(), SwView::GetDocShell(), SwDocShell::GetEventName(), SwIoSystem::GetFilterOfFormat(), SfxViewFrame::GetFirst(), SwViewShell::getIDocumentDeviceAccess(), SwDBManager::GetMailMergeEvtSrc(), INetURLObject::GetMainURL(), IDocumentDeviceAccess::getPrintData(), comphelper::getProcessServiceFactory(), SwMailMergeConfigItem::GetTargetView(), utl::TempFile::GetURL(), SfxShell::GetViewShell(), LoadFromURL_impl(), m_aBlindCopiesTo, m_aCopiesTo, m_aDataCommand, m_aDataSourceName, m_aDocumentURL, m_aFileNamePrefix, m_aFilter, m_aOutputURL, m_aPrintSettings, m_aSaveFilterData, m_aSelection, m_aTmpFileName, m_bEscapeProcessing, m_bFileNameFromColumn, m_bSaveAsSingleFile, m_bSendAsAttachment, m_bSendAsHTML, m_bSinglePrintJobs, m_nDataCommandType, m_nOutputType, m_pMgr, m_sAddressFromColumn, m_sAttachmentFilter, m_sAttachmentName, m_sInServerPassword, m_sMailBody, m_sOutServerPassword, m_sSaveFilter, m_sSaveFilterOptions, m_sSubject, m_xConnection, m_xDocSh, m_xModel, m_xResultSet, makeAny(), SwDBManager::Merge(), SfxApplication::NotifyEvent(), SwMergeDescriptor::pMailMergeConfigItem, INetURLObject::removeSegment(), utl::SharedUNOComponent< INTERFACE, COMPONENT >::reset(), SwMergeDescriptor::sAttachmentName, SwMergeDescriptor::sDBcolumn, svx::Selection, svx::ODataAccessDescriptor::setDataSource(), SwDBManager::SetMailMergeEvtSrc(), SwDBManager::SetMergeSilent(), IDocumentDeviceAccess::setPrintData(), SwPrintData::SetPrintSingleJobs(), INetURLObject::SetSmartProtocol(), INetURLObject::SetSmartURL(), SfxGetpApp(), SwMergeDescriptor::sMailBody, SwMergeDescriptor::sPrefix, SwMergeDescriptor::sSaveToFilter, SwMergeDescriptor::sSaveToFilterOptions, SwMergeDescriptor::sSubject, STR_SW_EVENT_MAIL_MERGE, STR_SW_EVENT_MAIL_MERGE_END, comphelper::string::stripStart(), utl::SharedUNOComponent< INTERFACE, COMPONENT >::TakeOwnership, INetURLObject::ToIUri, SWUnoHelper::UCB_IsDirectory(), SWUnoHelper::UCB_IsReadOnlyFileName(), UNO_NAME_ADDRESS_FROM_COLUMN, UNO_NAME_ATTACHMENT_FILTER, UNO_NAME_ATTACHMENT_NAME, UNO_NAME_BLIND_COPIES_TO, UNO_NAME_CONNECTION, UNO_NAME_COPIES_TO, UNO_NAME_DAD_COMMAND, UNO_NAME_DAD_COMMAND_TYPE, UNO_NAME_DATA_SOURCE_NAME, UNO_NAME_DOCUMENT_URL, UNO_NAME_ESCAPE_PROCESSING, UNO_NAME_FILE_NAME_FROM_COLUMN, UNO_NAME_FILE_NAME_PREFIX, UNO_NAME_FILTER, UNO_NAME_IN_SERVER_PASSWORD, UNO_NAME_MAIL_BODY, UNO_NAME_MODEL, UNO_NAME_OUT_SERVER_PASSWORD, UNO_NAME_OUTPUT_TYPE, UNO_NAME_OUTPUT_URL, UNO_NAME_PRINT_OPTIONS, UNO_NAME_RESULT_SET, UNO_NAME_SAVE_AS_SINGLE_FILE, UNO_NAME_SAVE_FILTER, UNO_NAME_SAVE_FILTER_DATA, UNO_NAME_SAVE_FILTER_OPTIONS, UNO_NAME_SELECTION, UNO_NAME_SEND_AS_ATTACHMENT, UNO_NAME_SEND_AS_HTML, UNO_NAME_SINGLE_PRINT_JOBS, UNO_NAME_SUBJECT, and SwMergeDescriptor::xSmtpServer.

OUString SAL_CALL SwXMailMerge::getImplementationName ( )
overridevirtual

Definition at line 1165 of file unomailmerge.cxx.

uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXMailMerge::getPropertySetInfo ( )
overridevirtual

Definition at line 863 of file unomailmerge.cxx.

References SfxItemPropertySet::getPropertySetInfo(), and m_pPropSet.

uno::Any SAL_CALL SwXMailMerge::getPropertyValue ( const OUString &  PropertyName)
overridevirtual
uno::Sequence< OUString > SAL_CALL SwXMailMerge::getSupportedServiceNames ( )
overridevirtual

Definition at line 1175 of file unomailmerge.cxx.

void SwXMailMerge::launchEvent ( const css::beans::PropertyChangeEvent &  rEvt) const
private
void SwXMailMerge::LaunchMailMergeEvent ( const css::text::MailMergeEvent &  rData) const
SwXMailMerge& SwXMailMerge::operator= ( const SwXMailMerge )
privatedelete
void SAL_CALL SwXMailMerge::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  aListener)
overridevirtual
void SAL_CALL SwXMailMerge::removeMailMergeEventListener ( const css::uno::Reference< css::text::XMailMergeListener > &  xListener)
overridevirtual
void SAL_CALL SwXMailMerge::removePropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  aListener 
)
overridevirtual
void SAL_CALL SwXMailMerge::removeVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 1110 of file unomailmerge.cxx.

void SAL_CALL SwXMailMerge::setPropertyValue ( const OUString &  aPropertyName,
const css::uno::Any &  aValue 
)
overridevirtual

Definition at line 870 of file unomailmerge.cxx.

References Any, SfxItemPropertySimpleEntry::aType, SfxItemPropertyMap::getByName(), SfxItemPropertySet::getPropertyMap(), launchEvent(), LoadFromURL_impl(), m_aBlindCopiesTo, m_aCopiesTo, m_aDataCommand, m_aDataSourceName, m_aDocumentURL, m_aFileNamePrefix, m_aFilter, m_aOutputURL, m_aPrintSettings, m_aSaveFilterData, m_aSelection, m_bEscapeProcessing, m_bFileNameFromColumn, m_bSaveAsSingleFile, m_bSendAsAttachment, m_bSendAsHTML, m_bSinglePrintJobs, m_nDataCommandType, m_nOutputType, m_pPropSet, m_sAddressFromColumn, m_sAttachmentFilter, m_sAttachmentName, m_sInServerPassword, m_sMailBody, m_sOutServerPassword, m_sSaveFilter, m_sSaveFilterOptions, m_sSubject, m_xConnection, m_xDocSh, m_xModel, m_xResultSet, SfxItemPropertySimpleEntry::nFlags, SfxItemPropertySimpleEntry::nWID, SWUnoHelper::UCB_IsDirectory(), SWUnoHelper::UCB_IsReadOnlyFileName(), WID_ADDRESS_FROM_COLUMN, WID_ATTACHMENT_FILTER, WID_ATTACHMENT_NAME, WID_BLIND_COPIES_TO, WID_CONNECTION, WID_COPIES_TO, WID_DATA_COMMAND, WID_DATA_COMMAND_TYPE, WID_DATA_SOURCE_NAME, WID_DOCUMENT_URL, WID_ESCAPE_PROCESSING, WID_FILE_NAME_FROM_COLUMN, WID_FILE_NAME_PREFIX, WID_FILTER, WID_IN_SERVER_PASSWORD, WID_MAIL_BODY, WID_MAIL_SUBJECT, WID_MODEL, WID_OUT_SERVER_PASSWORD, WID_OUTPUT_TYPE, WID_OUTPUT_URL, WID_PRINT_OPTIONS, WID_RESULT_SET, WID_SAVE_AS_SINGLE_FILE, WID_SAVE_FILTER, WID_SAVE_FILTER_DATA, WID_SAVE_FILTER_OPTIONS, WID_SELECTION, WID_SEND_AS_ATTACHMENT, WID_SEND_AS_HTML, and WID_SINGLE_PRINT_JOBS.

sal_Bool SAL_CALL SwXMailMerge::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 1170 of file unomailmerge.cxx.

References cppu::supportsService().

Friends And Related Function Documentation

friend class MailMergeExecuteFinalizer
friend

Definition at line 76 of file unomailmerge.hxx.

Member Data Documentation

css::uno::Sequence< OUString > SwXMailMerge::m_aBlindCopiesTo
private

Definition at line 113 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

css::uno::Sequence< OUString > SwXMailMerge::m_aCopiesTo
private

Definition at line 112 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_aDataCommand
private

Definition at line 94 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_aDataSourceName
private

Definition at line 93 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_aDocumentURL
private

Definition at line 96 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

comphelper::OInterfaceContainerHelper2 SwXMailMerge::m_aEvtListeners
private

Definition at line 78 of file unomailmerge.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

OUString SwXMailMerge::m_aFileNamePrefix
private

Definition at line 98 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_aFilter
private

Definition at line 95 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

comphelper::OInterfaceContainerHelper2 SwXMailMerge::m_aMergeListeners
private
OUString SwXMailMerge::m_aOutputURL
private

Definition at line 97 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

css::uno::Sequence< css::beans::PropertyValue > SwXMailMerge::m_aPrintSettings
private

Definition at line 117 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OPropertyListenerContainerHelper SwXMailMerge::m_aPropListeners
private
css::uno::Sequence< css::beans::PropertyValue > SwXMailMerge::m_aSaveFilterData
private

Definition at line 122 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

css::uno::Sequence< css::uno::Any > SwXMailMerge::m_aSelection
private

Definition at line 89 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_aTmpFileName
private

Definition at line 86 of file unomailmerge.hxx.

Referenced by execute(), and ~SwXMailMerge().

bool SwXMailMerge::m_bDisposing
private
bool SwXMailMerge::m_bEscapeProcessing
private

Definition at line 101 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

bool SwXMailMerge::m_bFileNameFromColumn
private

Definition at line 103 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

bool SwXMailMerge::m_bSaveAsSingleFile
private

Definition at line 119 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

bool SwXMailMerge::m_bSendAsAttachment
private

Definition at line 115 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

bool SwXMailMerge::m_bSendAsHTML
private

Definition at line 114 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

bool SwXMailMerge::m_bSinglePrintJobs
private

Definition at line 102 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

sal_Int32 SwXMailMerge::m_nDataCommandType
private

Definition at line 99 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

sal_Int16 SwXMailMerge::m_nOutputType
private

Definition at line 100 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

SwDBManager* SwXMailMerge::m_pMgr
private
const SfxItemPropertySet* SwXMailMerge::m_pPropSet
private
OUString SwXMailMerge::m_sAddressFromColumn
private

Definition at line 108 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sAttachmentFilter
private

Definition at line 111 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sAttachmentName
private

Definition at line 110 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sInServerPassword
private

Definition at line 105 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sMailBody
private

Definition at line 109 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sOutServerPassword
private

Definition at line 106 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sSaveFilter
private

Definition at line 120 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sSaveFilterOptions
private

Definition at line 121 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

OUString SwXMailMerge::m_sSubject
private

Definition at line 107 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

css::uno::Reference< css::sdbc::XConnection > SwXMailMerge::m_xConnection
private

Definition at line 91 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().

SfxObjectShellRef SwXMailMerge::m_xDocSh
private

Definition at line 84 of file unomailmerge.hxx.

Referenced by execute(), setPropertyValue(), SwXMailMerge(), and ~SwXMailMerge().

css::uno::Reference< css::frame::XModel > SwXMailMerge::m_xModel
private
css::uno::Reference< css::sdbc::XResultSet > SwXMailMerge::m_xResultSet
private

Definition at line 90 of file unomailmerge.hxx.

Referenced by execute(), getPropertyValue(), and setPropertyValue().


The documentation for this class was generated from the following files: