xref: /AOO41X/main/sw/source/ui/inc/mailmergehelper.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _MAILMERGEHELPER_HXX
28*cdf0e10cSrcweir #define _MAILMERGEHELPER_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <svtools/stdctrl.hxx>
31*cdf0e10cSrcweir #include <unotools/configitem.hxx>
32*cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.h>
33*cdf0e10cSrcweir #include "com/sun/star/mail/XAuthenticator.hpp"
34*cdf0e10cSrcweir #include "com/sun/star/mail/XConnectionListener.hpp"
35*cdf0e10cSrcweir #include "com/sun/star/uno/XCurrentContext.hpp"
36*cdf0e10cSrcweir #include "com/sun/star/mail/XMailMessage.hpp"
37*cdf0e10cSrcweir #include "com/sun/star/datatransfer/XTransferable.hpp"
38*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
39*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
40*cdf0e10cSrcweir #include <cppuhelper/compbase1.hxx>
41*cdf0e10cSrcweir #include <cppuhelper/compbase2.hxx>
42*cdf0e10cSrcweir #include <vcl/scrbar.hxx>
43*cdf0e10cSrcweir #include "swdllapi.h"
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir class SwMailMergeConfigItem;
47*cdf0e10cSrcweir namespace com{ namespace sun{ namespace star{
48*cdf0e10cSrcweir     namespace uno{
49*cdf0e10cSrcweir         class XComponentContext;
50*cdf0e10cSrcweir     }
51*cdf0e10cSrcweir     namespace lang{
52*cdf0e10cSrcweir         class XMultiServiceFactory;
53*cdf0e10cSrcweir     }
54*cdf0e10cSrcweir     namespace mail{
55*cdf0e10cSrcweir         class XSmtpService;
56*cdf0e10cSrcweir         class XMailService;
57*cdf0e10cSrcweir     }
58*cdf0e10cSrcweir }}}
59*cdf0e10cSrcweir /*-- 14.06.2004 12:27:42---------------------------------------------------
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
62*cdf0e10cSrcweir namespace SwMailMergeHelper
63*cdf0e10cSrcweir {
64*cdf0e10cSrcweir     SW_DLLPUBLIC String  CallSaveAsDialog(String& rFilter);
65*cdf0e10cSrcweir     SW_DLLPUBLIC bool    CheckMailAddress( const ::rtl::OUString& rMailAddress );
66*cdf0e10cSrcweir     SW_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService >
67*cdf0e10cSrcweir                          ConnectToSmtpServer( SwMailMergeConfigItem& rConfigItem,
68*cdf0e10cSrcweir                             com::sun::star::uno::Reference< com::sun::star::mail::XMailService >&  xInMailService,
69*cdf0e10cSrcweir                             const String& rInMailServerPassword,
70*cdf0e10cSrcweir                             const String& rOutMailServerPassword,
71*cdf0e10cSrcweir                             Window* pDialogParentWindow = 0 );
72*cdf0e10cSrcweir }
73*cdf0e10cSrcweir /* -----------------06.04.2004 10:29-----------------
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir  --------------------------------------------------*/
76*cdf0e10cSrcweir class SW_DLLPUBLIC SwBoldFixedInfo : public FixedInfo
77*cdf0e10cSrcweir {
78*cdf0e10cSrcweir public:
79*cdf0e10cSrcweir     SwBoldFixedInfo(Window* pParent, const ResId& rResId);
80*cdf0e10cSrcweir     ~SwBoldFixedInfo();
81*cdf0e10cSrcweir };
82*cdf0e10cSrcweir struct SwAddressPreview_Impl;
83*cdf0e10cSrcweir namespace com{namespace sun{namespace star{
84*cdf0e10cSrcweir     namespace container{
85*cdf0e10cSrcweir         class XNameAccess;
86*cdf0e10cSrcweir     }
87*cdf0e10cSrcweir }}}
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir /*-- 27.04.2004 13:20:00---------------------------------------------------
90*cdf0e10cSrcweir     Preview window used to show the possible selection of address blocks
91*cdf0e10cSrcweir     and also the resulting address filled with database data
92*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
93*cdf0e10cSrcweir class SW_DLLPUBLIC SwAddressPreview : public Window
94*cdf0e10cSrcweir {
95*cdf0e10cSrcweir     ScrollBar               aVScrollBar;
96*cdf0e10cSrcweir     SwAddressPreview_Impl*  pImpl;
97*cdf0e10cSrcweir     Link                    m_aSelectHdl;
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir     void DrawText_Impl( const ::rtl::OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected);
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir     virtual void        Paint(const Rectangle&);
102*cdf0e10cSrcweir     virtual void        MouseButtonDown( const MouseEvent& rMEvt );
103*cdf0e10cSrcweir     virtual void        KeyInput( const KeyEvent& rKEvt );
104*cdf0e10cSrcweir     virtual void        StateChanged( StateChangedType nStateChange );
105*cdf0e10cSrcweir     void                UpdateScrollBar();
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir     DECL_LINK(ScrollHdl, ScrollBar*);
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir public:
110*cdf0e10cSrcweir     SwAddressPreview(Window* pParent, const ResId rResId);
111*cdf0e10cSrcweir     ~SwAddressPreview();
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir     /** The address string is a list of address elements separated by spaces
114*cdf0e10cSrcweir     and breaks. The addresses fit into the given layout. If more addresses then
115*cdf0e10cSrcweir     rows/columns should be used a scrollbar will be added.
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir      AddAddress appends the new address to the already added ones.
118*cdf0e10cSrcweir      Initially the first added address will be selected
119*cdf0e10cSrcweir     */
120*cdf0e10cSrcweir     void                    AddAddress(const ::rtl::OUString& rAddress);
121*cdf0e10cSrcweir     //  for preview mode - replaces the currently used address by the given one
122*cdf0e10cSrcweir     void                    SetAddress(const ::rtl::OUString& rAddress);
123*cdf0e10cSrcweir     // removes all addresses
124*cdf0e10cSrcweir     void                    Clear();
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir     // returns the selected address
127*cdf0e10cSrcweir     sal_uInt16              GetSelectedAddress() const;
128*cdf0e10cSrcweir     void                    SelectAddress(sal_uInt16 nSelect);
129*cdf0e10cSrcweir     void                    ReplaceSelectedAddress(const ::rtl::OUString&);
130*cdf0e10cSrcweir     void                    RemoveSelectedAddress();
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir     // set the number of rows and columns of addresses
133*cdf0e10cSrcweir     void                    SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
134*cdf0e10cSrcweir     void                    EnableScrollBar(bool bEnable = true);
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir     // fill the actual data into a string (address block or greeting)
137*cdf0e10cSrcweir     static String FillData(
138*cdf0e10cSrcweir             const ::rtl::OUString& rAddress,
139*cdf0e10cSrcweir             SwMailMergeConfigItem& rConfigItem,
140*cdf0e10cSrcweir             const ::com::sun::star::uno::Sequence< ::rtl::OUString>* pAssignments = 0);
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir     void    SetSelectHdl (const Link& rLink) {m_aSelectHdl = rLink;}
143*cdf0e10cSrcweir };
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir /*-- 11.05.2004 15:39:59---------------------------------------------------
146*cdf0e10cSrcweir     iterate over an address block or a greeting line
147*cdf0e10cSrcweir     the iterator returns the parts either as pure string
148*cdf0e10cSrcweir     or as column
149*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
150*cdf0e10cSrcweir struct SwMergeAddressItem
151*cdf0e10cSrcweir {
152*cdf0e10cSrcweir     String  sText;
153*cdf0e10cSrcweir     bool    bIsColumn;
154*cdf0e10cSrcweir     bool    bIsReturn;
155*cdf0e10cSrcweir     SwMergeAddressItem() :
156*cdf0e10cSrcweir         bIsColumn(false),
157*cdf0e10cSrcweir         bIsReturn(false) {}
158*cdf0e10cSrcweir };
159*cdf0e10cSrcweir class SW_DLLPUBLIC   SwAddressIterator
160*cdf0e10cSrcweir {
161*cdf0e10cSrcweir     String sAddress;
162*cdf0e10cSrcweir public:
163*cdf0e10cSrcweir     SwAddressIterator(const String& rAddress) :
164*cdf0e10cSrcweir         sAddress(rAddress){}
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir     SwMergeAddressItem  Next();
167*cdf0e10cSrcweir     bool                HasMore() const{return sAddress.Len() > 0;}
168*cdf0e10cSrcweir };
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir /*-- 21.05.2004 10:31:15---------------------------------------------------
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
173*cdf0e10cSrcweir class SW_DLLPUBLIC SwAuthenticator :
174*cdf0e10cSrcweir     public cppu::WeakImplHelper1< ::com::sun::star::mail::XAuthenticator>
175*cdf0e10cSrcweir {
176*cdf0e10cSrcweir     ::rtl::OUString m_aUserName;
177*cdf0e10cSrcweir     ::rtl::OUString m_aPassword;
178*cdf0e10cSrcweir     Window*         m_pParentWindow;
179*cdf0e10cSrcweir public:
180*cdf0e10cSrcweir     SwAuthenticator() : m_pParentWindow(0) {}
181*cdf0e10cSrcweir     SwAuthenticator(const ::rtl::OUString& username, const ::rtl::OUString& password, Window* pParent) :
182*cdf0e10cSrcweir         m_aUserName(username),
183*cdf0e10cSrcweir         m_aPassword(password),
184*cdf0e10cSrcweir         m_pParentWindow( pParent )
185*cdf0e10cSrcweir     {}
186*cdf0e10cSrcweir     ~SwAuthenticator();
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getUserName( ) throw (::com::sun::star::uno::RuntimeException);
189*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getPassword(  ) throw (::com::sun::star::uno::RuntimeException);
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir };
192*cdf0e10cSrcweir /*-- 25.08.2004 12:48:47---------------------------------------------------
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
195*cdf0e10cSrcweir class SW_DLLPUBLIC SwConnectionContext :
196*cdf0e10cSrcweir     public cppu::WeakImplHelper1< ::com::sun::star::uno::XCurrentContext >
197*cdf0e10cSrcweir {
198*cdf0e10cSrcweir     ::rtl::OUString     m_sMailServer;
199*cdf0e10cSrcweir     sal_Int16           m_nPort;
200*cdf0e10cSrcweir     ::rtl::OUString     m_sConnectionType;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir public:
203*cdf0e10cSrcweir     SwConnectionContext(const ::rtl::OUString& rMailServer, sal_Int16 nPort, const ::rtl::OUString& rConnectionType);
204*cdf0e10cSrcweir     ~SwConnectionContext();
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL     getValueByName( const ::rtl::OUString& Name )
207*cdf0e10cSrcweir                                                             throw (::com::sun::star::uno::RuntimeException);
208*cdf0e10cSrcweir };
209*cdf0e10cSrcweir /*-- 21.05.2004 10:39:20---------------------------------------------------
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
212*cdf0e10cSrcweir class SwMutexBase
213*cdf0e10cSrcweir {
214*cdf0e10cSrcweir public:
215*cdf0e10cSrcweir     osl::Mutex m_aMutex;
216*cdf0e10cSrcweir };
217*cdf0e10cSrcweir /*-- 21.05.2004 10:39:20---------------------------------------------------
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
220*cdf0e10cSrcweir class SW_DLLPUBLIC SwConnectionListener :
221*cdf0e10cSrcweir         public SwMutexBase,
222*cdf0e10cSrcweir         public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XConnectionListener >
223*cdf0e10cSrcweir {
224*cdf0e10cSrcweir     using cppu::WeakComponentImplHelperBase::disposing;
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir public:
227*cdf0e10cSrcweir     SwConnectionListener() :
228*cdf0e10cSrcweir         cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XConnectionListener>(m_aMutex)
229*cdf0e10cSrcweir     {}
230*cdf0e10cSrcweir     ~SwConnectionListener();
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir     virtual void SAL_CALL connected(const ::com::sun::star::lang::EventObject& aEvent)
233*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir     virtual void SAL_CALL disconnected(const ::com::sun::star::lang::EventObject& aEvent)
236*cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir     virtual void SAL_CALL disposing(const com::sun::star::lang::EventObject& aEvent)
239*cdf0e10cSrcweir         throw(com::sun::star::uno::RuntimeException);
240*cdf0e10cSrcweir };
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir /*-- 13.07.2004 09:02:12---------------------------------------------------
243*cdf0e10cSrcweir 
244*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
245*cdf0e10cSrcweir class SwMailTransferable :
246*cdf0e10cSrcweir         public SwMutexBase,
247*cdf0e10cSrcweir         public cppu::WeakComponentImplHelper2
248*cdf0e10cSrcweir         <
249*cdf0e10cSrcweir             ::com::sun::star::datatransfer::XTransferable,
250*cdf0e10cSrcweir             ::com::sun::star::beans::XPropertySet
251*cdf0e10cSrcweir         >
252*cdf0e10cSrcweir {
253*cdf0e10cSrcweir     rtl::OUString  m_aMimeType;
254*cdf0e10cSrcweir     rtl::OUString  m_sBody;
255*cdf0e10cSrcweir     rtl::OUString  m_aURL;
256*cdf0e10cSrcweir     rtl::OUString  m_aName;
257*cdf0e10cSrcweir     bool           m_bIsBody;
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir     public:
260*cdf0e10cSrcweir     SwMailTransferable(const rtl::OUString& rURL, const rtl::OUString& rName, const rtl::OUString& rMimeType);
261*cdf0e10cSrcweir     SwMailTransferable(const rtl::OUString& rBody, const rtl::OUString& rMimeType);
262*cdf0e10cSrcweir     ~SwMailTransferable();
263*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
264*cdf0e10cSrcweir                         getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
265*cdf0e10cSrcweir                             throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
266*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL
267*cdf0e10cSrcweir                         getTransferDataFlavors(  )
268*cdf0e10cSrcweir                             throw (::com::sun::star::uno::RuntimeException) ;
269*cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL
270*cdf0e10cSrcweir                         isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
271*cdf0e10cSrcweir                             throw (::com::sun::star::uno::RuntimeException);
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir     //XPropertySet
274*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
275*cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
276*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
277*cdf0e10cSrcweir     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
278*cdf0e10cSrcweir     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
279*cdf0e10cSrcweir     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
280*cdf0e10cSrcweir     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir };
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir /*-- 22.06.2004 16:38:34---------------------------------------------------
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
287*cdf0e10cSrcweir class SwMailMessage :
288*cdf0e10cSrcweir         public SwMutexBase,
289*cdf0e10cSrcweir         public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XMailMessage >
290*cdf0e10cSrcweir {
291*cdf0e10cSrcweir     ::rtl::OUString                                                                         m_sSenderName;
292*cdf0e10cSrcweir     ::rtl::OUString                                                                         m_sSenderAddress;
293*cdf0e10cSrcweir     ::rtl::OUString                                                                         m_sReplyToAddress;
294*cdf0e10cSrcweir     ::rtl::OUString                                                                         m_sSubject;
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable>        m_xBody;
297*cdf0e10cSrcweir //    ::com::sun::star::mail::MailMessageBody                                                 m_aBody;
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< ::rtl::OUString >                                      m_aRecipients;
300*cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< ::rtl::OUString >                                      m_aCcRecipients;
301*cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< ::rtl::OUString >                                      m_aBccRecipients;
302*cdf0e10cSrcweir //    ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachmentDescriptor >     m_aAttachments;
303*cdf0e10cSrcweir     ::com::sun::star::uno::Sequence<  ::com::sun::star::mail::MailAttachment >              m_aAttachments;
304*cdf0e10cSrcweir public:
305*cdf0e10cSrcweir     SwMailMessage();
306*cdf0e10cSrcweir     ~SwMailMessage();
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir     // Attributes
309*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL    getSenderName() throw (::com::sun::star::uno::RuntimeException);
310*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL    getSenderAddress() throw (::com::sun::star::uno::RuntimeException);
311*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL    getReplyToAddress() throw (::com::sun::star::uno::RuntimeException);
312*cdf0e10cSrcweir     virtual void SAL_CALL               setReplyToAddress( const ::rtl::OUString& _replytoaddress ) throw (::com::sun::star::uno::RuntimeException);
313*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL    getSubject() throw (::com::sun::star::uno::RuntimeException);
314*cdf0e10cSrcweir     virtual void SAL_CALL               setSubject( const ::rtl::OUString& _subject ) throw (::com::sun::star::uno::RuntimeException);
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL
317*cdf0e10cSrcweir                                         getBody()
318*cdf0e10cSrcweir                                                 throw (::com::sun::star::uno::RuntimeException);
319*cdf0e10cSrcweir     virtual void SAL_CALL               setBody( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _body )
320*cdf0e10cSrcweir                                                 throw (::com::sun::star::uno::RuntimeException);
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir     // Methods
323*cdf0e10cSrcweir     virtual void SAL_CALL               addRecipient( const ::rtl::OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException);
324*cdf0e10cSrcweir     virtual void SAL_CALL               addCcRecipient( const ::rtl::OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException);
325*cdf0e10cSrcweir     virtual void SAL_CALL               addBccRecipient( const ::rtl::OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException);
326*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
327*cdf0e10cSrcweir                                         getRecipients(  ) throw (::com::sun::star::uno::RuntimeException);
328*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
329*cdf0e10cSrcweir                                         getCcRecipients(  ) throw (::com::sun::star::uno::RuntimeException);
330*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
331*cdf0e10cSrcweir                                         getBccRecipients(  ) throw (::com::sun::star::uno::RuntimeException);
332*cdf0e10cSrcweir     virtual void SAL_CALL               addAttachment( const ::com::sun::star::mail::MailAttachment& aMailAttachment )
333*cdf0e10cSrcweir                                             throw (::com::sun::star::uno::RuntimeException);
334*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachment > SAL_CALL
335*cdf0e10cSrcweir                                         getAttachments(  ) throw (::com::sun::star::uno::RuntimeException);
336*cdf0e10cSrcweir     void                                SetSenderName(const ::rtl::OUString& rSenderName)
337*cdf0e10cSrcweir                                                 {m_sSenderName = rSenderName;}
338*cdf0e10cSrcweir     void                                SetSenderAddress(const ::rtl::OUString& rSenderAddress)
339*cdf0e10cSrcweir                                                 {m_sSenderAddress = rSenderAddress;}
340*cdf0e10cSrcweir };
341*cdf0e10cSrcweir /*-- 21.05.2004 10:17:22---------------------------------------------------
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir   -----------------------------------------------------------------------*/
344*cdf0e10cSrcweir SW_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>
345*cdf0e10cSrcweir         getCurrentCmpCtx(
346*cdf0e10cSrcweir             ::com::sun::star::uno::Reference<
347*cdf0e10cSrcweir                 ::com::sun::star::lang::XMultiServiceFactory> rSrvMgr);
348*cdf0e10cSrcweir #endif
349*cdf0e10cSrcweir 
350