21 #include <osl/mutex.hxx>
33 #include <com/sun/star/sdb/CommandType.hpp>
34 #include <com/sun/star/text/MailMergeType.hpp>
35 #include <com/sun/star/text/MailMergeEvent.hpp>
36 #include <com/sun/star/text/XMailMergeListener.hpp>
37 #include <com/sun/star/beans/PropertyAttribute.hpp>
38 #include <com/sun/star/sdbc/XResultSet.hpp>
39 #include <com/sun/star/sdbc/XConnection.hpp>
40 #include <com/sun/star/sdbc/XRowSet.hpp>
41 #include <com/sun/star/frame/Desktop.hpp>
42 #include <com/sun/star/util/XCloseable.hpp>
43 #include <com/sun/star/util/CloseVetoException.hpp>
44 #include <com/sun/star/sdbcx/XRowLocate.hpp>
45 #include <com/sun/star/frame/XStorable.hpp>
46 #include <com/sun/star/mail/XSmtpService.hpp>
53 #include <unoprnms.hxx>
107 Reference< util::XCloseable > xClose( rxModel, UNO_QUERY );
114 xClose->close(
true );
116 catch (
const util::CloseVetoException&)
122 catch (
const uno::RuntimeException&)
134 const OUString &rURL,
139 Sequence < PropertyValue > aArgs( 1 );
140 aArgs[0].Name =
"Hidden";
141 aArgs[0].Value <<=
true;
145 xTmpModel.set( xDesktop->loadComponentFromURL( rURL,
"_blank", 0, aArgs ), UNO_QUERY );
154 if (
auto pTextDoc = comphelper::getUnoTunnelImplementation<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_sTemporaryFile( _rTemporaryFile )
214 ,m_nPendingDeleteAttempts( 0 )
216 osl_atomic_increment( &m_refCount );
226 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
229 catch (
const Exception&)
231 OSL_FAIL(
"DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
233 osl_atomic_decrement( &m_refCount );
238 ::osl::ClearableMutexGuard aGuard( m_aMutex );
240 bool bSuccess =
false;
243 bool bDeliverOwnership = ( 0 == m_nPendingDeleteAttempts );
249 catch (
const util::CloseVetoException&)
252 if ( m_nPendingDeleteAttempts )
255 --m_nPendingDeleteAttempts;
256 m_aDeleteTimer.Start();
261 catch (
const Exception&)
263 TOOLS_WARN_EXCEPTION(
"sw",
"DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
276 void DelayedFileDeletion::implTakeOwnership( )
283 catch (
const Exception&)
285 OSL_FAIL(
"DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
288 m_aDeleteTimer.SetTimeout( 3000 );
289 m_aDeleteTimer.SetInvokeHandler(
LINK(
this, DelayedFileDeletion, OnTryDeleteFile ) );
290 m_nPendingDeleteAttempts = 3;
291 m_aDeleteTimer.Start( );
294 void SAL_CALL DelayedFileDeletion::queryClosing(
const EventObject& ,
sal_Bool _bGetsOwnership )
296 ::osl::MutexGuard aGuard( m_aMutex );
297 if ( _bGetsOwnership )
298 implTakeOwnership( );
302 throw util::CloseVetoException( );
305 void SAL_CALL DelayedFileDeletion::notifyClosing(
const EventObject& )
307 OSL_FAIL(
"DelayedFileDeletion::notifyClosing: how this?" );
313 void SAL_CALL DelayedFileDeletion::disposing(
const EventObject& )
315 OSL_FAIL(
"DelayedFileDeletion::disposing: how this?" );
321 DelayedFileDeletion::~DelayedFileDeletion( )
329 const OUString &rTmpFileURL )
332 if (!rTmpFileURL.isEmpty())
339 new DelayedFileDeletion( rxModel, rTmpFileURL );
352 new DelayedFileDeletion( rxModel, rTmpFileURL );
368 m_nOutputType(MailMergeType::
PRINTER),
369 m_bEscapeProcessing(true),
370 m_bSinglePrintJobs(false),
371 m_bFileNameFromColumn(false),
372 m_bSendAsHTML(false),
373 m_bSendAsAttachment(false),
374 m_bSaveAsSingleFile(false),
384 pView->AttrChangedNotify(
nullptr);
398 OSL_FAIL(
"ownership transferred to vetoing object!" );
428 const uno::Sequence< beans::NamedValue >& rArguments )
438 uno::Reference< sdbc::XResultSet > xCurResultSet =
m_xResultSet;
439 uno::Reference< sdbc::XConnection > xCurConnection =
m_xConnection;
440 uno::Reference< frame::XModel > xCurModel =
m_xModel;
455 for (
const beans::NamedValue& rArgument : rArguments)
457 const OUString &rName = rArgument.Name;
462 bOK = rValue >>= aCurSelection;
464 bOK = rValue >>= xCurResultSet;
466 bOK = rValue >>= xCurConnection;
468 throw PropertyVetoException(
"Property is read-only: " + rName, static_cast < cppu::OWeakObject * > (
this ) );
470 bOK = rValue >>= aCurDataSourceName;
472 bOK = rValue >>= aCurDataCommand;
474 bOK = rValue >>= aCurFilter;
477 bOK = rValue >>= aCurDocumentURL;
478 if (!aCurDocumentURL.isEmpty()
480 throw RuntimeException(
"Failed to create document from URL: " + aCurDocumentURL, static_cast < cppu::OWeakObject * > (
this ) );
484 bOK = rValue >>= aCurOutputURL;
485 if (!aCurOutputURL.isEmpty())
488 throw IllegalArgumentException(
"URL does not point to a directory: " + aCurOutputURL, static_cast < cppu::OWeakObject * > (
this ), 0 );
490 throw IllegalArgumentException(
"URL is read-only: " + aCurOutputURL, static_cast < cppu::OWeakObject * > (
this ), 0 );
494 bOK = rValue >>= aCurFileNamePrefix;
496 bOK = rValue >>= nCurDataCommandType;
498 bOK = rValue >>= nCurOutputType;
500 bOK = rValue >>= bCurEscapeProcessing;
502 bOK = rValue >>= bCurSinglePrintJobs;
504 bOK = rValue >>= bCurFileNameFromColumn;
538 throw UnknownPropertyException(
"Property is unknown: " + rName, static_cast < cppu::OWeakObject * > (
this ) );
541 throw IllegalArgumentException(
"Property type mismatch or property not set: " + rName, static_cast < cppu::OWeakObject * > (
this ), 0 );
546 if ( aCurSelection.hasElements() )
548 Sequence< Any > aTranslated( aCurSelection.getLength() );
551 Reference< sdbcx::XRowLocate > xRowLocate( xCurResultSet, UNO_QUERY );
552 if ( xRowLocate.is() )
554 Any* pTranslated = aTranslated.getArray();
558 bool bEverythingsFine =
true;
559 for (
const Any& rBookmark : std::as_const(aCurSelection) )
561 bEverythingsFine = xRowLocate->moveToBookmark( rBookmark );
562 if ( !bEverythingsFine )
564 *pTranslated <<= xCurResultSet->getRow();
567 if ( bEverythingsFine )
578 throw IllegalArgumentException(
579 "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'.",
580 static_cast < cppu::OWeakObject * > (
this ),
585 aCurSelection = aTranslated;
598 if (!aCurDocumentURL.isEmpty())
599 pView->AttrChangedNotify(
nullptr);
602 if (!xCurResultSet.is())
604 if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() )
606 OSL_FAIL(
"PropertyValues missing or unset");
607 throw IllegalArgumentException(
"Either the ResultSet or DataSourceName and DataCommand must be set.", static_cast < cppu::OWeakObject * > (
this ), 0 );
615 Reference< XInterface > xInstance = xMgr->createInstance(
"com.sun.star.sdb.RowSet" );
618 OSL_ENSURE( xRowSetPropSet.is(),
"failed to get XPropertySet interface from RowSet" );
619 if (xRowSetPropSet.is())
621 if (xCurConnection.is())
622 xRowSetPropSet->setPropertyValue(
"ActiveConnection",
makeAny( xCurConnection ) );
623 xRowSetPropSet->setPropertyValue(
"DataSourceName",
makeAny( aCurDataSourceName ) );
624 xRowSetPropSet->setPropertyValue(
"Command",
makeAny( aCurDataCommand ) );
625 xRowSetPropSet->setPropertyValue(
"CommandType",
makeAny( nCurDataCommandType ) );
626 xRowSetPropSet->setPropertyValue(
"EscapeProcessing",
makeAny( bCurEscapeProcessing ) );
627 xRowSetPropSet->setPropertyValue(
"ApplyFilter",
makeAny(
true ) );
628 xRowSetPropSet->setPropertyValue(
"Filter",
makeAny( aCurFilter ) );
630 Reference< sdbc::XRowSet > xRowSet( xInstance, UNO_QUERY );
633 if( !xCurConnection.is() )
634 xCurConnection.set( xRowSetPropSet->getPropertyValue(
"ActiveConnection" ), UNO_QUERY );
635 xCurResultSet = xRowSet;
636 OSL_ENSURE( xCurResultSet.is(),
"failed to build ResultSet" );
653 switch (nCurOutputType)
660 throw IllegalArgumentException(
"Invalid value of property: OutputType", static_cast < cppu::OWeakObject * > (
this ), 0 );
666 OSL_ENSURE( pMgr,
"database manager missing" );
671 std::unique_ptr< SwMailMergeConfigItem > pMMConfigItem;
672 uno::Reference< mail::XMailService > xInService;
673 switch (nCurOutputType)
675 case MailMergeType::PRINTER:
687 case MailMergeType::SHELL:
692 case MailMergeType::FILE:
697 if (!aCurDocumentURL.isEmpty())
702 if (aCurFileNamePrefix.isEmpty())
703 aCurFileNamePrefix = aURLObj.
GetBase();
704 if (aCurOutputURL.isEmpty())
712 if (aCurOutputURL.isEmpty())
713 throw RuntimeException(
"OutputURL is not set and can not be obtained.", static_cast < cppu::OWeakObject * > (
this ) );
719 const OUString aDelim(
"/" );
720 if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
722 if (bCurFileNameFromColumn)
723 aMergeDesc.
sDBcolumn = aCurFileNamePrefix;
726 aPath += aCurFileNamePrefix;
736 case MailMergeType::MAIL:
740 throw RuntimeException(
"Mail address column not set.", static_cast < cppu::OWeakObject * > (
this ) );
758 throw RuntimeException(
"Failed to connect to mail server.", static_cast < cppu::OWeakObject * > (
this ) );
766 SwDocShell::Factory().GetFilterContainer() );
771 Reference< XStorable > xStorable( xCurModel, UNO_QUERY );
772 bool bStoredAsTemporary =
false;
773 if ( xStorable.is() )
777 xStorable->storeAsURL(
m_aTmpFileName, Sequence< PropertyValue >() );
778 bStoredAsTemporary =
true;
784 if ( !bStoredAsTemporary )
785 throw RuntimeException(
"Failed to save temporary file.", static_cast < cppu::OWeakObject * > (
this ) );
789 OSL_ENSURE( !pOldSrc || pOldSrc ==
this,
"Ooops... different event source already set." );
793 bool bSucc = pMgr->
Merge( aMergeDesc );
798 if ( xCurModel.get() !=
m_xModel.get() )
806 throw Exception(
"Mail merge failed. Sorry, no further information available.", static_cast < cppu::OWeakObject * > (
this ) );
809 if(xInService.is() && xInService->isConnected())
810 xInService->disconnect();
836 Reference< XMailMergeListener > xRef( aIt.
next(), UNO_QUERY );
838 xRef->notifyMailMergeEvent( rEvt );
851 Reference< XPropertyChangeListener > xRef( aIt.
next(), UNO_QUERY );
853 xRef->propertyChange( rEvt );
866 const OUString& rPropertyName,
const uno::Any& rValue )
872 throw UnknownPropertyException(rPropertyName);
873 else if (pCur->
nFlags & PropertyAttribute::READONLY)
874 throw PropertyVetoException();
877 void *
pData =
nullptr;
912 OSL_FAIL(
"unknown WID");
916 bool bChanged =
false;
937 bOK = rValue >>= aText;
940 throw RuntimeException(
"Failed to create document from URL: " + aText, static_cast < cppu::OWeakObject * > (
this ) );
946 bOK = rValue >>= aText;
947 if (!aText.isEmpty())
950 throw IllegalArgumentException(
"URL does not point to a directory: " + aText, static_cast < cppu::OWeakObject * > (
this ), 0 );
952 throw IllegalArgumentException(
"URL is read-only: " + aText, static_cast < cppu::OWeakObject * > (
this ), 0 );
1001 OSL_FAIL(
"invalid pointer" );
1003 OSL_ENSURE( bOK,
"set value failed" );
1007 throw IllegalArgumentException(
"Property type mismatch or property not set: " + rPropertyName, static_cast < cppu::OWeakObject * > (
this ), 0 );
1011 PropertyChangeEvent aChgEvt( static_cast<XPropertySet *>(
this), rPropertyName,
1012 false, pCur->
nWID, aOld, rValue );
1019 const OUString& rPropertyName )
1027 throw UnknownPropertyException(rPropertyName);
1063 OSL_FAIL(
"unknown WID");
1070 const OUString& rPropertyName,
1071 const uno::Reference< beans::XPropertyChangeListener >& rListener )
1078 throw UnknownPropertyException(rPropertyName);
1084 const OUString& rPropertyName,
1085 const uno::Reference< beans::XPropertyChangeListener >& rListener )
1092 throw UnknownPropertyException(rPropertyName);
1099 const uno::Reference< beans::XVetoableChangeListener >& )
1102 OSL_FAIL(
"not implemented");
1107 const uno::Reference< beans::XVetoableChangeListener >& )
1110 OSL_FAIL(
"not implemented");
1121 EventObject aEvtObj( static_cast<XPropertySet *>(
this) );
1129 const Reference< XEventListener >& rxListener )
1137 const Reference< XEventListener >& rxListener )
1145 const uno::Reference< XMailMergeListener >& rxListener )
1153 const uno::Reference< XMailMergeListener >& rxListener )
1162 return "SwXMailMerge";
1172 return {
"com.sun.star.text.MailMerge",
"com.sun.star.sdb.DataAccessDescriptor" };
#define LINK(Instance, Class, Member)
virtual void SAL_CALL removeMailMergeEventListener(const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
bool bCreateSingleFile
Create a single or multiple results.
const SwXMailMerge * GetMailMergeEvtSrc() const
MailMergeEvent source.
exports com.sun.star. sdb
uno::Reference< mail::XSmtpService > ConnectToSmtpServer(SwMailMergeConfigItem const &rConfigItem, uno::Reference< mail::XMailService > &rxInMailService, const OUString &rInMailServerPassword, const OUString &rOutMailServerPassword, weld::Window *pDialogParentWindow)
void SetMailMergeEvtSrc(const SwXMailMerge *pSrc)
#define WID_DATA_COMMAND_TYPE
OUString m_sAttachmentName
#define UNO_NAME_OUTPUT_TYPE
SwMailMergeConfigItem * pMailMergeConfigItem
OUString m_sOutServerPassword
void setDataSource(const OUString &_sDataSourceNameOrLocation)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
std::unique_ptr< ContentProperties > pData
static CloseResult CloseModelAndDocSh(Reference< frame::XModel > const &rxModel, SfxObjectShellRef &rxDocSh)
Reference< XOfficeDatabaseDocument > m_xDocument
const SfxItemPropertySet * m_pPropSet
#define DECL_LINK(Member, ArgType, RetType)
bool hasMoreElements() const
#define WID_OUT_SERVER_PASSWORD
#define UNO_NAME_CONNECTION
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
bool UCB_IsReadOnlyFileName(const OUString &rURL)
#define WID_ATTACHMENT_NAME
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static bool LoadFromURL_impl(Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const OUString &rURL, bool bClose)
sal_Int32 addInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
css::uno::Reference< css::mail::XSmtpService > xSmtpServer
OUString m_sAddressFromColumn
#define UNO_NAME_DATA_SOURCE_NAME
#define WID_SINGLE_PRINT_JOBS
#define WID_PRINT_OPTIONS
void disposeAndClear(const css::lang::EventObject &rEvt)
#define UNO_NAME_BLIND_COPIES_TO
virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence< css::beans::NamedValue > &Arguments) override
#define WID_FILE_NAME_FROM_COLUMN
css::uno::Reference< css::frame::XModel > m_xModel
css::uno::Reference< css::frame::XModel > GetModel() const
bool UCB_DeleteFile(const OUString &rURL)
sal_Int32 removeInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
#define UNO_NAME_ESCAPE_PROCESSING
SwXMailMerge * m_pMailMerge
css::uno::XInterface *SAL_CALL next()
css::uno::Sequence< css::beans::PropertyValue > aSaveToFilterData
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
#define UNO_NAME_DOCUMENT_URL
virtual ~SwXMailMerge() override
#define UNO_NAME_SAVE_FILTER_DATA
SfxApplication * SfxGetpApp()
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
Used by the UI to modify the document model.
OUString m_sAttachmentFilter
css::uno::Any const & rValue
constexpr auto SFX_INTERFACE_NONE
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
#define UNO_NAME_RESULT_SET
#define UNO_NAME_MAIL_BODY
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define UNO_NAME_SAVE_FILTER_OPTIONS
#define UNO_NAME_COPIES_TO
Send mail merge as email.
#define UNO_NAME_ATTACHMENT_FILTER
sal_Int32 SAL_CALL removeInterface(const key &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace)
void launchEvent(const css::beans::PropertyChangeEvent &rEvt) const
Create merge doc and keep the doc shell.
css::uno::Reference< css::frame::XModel > GetBaseModel() const
virtual void SAL_CALL addMailMergeEventListener(const css::uno::Reference< css::text::XMailMergeListener > &xListener) override
css::uno::Sequence< css::beans::PropertyValue > m_aSaveFilterData
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
#define UNO_NAME_SAVE_FILTER
css::uno::Reference< css::sdbc::XConnection > m_xConnection
bool Merge(const SwMergeDescriptor &rMergeDesc)
Merging of data records into fields.
SwDBManager * GetDBManager() const
For evaluation of DB fields (new DB-manager).
OUString sPrefix
Basename incl.
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
OUString sSaveToFilterOptions
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
#define STR_SW_EVENT_MAIL_MERGE_END
#define TOOLS_WARN_EXCEPTION(area, stream)
sal_Int32 m_nDataCommandType
#define WID_ESCAPE_PROCESSING
OUString m_aFileNamePrefix
~MailMergeExecuteFinalizer()
virtual OUString SAL_CALL getImplementationName() override
virtual const SwPrintData & getPrintData() const =0
Returns the PrintData.
OUString const & GetURL() const
void SetSmartProtocol(INetProtocol eTheSmartScheme)
void SAL_CALL disposeAndClear(const css::lang::EventObject &rEvt)
#define UNO_NAME_PRINT_OPTIONS
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
static osl::Mutex & GetMailMergeMutex()
void SetMergeSilent(bool bVal)
OUString m_aDataSourceName
#define UNO_NAME_SINGLE_PRINT_JOBS
#define UNO_NAME_SEND_AS_HTML
#define WID_SEND_AS_ATTACHMENT
#define UNO_NAME_FILE_NAME_PREFIX
#define WID_SAVE_AS_SINGLE_FILE
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
SfxObjectShellRef m_xDocSh
const SfxItemPropertyMap & getPropertyMap() const
void LaunchMailMergeEvent(const css::text::MailMergeEvent &rData) const
#define WID_BLIND_COPIES_TO
virtual void SAL_CALL dispose() override
css::uno::Sequence< OUString > m_aCopiesTo
bool UCB_IsDirectory(const OUString &rURL)
SfxViewShell * GetViewShell() const
css::uno::Sequence< css::beans::PropertyValue > m_aPrintSettings
SwDocShell * GetDocShell()
#define UNO_NAME_ATTACHMENT_NAME
#define WID_SAVE_FILTER_DATA
#define WID_SAVE_FILTER_OPTIONS
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
Provides access to the formatting devices of a document.
MailMergeExecuteFinalizer(SwXMailMerge *mailmerge)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
sal_Int32 SAL_CALL addInterface(const key &rKey, const css::uno::Reference< css::uno::XInterface > &r)
#define WID_IN_SERVER_PASSWORD
Reference< XMultiServiceFactory > getProcessServiceFactory()
css::uno::Sequence< OUString > aCopiesTo
#define UNO_NAME_SAVE_AS_SINGLE_FILE
css::uno::Sequence< css::beans::PropertyValue > aPrintOptions
void SetPrintSingleJobs(bool b)
::utl::SharedUNOComponent< XInterface > SharedComponent
MailMergeExecuteFinalizer & operator=(MailMergeExecuteFinalizer const &)=delete
Save mail merge as files.
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
OUString m_sInServerPassword
#define STR_SW_EVENT_MAIL_MERGE
#define FILTER_XML
XML filter.
#define UNO_NAME_OUTPUT_URL
#define WID_DATA_SOURCE_NAME
#define WID_FILE_NAME_PREFIX
bool DoInitNew(SfxMedium *pMedium=nullptr)
OUString m_sSaveFilterOptions
virtual void setPrintData(const SwPrintData &rPrtData)=0
Sets the PrintData.
comphelper::OInterfaceContainerHelper2 m_aMergeListeners
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
css::uno::Sequence< OUString > m_aBlindCopiesTo
css::uno::Sequence< OUString > aBlindCopiesTo
Reference< XComponentContext > getProcessComponentContext()
SwUnoPropertyMapProvider aSwMapProvider
OString stripStart(const OString &rIn, char c)
OUString sDBcolumn
DB column to fetch EMail of Filename from.
#define UNO_NAME_DAD_COMMAND
static OUString GetEventName(sal_Int32 nId)
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
#define WID_ADDRESS_FROM_COLUMN
#define UNO_NAME_OUT_SERVER_PASSWORD
OPropertyListenerContainerHelper m_aPropListeners
css::uno::XInterface * next()
void reset(const css::uno::Reference< INTERFACE > &_rxComponent, AssignmentMode _eMode=TakeOwnership)
#define UNO_NAME_SEND_AS_ATTACHMENT
virtual void SAL_CALL cancel() override
#define WID_ATTACHMENT_FILTER
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet
css::uno::Sequence< css::uno::Any > m_aSelection
OInterfaceContainerHelper *SAL_CALL getContainer(const key &) const
#define UNO_NAME_IN_SERVER_PASSWORD
comphelper::OInterfaceContainerHelper2 m_aEvtListeners
#define UNO_NAME_SELECTION
#define UNO_NAME_ADDRESS_FROM_COLUMN
#define PROPERTY_MAP_MAILMERGE
#define UNO_NAME_FILE_NAME_FROM_COLUMN
static bool DeleteTmpFile_Impl(Reference< frame::XModel > &rxModel, SfxObjectShellRef &rxDocSh, const OUString &rTmpFileURL)
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
bool SetSmartURL(OUString const &rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
bool m_bFileNameFromColumn
bool SAL_CALL hasMoreElements() const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
#define UNO_NAME_DAD_COMMAND_TYPE
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)