23#include <osl/mutex.hxx>
36#include <com/sun/star/sdb/CommandType.hpp>
37#include <com/sun/star/text/MailMergeType.hpp>
38#include <com/sun/star/text/MailMergeEvent.hpp>
39#include <com/sun/star/text/XMailMergeListener.hpp>
40#include <com/sun/star/beans/PropertyAttribute.hpp>
41#include <com/sun/star/sdbc/XResultSet.hpp>
42#include <com/sun/star/sdbc/XConnection.hpp>
43#include <com/sun/star/sdbc/XRowSet.hpp>
44#include <com/sun/star/frame/Desktop.hpp>
45#include <com/sun/star/util/XCloseable.hpp>
46#include <com/sun/star/util/CloseVetoException.hpp>
47#include <com/sun/star/sdbcx/XRowLocate.hpp>
48#include <com/sun/star/frame/XStorable.hpp>
49#include <com/sun/star/mail/XSmtpService.hpp>
56#include <unoprnms.hxx>
100 Reference< frame::XModel >
const &rxModel,
110 Reference< util::XCloseable > xClose( rxModel, UNO_QUERY );
117 xClose->close(
true );
119 catch (
const util::CloseVetoException&)
125 catch (
const uno::RuntimeException&)
135 Reference< frame::XModel > &rxModel,
137 const OUString &rURL,
141 Reference< frame::XModel > xTmpModel;
145 Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
146 xTmpModel.set( xDesktop->loadComponentFromURL( rURL,
"_blank", 0, aArgs ), UNO_QUERY );
155 if (
auto pTextDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xTmpModel); pTextDoc)
156 pTmpDocShell = pTextDoc->GetDocShell();
159 if (xTmpModel.is() && pTmpDocShell)
165 rxDocSh = pTmpDocShell;
180 class DelayedFileDeletion :
public ::cppu::WeakImplHelper<util::XCloseListener>
185 Timer m_aDeleteTimer;
186 OUString m_sTemporaryFile;
187 sal_Int32 m_nPendingDeleteAttempts;
189 DelayedFileDeletion(DelayedFileDeletion
const&) =
delete;
190 DelayedFileDeletion& operator=(DelayedFileDeletion
const&) =
delete;
193 DelayedFileDeletion(
const Reference< XModel >& _rxModel,
194 OUString _aTemporaryFile );
197 virtual ~DelayedFileDeletion( )
override;
200 virtual void SAL_CALL queryClosing(
const EventObject& _rSource,
sal_Bool _bGetsOwnership )
override;
201 virtual void SAL_CALL notifyClosing(
const EventObject& _rSource )
override;
204 virtual void SAL_CALL disposing(
const EventObject& Source )
override;
207 void implTakeOwnership( );
211 DelayedFileDeletion::DelayedFileDeletion(
const Reference< XModel >& _rxModel, OUString _aTemporaryFile )
214 ,m_aDeleteTimer(
"sw DelayedFileDeletion m_aDeleteTimer")
215 ,m_sTemporaryFile(
std::move( _aTemporaryFile ))
216 ,m_nPendingDeleteAttempts( 0 )
218 osl_atomic_increment( &m_refCount );
228 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
231 catch (
const Exception&)
233 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
235 osl_atomic_decrement( &m_refCount );
240 ::osl::ClearableMutexGuard aGuard( m_aMutex );
242 bool bSuccess =
false;
245 bool bDeliverOwnership = ( 0 == m_nPendingDeleteAttempts );
251 catch (
const util::CloseVetoException&)
254 if ( m_nPendingDeleteAttempts )
257 --m_nPendingDeleteAttempts;
258 m_aDeleteTimer.Start();
263 catch (
const Exception&)
265 TOOLS_WARN_EXCEPTION(
"sw",
"DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
278 void DelayedFileDeletion::implTakeOwnership( )
285 catch (
const Exception&)
287 OSL_FAIL(
"DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
290 m_aDeleteTimer.SetTimeout( 3000 );
291 m_aDeleteTimer.SetInvokeHandler(
LINK(
this, DelayedFileDeletion, OnTryDeleteFile ) );
292 m_nPendingDeleteAttempts = 3;
293 m_aDeleteTimer.Start( );
296 void SAL_CALL DelayedFileDeletion::queryClosing(
const EventObject& ,
sal_Bool _bGetsOwnership )
298 ::osl::MutexGuard aGuard( m_aMutex );
299 if ( _bGetsOwnership )
300 implTakeOwnership( );
304 throw util::CloseVetoException( );
307 void SAL_CALL DelayedFileDeletion::notifyClosing(
const EventObject& )
309 OSL_FAIL(
"DelayedFileDeletion::notifyClosing: how this?" );
315 void SAL_CALL DelayedFileDeletion::disposing(
const EventObject& )
317 OSL_FAIL(
"DelayedFileDeletion::disposing: how this?" );
323 DelayedFileDeletion::~DelayedFileDeletion( )
329 Reference< frame::XModel > &rxModel,
331 const OUString &rTmpFileURL )
334 if (!rTmpFileURL.isEmpty())
341 new DelayedFileDeletion( rxModel, rTmpFileURL );
354 new DelayedFileDeletion( rxModel, rTmpFileURL );
370 m_nOutputType(MailMergeType::
PRINTER),
371 m_bEscapeProcessing(true),
372 m_bSinglePrintJobs(false),
373 m_bFileNameFromColumn(false),
374 m_bSendAsHTML(false),
375 m_bSendAsAttachment(false),
376 m_bSaveAsSingleFile(false),
386 pView->AttrChangedNotify(
nullptr);
400 OSL_FAIL(
"ownership transferred to vetoing object!" );
430 const uno::Sequence< beans::NamedValue >& rArguments )
440 uno::Reference< sdbc::XResultSet > xCurResultSet =
m_xResultSet;
441 uno::Reference< sdbc::XConnection > xCurConnection =
m_xConnection;
442 uno::Reference< frame::XModel > xCurModel =
m_xModel;
457 for (
const beans::NamedValue& rArgument : rArguments)
459 const OUString &rName = rArgument.Name;
460 const Any &rValue = rArgument.Value;
464 bOK = rValue >>= aCurSelection;
466 bOK = rValue >>= xCurResultSet;
468 bOK = rValue >>= xCurConnection;
470 throw PropertyVetoException(
"Property is read-only: " + rName,
static_cast < cppu::OWeakObject *
> (
this ) );
472 bOK = rValue >>= aCurDataSourceName;
474 bOK = rValue >>= aCurDataCommand;
476 bOK = rValue >>= aCurFilter;
479 bOK = rValue >>= aCurDocumentURL;
480 if (!aCurDocumentURL.isEmpty()
486 bOK = rValue >>= aCurOutputURL;
487 if (!aCurOutputURL.isEmpty())
490 throw IllegalArgumentException(
"URL does not point to a directory: " + aCurOutputURL,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
492 throw IllegalArgumentException(
"URL is read-only: " + aCurOutputURL,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
496 bOK = rValue >>= aCurFileNamePrefix;
498 bOK = rValue >>= nCurDataCommandType;
500 bOK = rValue >>= nCurOutputType;
502 bOK = rValue >>= bCurEscapeProcessing;
504 bOK = rValue >>= bCurSinglePrintJobs;
506 bOK = rValue >>= bCurFileNameFromColumn;
540 throw UnknownPropertyException(
"Property is unknown: " + rName,
static_cast < cppu::OWeakObject *
> (
this ) );
543 throw IllegalArgumentException(
"Property type mismatch or property not set: " + rName,
static_cast < cppu::OWeakObject *
> (
this ), 0 );
548 if ( aCurSelection.hasElements() )
550 Sequence< Any > aTranslated( aCurSelection.getLength() );
553 Reference< sdbcx::XRowLocate > xRowLocate( xCurResultSet, UNO_QUERY );
554 if ( xRowLocate.is() )
556 Any* pTranslated = aTranslated.getArray();
560 bool bEverythingsFine =
true;
561 for (
const Any& rBookmark : std::as_const(aCurSelection) )
563 bEverythingsFine = xRowLocate->moveToBookmark( rBookmark );
564 if ( !bEverythingsFine )
566 *pTranslated <<= xCurResultSet->getRow();
569 if ( bEverythingsFine )
580 throw IllegalArgumentException(
581 "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'.",
587 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 );
668 OSL_ENSURE( pMgr,
"database manager missing" );
673 std::unique_ptr< SwMailMergeConfigItem > pMMConfigItem;
674 uno::Reference< mail::XMailService > xInService;
675 switch (nCurOutputType)
677 case MailMergeType::PRINTER:
689 case MailMergeType::SHELL:
694 case MailMergeType::FILE:
699 if (!aCurDocumentURL.isEmpty())
704 if (aCurFileNamePrefix.isEmpty())
705 aCurFileNamePrefix = aURLObj.
GetBase();
706 if (aCurOutputURL.isEmpty())
714 if (aCurOutputURL.isEmpty())
721 static constexpr OUStringLiteral aDelim(
u"/" );
722 if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
724 if (bCurFileNameFromColumn)
725 aMergeDesc.
sDBcolumn = aCurFileNamePrefix;
728 aPath += aCurFileNamePrefix;
738 case MailMergeType::MAIL:
768 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 SAL_WARN_UNUSED_RESULT 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 & GetWrtShell() 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)
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)
OUString CreateTempURL(const OUString *pParent, bool bDirectory)
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
constexpr OUStringLiteral UNO_NAME_COPIES_TO
constexpr OUStringLiteral UNO_NAME_RESULT_SET
constexpr OUStringLiteral UNO_NAME_OUT_SERVER_PASSWORD
constexpr OUStringLiteral UNO_NAME_SEND_AS_HTML
constexpr OUStringLiteral UNO_NAME_SUBJECT
constexpr OUStringLiteral UNO_NAME_SAVE_FILTER_OPTIONS
constexpr OUStringLiteral UNO_NAME_SELECTION
constexpr OUStringLiteral UNO_NAME_SAVE_FILTER_DATA
constexpr OUStringLiteral UNO_NAME_FILE_NAME_PREFIX
constexpr OUStringLiteral UNO_NAME_MODEL
constexpr OUStringLiteral UNO_NAME_DATA_SOURCE_NAME
constexpr OUStringLiteral UNO_NAME_DAD_COMMAND_TYPE
constexpr OUStringLiteral UNO_NAME_SAVE_AS_SINGLE_FILE
constexpr OUStringLiteral UNO_NAME_FILE_NAME_FROM_COLUMN
constexpr OUStringLiteral UNO_NAME_CONNECTION
constexpr OUStringLiteral UNO_NAME_OUTPUT_URL
constexpr OUStringLiteral UNO_NAME_DAD_COMMAND
constexpr OUStringLiteral UNO_NAME_FILTER
constexpr OUStringLiteral UNO_NAME_DOCUMENT_URL
constexpr OUStringLiteral UNO_NAME_ATTACHMENT_FILTER
constexpr OUStringLiteral UNO_NAME_ADDRESS_FROM_COLUMN
constexpr OUStringLiteral UNO_NAME_SINGLE_PRINT_JOBS
constexpr OUStringLiteral UNO_NAME_BLIND_COPIES_TO
constexpr OUStringLiteral UNO_NAME_SEND_AS_ATTACHMENT
constexpr OUStringLiteral UNO_NAME_PRINT_OPTIONS
constexpr OUStringLiteral UNO_NAME_IN_SERVER_PASSWORD
constexpr OUStringLiteral UNO_NAME_MAIL_BODY
constexpr OUStringLiteral UNO_NAME_OUTPUT_TYPE
constexpr OUStringLiteral UNO_NAME_SAVE_FILTER
constexpr OUStringLiteral UNO_NAME_ESCAPE_PROCESSING
constexpr OUStringLiteral UNO_NAME_ATTACHMENT_NAME