22#include <osl/mutex.hxx>
35#include <com/sun/star/sdb/CommandType.hpp>
36#include <com/sun/star/text/MailMergeType.hpp>
37#include <com/sun/star/text/MailMergeEvent.hpp>
38#include <com/sun/star/text/XMailMergeListener.hpp>
39#include <com/sun/star/beans/PropertyAttribute.hpp>
40#include <com/sun/star/sdbc/XResultSet.hpp>
41#include <com/sun/star/sdbc/XConnection.hpp>
42#include <com/sun/star/sdbc/XRowSet.hpp>
43#include <com/sun/star/frame/Desktop.hpp>
44#include <com/sun/star/util/XCloseable.hpp>
45#include <com/sun/star/util/CloseVetoException.hpp>
46#include <com/sun/star/sdbcx/XRowLocate.hpp>
47#include <com/sun/star/frame/XStorable.hpp>
48#include <com/sun/star/mail/XSmtpService.hpp>
55#include <unoprnms.hxx>
99 Reference< frame::XModel >
const &rxModel,
109 Reference< util::XCloseable > xClose( rxModel, UNO_QUERY );
116 xClose->close(
true );
118 catch (
const util::CloseVetoException&)
124 catch (
const uno::RuntimeException&)
134 Reference< frame::XModel > &rxModel,
136 const OUString &rURL,
140 Reference< frame::XModel > xTmpModel;
144 Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
145 xTmpModel.set( xDesktop->loadComponentFromURL( rURL,
"_blank", 0, aArgs ), UNO_QUERY );
154 if (
auto pTextDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xTmpModel); pTextDoc)
155 pTmpDocShell = pTextDoc->GetDocShell();
158 if (xTmpModel.is() && pTmpDocShell)
164 rxDocSh = pTmpDocShell;
179 class DelayedFileDeletion :
public ::cppu::WeakImplHelper<util::XCloseListener>
184 Timer m_aDeleteTimer;
185 OUString m_sTemporaryFile;
186 sal_Int32 m_nPendingDeleteAttempts;
188 DelayedFileDeletion(DelayedFileDeletion
const&) =
delete;
189 DelayedFileDeletion& operator=(DelayedFileDeletion
const&) =
delete;
192 DelayedFileDeletion(
const Reference< XModel >& _rxModel,
193 const OUString& _rTemporaryFile );
196 virtual ~DelayedFileDeletion( )
override;
199 virtual void SAL_CALL queryClosing(
const EventObject& _rSource,
sal_Bool _bGetsOwnership )
override;
200 virtual void SAL_CALL notifyClosing(
const EventObject& _rSource )
override;
203 virtual void SAL_CALL disposing(
const EventObject& Source )
override;
206 void implTakeOwnership( );
210 DelayedFileDeletion::DelayedFileDeletion(
const Reference< XModel >& _rxModel,
const OUString& _rTemporaryFile )
213 ,m_aDeleteTimer(
"sw DelayedFileDeletion m_aDeleteTimer")
214 ,m_sTemporaryFile( _rTemporaryFile )
215 ,m_nPendingDeleteAttempts( 0 )
217 osl_atomic_increment( &m_refCount );
227 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
230 catch (
const Exception&)
232 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
234 osl_atomic_decrement( &m_refCount );
239 ::osl::ClearableMutexGuard aGuard( m_aMutex );
241 bool bSuccess =
false;
244 bool bDeliverOwnership = ( 0 == m_nPendingDeleteAttempts );
250 catch (
const util::CloseVetoException&)
253 if ( m_nPendingDeleteAttempts )
256 --m_nPendingDeleteAttempts;
257 m_aDeleteTimer.Start();
262 catch (
const Exception&)
264 TOOLS_WARN_EXCEPTION(
"sw",
"DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
277 void DelayedFileDeletion::implTakeOwnership( )
284 catch (
const Exception&)
286 OSL_FAIL(
"DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
289 m_aDeleteTimer.SetTimeout( 3000 );
290 m_aDeleteTimer.SetInvokeHandler(
LINK(
this, DelayedFileDeletion, OnTryDeleteFile ) );
291 m_nPendingDeleteAttempts = 3;
292 m_aDeleteTimer.Start( );
295 void SAL_CALL DelayedFileDeletion::queryClosing(
const EventObject& ,
sal_Bool _bGetsOwnership )
297 ::osl::MutexGuard aGuard( m_aMutex );
298 if ( _bGetsOwnership )
299 implTakeOwnership( );
303 throw util::CloseVetoException( );
306 void SAL_CALL DelayedFileDeletion::notifyClosing(
const EventObject& )
308 OSL_FAIL(
"DelayedFileDeletion::notifyClosing: how this?" );
314 void SAL_CALL DelayedFileDeletion::disposing(
const EventObject& )
316 OSL_FAIL(
"DelayedFileDeletion::disposing: how this?" );
322 DelayedFileDeletion::~DelayedFileDeletion( )
328 Reference< frame::XModel > &rxModel,
330 const OUString &rTmpFileURL )
333 if (!rTmpFileURL.isEmpty())
340 new DelayedFileDeletion( rxModel, rTmpFileURL );
353 new DelayedFileDeletion( rxModel, rTmpFileURL );
369 m_nOutputType(MailMergeType::
PRINTER),
370 m_bEscapeProcessing(true),
371 m_bSinglePrintJobs(false),
372 m_bFileNameFromColumn(false),
373 m_bSendAsHTML(false),
374 m_bSendAsAttachment(false),
375 m_bSaveAsSingleFile(false),
385 pView->AttrChangedNotify(
nullptr);
399 OSL_FAIL(
"ownership transferred to vetoing object!" );
429 const uno::Sequence< beans::NamedValue >& rArguments )
439 uno::Reference< sdbc::XResultSet > xCurResultSet =
m_xResultSet;
440 uno::Reference< sdbc::XConnection > xCurConnection =
m_xConnection;
441 uno::Reference< frame::XModel > xCurModel =
m_xModel;
456 for (
const beans::NamedValue& rArgument : rArguments)
458 const OUString &rName = rArgument.Name;
459 const Any &rValue = rArgument.Value;
463 bOK = rValue >>= aCurSelection;
465 bOK = rValue >>= xCurResultSet;
467 bOK = rValue >>= xCurConnection;
469 throw PropertyVetoException(
"Property is read-only: " + rName,
static_cast < cppu::OWeakObject *
> (
this ) );
471 bOK = rValue >>= aCurDataSourceName;
473 bOK = rValue >>= aCurDataCommand;
475 bOK = rValue >>= aCurFilter;
478 bOK = rValue >>= aCurDocumentURL;
479 if (!aCurDocumentURL.isEmpty()
485 bOK = rValue >>= aCurOutputURL;
486 if (!aCurOutputURL.isEmpty())
489 throw IllegalArgumentException(
"URL does not point to a directory: " + aCurOutputURL,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
491 throw IllegalArgumentException(
"URL is read-only: " + aCurOutputURL,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
495 bOK = rValue >>= aCurFileNamePrefix;
497 bOK = rValue >>= nCurDataCommandType;
499 bOK = rValue >>= nCurOutputType;
501 bOK = rValue >>= bCurEscapeProcessing;
503 bOK = rValue >>= bCurSinglePrintJobs;
505 bOK = rValue >>= bCurFileNameFromColumn;
539 throw UnknownPropertyException(
"Property is unknown: " + rName,
static_cast < cppu::OWeakObject *
> (
this ) );
542 throw IllegalArgumentException(
"Property type mismatch or property not set: " + rName,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
547 if ( aCurSelection.hasElements() )
549 Sequence< Any > aTranslated( aCurSelection.getLength() );
552 Reference< sdbcx::XRowLocate > xRowLocate( xCurResultSet, UNO_QUERY );
553 if ( xRowLocate.is() )
555 Any* pTranslated = aTranslated.getArray();
559 bool bEverythingsFine =
true;
560 for (
const Any& rBookmark : std::as_const(aCurSelection) )
562 bEverythingsFine = xRowLocate->moveToBookmark( rBookmark );
563 if ( !bEverythingsFine )
565 *pTranslated <<= xCurResultSet->getRow();
568 if ( bEverythingsFine )
579 throw IllegalArgumentException(
580 "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'.",
586 aCurSelection = aTranslated;
599 if (!aCurDocumentURL.isEmpty())
600 pView->AttrChangedNotify(
nullptr);
603 if (!xCurResultSet.is())
605 if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() )
607 OSL_FAIL(
"PropertyValues missing or unset");
608 throw IllegalArgumentException(
"Either the ResultSet or DataSourceName and DataCommand must be set.",
static_cast < cppu::OWeakObject *
> (
this ), 0 );
613 Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
616 Reference< XInterface > xInstance = xMgr->createInstance(
"com.sun.star.sdb.RowSet" );
618 Reference< XPropertySet > xRowSetPropSet( xInstance, UNO_QUERY );
619 OSL_ENSURE( xRowSetPropSet.is(),
"failed to get XPropertySet interface from RowSet" );
620 if (xRowSetPropSet.is())
622 if (xCurConnection.is())
623 xRowSetPropSet->setPropertyValue(
"ActiveConnection",
Any( xCurConnection ) );
624 xRowSetPropSet->setPropertyValue(
"DataSourceName",
Any( aCurDataSourceName ) );
625 xRowSetPropSet->setPropertyValue(
"Command",
Any( aCurDataCommand ) );
626 xRowSetPropSet->setPropertyValue(
"CommandType",
Any( nCurDataCommandType ) );
627 xRowSetPropSet->setPropertyValue(
"EscapeProcessing",
Any( bCurEscapeProcessing ) );
628 xRowSetPropSet->setPropertyValue(
"ApplyFilter",
Any(
true ) );
629 xRowSetPropSet->setPropertyValue(
"Filter",
Any( aCurFilter ) );
631 Reference< sdbc::XRowSet > xRowSet( xInstance, UNO_QUERY );
634 if( !xCurConnection.is() )
635 xCurConnection.set( xRowSetPropSet->getPropertyValue(
"ActiveConnection" ), UNO_QUERY );
636 xCurResultSet = xRowSet;
637 OSL_ENSURE( xCurResultSet.is(),
"failed to build ResultSet" );
654 switch (nCurOutputType)
661 throw IllegalArgumentException(
"Invalid value of property: OutputType",
static_cast < cppu::OWeakObject *
> (
this ), 0 );
667 OSL_ENSURE( pMgr,
"database manager missing" );
672 std::unique_ptr< SwMailMergeConfigItem > pMMConfigItem;
673 uno::Reference< mail::XMailService > xInService;
674 switch (nCurOutputType)
676 case MailMergeType::PRINTER:
688 case MailMergeType::SHELL:
693 case MailMergeType::FILE:
698 if (!aCurDocumentURL.isEmpty())
703 if (aCurFileNamePrefix.isEmpty())
704 aCurFileNamePrefix = aURLObj.
GetBase();
705 if (aCurOutputURL.isEmpty())
713 if (aCurOutputURL.isEmpty())
720 static const OUStringLiteral aDelim(
u"/" );
721 if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
723 if (bCurFileNameFromColumn)
724 aMergeDesc.
sDBcolumn = aCurFileNamePrefix;
727 aPath += aCurFileNamePrefix;
737 case MailMergeType::MAIL:
767 SwDocShell::Factory().GetFilterContainer() );
772 Reference< XStorable > xStorable( xCurModel, UNO_QUERY );
773 bool bStoredAsTemporary =
false;
774 if ( xStorable.is() )
778 xStorable->storeAsURL(
m_aTmpFileName, Sequence< PropertyValue >() );
779 bStoredAsTemporary =
true;
785 if ( !bStoredAsTemporary )
790 OSL_ENSURE( !pOldSrc || pOldSrc ==
this,
"Ooops... different event source already set." );
794 bool bSucc = pMgr->
Merge( aMergeDesc );
799 if ( xCurModel.get() !=
m_xModel.get() )
807 throw Exception(
"Mail merge failed. Sorry, no further information available.",
static_cast < cppu::OWeakObject *
> (
this ) );
810 if(xInService.is() && xInService->isConnected())
811 xInService->disconnect();
837 static_cast< XMailMergeListener*
>( aIt.
next() )->notifyMailMergeEvent( rEvt );
847 pContainer->
notifyEach( &XPropertyChangeListener::propertyChange, rEvt );
859 const OUString& rPropertyName,
const uno::Any& rValue )
865 throw UnknownPropertyException(rPropertyName);
866 else if (pCur->
nFlags & PropertyAttribute::READONLY)
867 throw PropertyVetoException();
870 void *
pData =
nullptr;
905 OSL_FAIL(
"unknown WID");
909 bool bChanged =
false;
930 bOK = rValue >>= aText;
939 bOK = rValue >>= aText;
940 if (!aText.isEmpty())
943 throw IllegalArgumentException(
"URL does not point to a directory: " + aText,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
945 throw IllegalArgumentException(
"URL is read-only: " + aText,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
994 OSL_FAIL(
"invalid pointer" );
996 OSL_ENSURE( bOK,
"set value failed" );
1000 throw IllegalArgumentException(
"Property type mismatch or property not set: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
1004 PropertyChangeEvent aChgEvt(
static_cast<XPropertySet *
>(
this), rPropertyName,
1005 false, pCur->
nWID, aOld, rValue );
1012 const OUString& rPropertyName )
1020 throw UnknownPropertyException(rPropertyName);
1056 OSL_FAIL(
"unknown WID");
1063 const OUString& rPropertyName,
1064 const uno::Reference< beans::XPropertyChangeListener >& rListener )
1071 throw UnknownPropertyException(rPropertyName);
1077 const OUString& rPropertyName,
1078 const uno::Reference< beans::XPropertyChangeListener >& rListener )
1085 throw UnknownPropertyException(rPropertyName);
1092 const uno::Reference< beans::XVetoableChangeListener >& )
1095 OSL_FAIL(
"not implemented");
1100 const uno::Reference< beans::XVetoableChangeListener >& )
1103 OSL_FAIL(
"not implemented");
1114 EventObject aEvtObj(
static_cast<XPropertySet *
>(
this) );
1122 const Reference< XEventListener >& rxListener )
1130 const Reference< XEventListener >& rxListener )
1138 const uno::Reference< XMailMergeListener >& rxListener )
1146 const uno::Reference< XMailMergeListener >& rxListener )
1155 return "SwXMailMerge";
1165 return {
"com.sun.star.text.MailMerge",
"com.sun.star.sdb.DataAccessDescriptor" };
SfxApplication * SfxGetpApp()
Provides access to the formatting devices of a document.
virtual void setPrintData(const SwPrintData &rPrtData)=0
Sets the PrintData.
virtual const SwPrintData & getPrintData() const =0
Returns the PrintData.
void SetSmartProtocol(INetProtocol eTheSmartScheme)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
bool SetSmartURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
MailMergeExecuteFinalizer(MailMergeExecuteFinalizer const &)=delete
SwXMailMerge * m_pMailMerge
MailMergeExecuteFinalizer(SwXMailMerge *mailmerge)
~MailMergeExecuteFinalizer()
MailMergeExecuteFinalizer & operator=(MailMergeExecuteFinalizer const &)=delete
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
SfxViewShell * GetViewShell() const
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
bool Merge(const SwMergeDescriptor &rMergeDesc)
Merging of data records into fields.
void SetMergeSilent(bool bVal)
const SwXMailMerge * GetMailMergeEvtSrc() const
MailMergeEvent source.
void SetMailMergeEvtSrc(const SwXMailMerge *pSrc)
static OUString GetEventName(sal_Int32 nId)
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
SwDBManager * GetDBManager() const
For evaluation of DB fields (new DB-manager).
static SW_DLLPUBLIC std::shared_ptr< const SfxFilter > GetFilterOfFormat(std::u16string_view rFormat, const SfxFilterContainer *pCnt=nullptr)
find for an internal format name the corresponding filter entry
void SetPrintSingleJobs(bool b)
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
SwWrtShell * GetWrtShellPtr() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
Gives UNO access to the global mail merge functionality, via the com.sun.star.text....
css::uno::Reference< css::frame::XModel > m_xModel
void LaunchMailMergeEvent(const css::text::MailMergeEvent &rData) const
SfxObjectShellRef m_xDocSh
OUString m_aFileNamePrefix
OUString m_sAttachmentName
OUString m_sAttachmentFilter
virtual void SAL_CALL addMailMergeEventListener(const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
sal_Int32 m_nDataCommandType
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
OUString m_aDataSourceName
virtual void SAL_CALL removeMailMergeEventListener(const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
css::uno::Sequence< OUString > m_aBlindCopiesTo
virtual void SAL_CALL dispose() override
css::uno::Sequence< css::beans::PropertyValue > m_aPrintSettings
css::uno::Sequence< css::uno::Any > m_aSelection
virtual ~SwXMailMerge() override
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet
void launchEvent(const css::beans::PropertyChangeEvent &rEvt) const
css::uno::Reference< css::sdbc::XConnection > m_xConnection
bool m_bFileNameFromColumn
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
css::uno::Sequence< css::beans::PropertyValue > m_aSaveFilterData
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
OUString m_sOutServerPassword
comphelper::OInterfaceContainerHelper2 m_aMergeListeners
virtual OUString SAL_CALL getImplementationName() override
OPropertyListenerContainerHelper m_aPropListeners
css::uno::Sequence< OUString > m_aCopiesTo
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL cancel() override
OUString m_sSaveFilterOptions
comphelper::OInterfaceContainerHelper3< css::lang::XEventListener > m_aEvtListeners
const SfxItemPropertySet * m_pPropSet
OUString m_sAddressFromColumn
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence< css::beans::NamedValue > &Arguments) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
OUString m_sInServerPassword
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
css::uno::XInterface * next()
bool hasMoreElements() const
sal_Int32 addInterface(const key &rKey, const css::uno::Reference< listener > &rListener)
sal_Int32 removeInterface(const key &rKey, const css::uno::Reference< listener > &rListener)
void disposeAndClear(const css::lang::EventObject &rEvt)
OInterfaceContainerHelper3< listener > * getContainer(const key &rKey) const
void setDataSource(const OUString &_sDataSourceNameOrLocation)
void reset(const css::uno::Reference< INTERFACE > &_rxComponent, AssignmentMode _eMode=TakeOwnership)
OUString const & GetURL() const
IMPL_LINK_NOARG(SwContentControlButton, PopupModeEndHdl, weld::Popover &, void)
@ DBMGR_MERGE_EMAIL
Send mail merge as email.
@ DBMGR_MERGE_SHELL
Create merge doc and keep the doc shell.
@ DBMGR_MERGE_PRINTER
Print mail merge.
@ DBMGR_MERGE_FILE
Save mail merge as files.
Reference< XOfficeDatabaseDocument > m_xDocument
#define TOOLS_WARN_EXCEPTION(area, stream)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
css::uno::Sequence< OUString > aBlindCopiesTo
css::uno::Sequence< OUString > aCopiesTo
css::uno::Reference< css::mail::XSmtpService > xSmtpServer
OUString sPrefix
Basename incl.
OUString sDBcolumn
DB column to fetch EMail of Filename from.
css::uno::Sequence< css::beans::PropertyValue > aPrintOptions
css::uno::Sequence< css::beans::PropertyValue > aSaveToFilterData
OUString sSaveToFilterOptions
constexpr OUStringLiteral FILTER_XML
XML filter.
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
bool UCB_DeleteFile(const OUString &rURL)
bool UCB_IsDirectory(const OUString &rURL)
bool UCB_IsReadOnlyFileName(const OUString &rURL)
uno::Reference< mail::XSmtpService > ConnectToSmtpServer(SwMailMergeConfigItem const &rConfigItem, uno::Reference< mail::XMailService > &rxInMailService, const OUString &rInMailServerPassword, const OUString &rOutMailServerPassword, weld::Window *pDialogParentWindow)
class SAL_NO_VTABLE XPropertySet
OString stripStart(const OString &rIn, char c)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr auto SFX_INTERFACE_NONE
SwMailMergeConfigItem * pMailMergeConfigItem
bool bCreateSingleFile
Create a single or multiple results.
#define STR_SW_EVENT_MAIL_MERGE
#define STR_SW_EVENT_MAIL_MERGE_END
static osl::Mutex & GetMailMergeMutex()
static bool DeleteTmpFile_Impl(Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const OUString &rTmpFileURL)
::utl::SharedUNOComponent< XInterface > SharedComponent
static bool LoadFromURL_impl(Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const OUString &rURL, bool bClose)
static CloseResult CloseModelAndDocSh(Reference< frame::XModel > const &rxModel, SfxObjectShellRef &rxDocSh)
SwUnoPropertyMapProvider aSwMapProvider
#define WID_FILE_NAME_FROM_COLUMN
#define WID_SEND_AS_ATTACHMENT
#define PROPERTY_MAP_MAILMERGE
#define WID_SAVE_AS_SINGLE_FILE
#define WID_IN_SERVER_PASSWORD
#define WID_DATA_COMMAND_TYPE
#define WID_SINGLE_PRINT_JOBS
#define WID_ADDRESS_FROM_COLUMN
#define WID_SAVE_FILTER_DATA
#define WID_ATTACHMENT_NAME
#define WID_FILE_NAME_PREFIX
#define WID_SAVE_FILTER_OPTIONS
#define WID_PRINT_OPTIONS
#define WID_ESCAPE_PROCESSING
#define WID_OUT_SERVER_PASSWORD
#define WID_ATTACHMENT_FILTER
#define WID_DATA_SOURCE_NAME
#define WID_BLIND_COPIES_TO
#define UNO_NAME_DAD_COMMAND
#define UNO_NAME_DATA_SOURCE_NAME
#define UNO_NAME_FILE_NAME_PREFIX
#define UNO_NAME_SAVE_FILTER_OPTIONS
#define UNO_NAME_OUT_SERVER_PASSWORD
#define UNO_NAME_CONNECTION
#define UNO_NAME_MAIL_BODY
#define UNO_NAME_SELECTION
#define UNO_NAME_SEND_AS_HTML
#define UNO_NAME_IN_SERVER_PASSWORD
#define UNO_NAME_RESULT_SET
#define UNO_NAME_SAVE_AS_SINGLE_FILE
#define UNO_NAME_COPIES_TO
#define UNO_NAME_DAD_COMMAND_TYPE
#define UNO_NAME_BLIND_COPIES_TO
#define UNO_NAME_DOCUMENT_URL
#define UNO_NAME_ADDRESS_FROM_COLUMN
#define UNO_NAME_OUTPUT_URL
#define UNO_NAME_ATTACHMENT_NAME
#define UNO_NAME_PRINT_OPTIONS
#define UNO_NAME_OUTPUT_TYPE
#define UNO_NAME_SAVE_FILTER_DATA
#define UNO_NAME_SAVE_FILTER
#define UNO_NAME_ATTACHMENT_FILTER
#define UNO_NAME_SEND_AS_ATTACHMENT
#define UNO_NAME_FILE_NAME_FROM_COLUMN
#define UNO_NAME_SINGLE_PRINT_JOBS
#define UNO_NAME_ESCAPE_PROCESSING