19#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_MAILMERGEHELPER_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_MAILMERGEHELPER_HXX
22#include <com/sun/star/uno/Sequence.h>
23#include <com/sun/star/mail/XAuthenticator.hpp>
24#include <com/sun/star/mail/XConnectionListener.hpp>
25#include <com/sun/star/uno/XCurrentContext.hpp>
26#include <com/sun/star/mail/XMailMessage.hpp>
27#include <com/sun/star/datatransfer/XTransferable.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
34#include <rtl/ustring.hxx>
50 css::uno::Reference<css::mail::XMailService>& xInMailService,
51 const OUString& rInMailServerPassword,
52 const OUString& rOutMailServerPassword,
62 std::unique_ptr<SwAddressPreview_Impl>
m_pImpl;
67 const Point& rTopLeft,
const Size& rSize,
bool bIsSelected);
72 void UpdateScrollBar();
87 void AddAddress(
const OUString& rAddress);
89 void SetAddress(
const OUString& rAddress);
94 sal_uInt16 GetSelectedAddress()
const;
95 void SelectAddress(sal_uInt16 nSelect);
96 void ReplaceSelectedAddress(
const OUString&);
97 void RemoveSelectedAddress();
100 void SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
101 void EnableScrollBar();
105 const css::uno::Sequence<OUString>* pAssignments =
nullptr);
130 m_sAddress(
std::move(aAddress))
134 bool HasMore()
const {
return !m_sAddress.isEmpty(); }
138 public cppu::WeakImplHelper<css::mail::XAuthenticator>
145 : m_pParentWindow(nullptr)
148 : m_aUserName(
std::move(username))
150 , m_pParentWindow(pParent)
154 virtual OUString SAL_CALL getUserName()
override;
169 virtual css::uno::Any SAL_CALL getValueByName(
const OUString& Name)
override;
180 virtual void SAL_CALL connected(
const css::lang::EventObject&
aEvent)
override;
182 virtual void SAL_CALL disconnected(
const css::lang::EventObject&
aEvent)
override;
184 virtual void SAL_CALL disposing(
const css::lang::EventObject&
aEvent)
override;
200 virtual css::uno::Any SAL_CALL getTransferData(
const css::datatransfer::DataFlavor& aFlavor)
override;
202 virtual css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL getTransferDataFlavors()
override;
203 virtual sal_Bool SAL_CALL isDataFlavorSupported(
const css::datatransfer::DataFlavor& aFlavor)
override;
206 virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo()
override;
207 virtual void SAL_CALL
setPropertyValue(
const OUString& aPropertyName,
const css::uno::Any& aValue)
override;
209 virtual css::uno::Any SAL_CALL
getPropertyValue(
const OUString& PropertyName)
override;
210 virtual void SAL_CALL addPropertyChangeListener(
const OUString& aPropertyName,
211 const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener)
override;
212 virtual void SAL_CALL removePropertyChangeListener(
const OUString& aPropertyName,
213 const css::uno::Reference<css::beans::XPropertyChangeListener >& aListener)
override;
214 virtual void SAL_CALL addVetoableChangeListener(
const OUString& PropertyName,
215 const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener)
override;
216 virtual void SAL_CALL removeVetoableChangeListener(
const OUString& PropertyName,
217 const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener)
override;
229 css::uno::Reference<css::datatransfer::XTransferable>
m_xBody;
242 virtual OUString SAL_CALL getSenderName()
override;
243 virtual OUString SAL_CALL getSenderAddress()
override;
244 virtual OUString SAL_CALL getReplyToAddress()
override;
245 virtual void SAL_CALL setReplyToAddress(
const OUString& _replytoaddress )
override;
246 virtual OUString SAL_CALL getSubject()
override;
247 virtual void SAL_CALL setSubject(
const OUString& _subject)
override;
249 virtual css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL getBody()
override;
250 virtual void SAL_CALL setBody(
const css::uno::Reference<css::datatransfer::XTransferable>& _body)
override;
253 virtual void SAL_CALL addRecipient(
const OUString& sRecipientAddress )
override;
254 virtual void SAL_CALL addCcRecipient(
const OUString& sRecipientAddress )
override;
255 virtual void SAL_CALL addBccRecipient(
const OUString& sRecipientAddress )
override;
256 virtual css::uno::Sequence<OUString> SAL_CALL getRecipients()
override;
257 virtual css::uno::Sequence<OUString> SAL_CALL getCcRecipients()
override;
258 virtual css::uno::Sequence<OUString> SAL_CALL getBccRecipients()
override;
259 virtual void SAL_CALL addAttachment(
const css::mail::MailAttachment& aMailAttachment)
override;
260 virtual css::uno::Sequence<css::mail::MailAttachment> SAL_CALL getAttachments()
override;
263 m_sSenderName = rSenderName;
267 m_sSenderAddress = rSenderAddress;
SwAddressIterator(OUString aAddress)
std::unique_ptr< SwAddressPreview_Impl > m_pImpl
Link< LinkParamNone *, void > m_aSelectHdl
std::unique_ptr< weld::ScrolledWindow > m_xVScrollBar
DECL_DLLPRIVATE_LINK(ScrollHdl, weld::ScrolledWindow &, void)
void SetSelectHdl(const Link< LinkParamNone *, void > &rLink)
SwAuthenticator(OUString username, OUString password, weld::Window *pParent)
weld::Window * m_pParentWindow
OUString m_sConnectionType
OUString m_sSenderAddress
css::uno::Sequence< OUString > m_aRecipients
css::uno::Reference< css::datatransfer::XTransferable > m_xBody
css::uno::Sequence< OUString > m_aBccRecipients
void SetSenderName(const OUString &rSenderName)
void SetSenderAddress(const OUString &rSenderAddress)
css::uno::Sequence< css::mail::MailAttachment > m_aAttachments
css::uno::Sequence< OUString > m_aCcRecipients
OUString m_sReplyToAddress
virtual void disposing(std::unique_lock< std::mutex > &)
uno::Reference< mail::XSmtpService > ConnectToSmtpServer(SwMailMergeConfigItem const &rConfigItem, uno::Reference< mail::XMailService > &rxInMailService, const OUString &rInMailServerPassword, const OUString &rOutMailServerPassword, weld::Window *pDialogParentWindow)
OUString CallSaveAsDialog(weld::Window *pParent, OUString &rFilter)
bool CheckMailAddress(std::u16string_view aMailAddress)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
bool getPassword(const css::uno::Reference< css::task::XInteractionHandler > &xHandler, OUString &rOutPwd, bool bFirstTry, const OUString &rDocName)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)