LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/source/ui/dbui - mmoutputpage.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2013-07-09 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef _MAILMERGEOUTPUTPAGE_HXX
      20             : #define _MAILMERGEOUTPUTPAGE_HXX
      21             : #include <svtools/wizardmachine.hxx>
      22             : #include <vcl/button.hxx>
      23             : #include <svtools/stdctrl.hxx>
      24             : #include <vcl/combobox.hxx>
      25             : #include <vcl/field.hxx>
      26             : #include <vcl/lstbox.hxx>
      27             : #include <vcl/prgsbar.hxx>
      28             : #include <sfx2/objsh.hxx>
      29             : #include <sfx2/basedlgs.hxx>
      30             : #include <svtools/svtabbx.hxx>
      31             : #include <svtools/headbar.hxx>
      32             : #include "swdllapi.h"
      33             : #include "mailmergehelper.hxx"
      34             : 
      35             : class SwMailMergeWizard;
      36             : class SfxPrinter;
      37             : class SwSendMailDialog;
      38             : 
      39             : namespace com{ namespace sun{ namespace star{
      40             :     namespace mail{
      41             :         class XMailMessage;
      42             :     }
      43             : }}}
      44             : 
      45             : class SwMailMergeOutputPage : public svt::OWizardPage
      46             : {
      47             :     SwBoldFixedInfo m_aHeaderFI;
      48             :     FixedInfo       m_aOptionsFI;
      49             :     RadioButton     m_aSaveStartDocRB;
      50             :     RadioButton     m_aSaveMergedDocRB;
      51             :     RadioButton     m_aPrintRB;
      52             :     RadioButton     m_aSendMailRB;
      53             : 
      54             :     FixedLine       m_aSeparatorFL;
      55             : 
      56             :     PushButton      m_aSaveStartDocPB;
      57             : 
      58             :     RadioButton     m_aSaveAsOneRB;
      59             :     RadioButton     m_aSaveIndividualRB;
      60             :     RadioButton     m_aPrintAllRB; //has to be here for tab control reasons
      61             :     RadioButton     m_aSendAllRB;  //has to be here for tab control reasons
      62             :     //this group is used in save and print
      63             :     RadioButton     m_aFromRB;
      64             :     NumericField    m_aFromNF;
      65             :     FixedText       m_aToFT;
      66             :     NumericField    m_aToNF;
      67             :     PushButton      m_aSaveNowPB;
      68             : 
      69             :     FixedText       m_aPrinterFT;
      70             :     ListBox         m_aPrinterLB;
      71             :     PushButton      m_aPrinterSettingsPB;
      72             :     PushButton      m_aPrintNowPB;
      73             : 
      74             :     FixedText       m_aMailToFT;
      75             :     ListBox         m_aMailToLB;
      76             :     PushButton      m_aCopyToPB;
      77             :     FixedText       m_aSubjectFT;
      78             :     Edit            m_aSubjectED;
      79             :     FixedText       m_aSendAsFT;
      80             :     ListBox         m_aSendAsLB;
      81             :     FixedText       m_aAttachmentFT;
      82             :     Edit            m_aAttachmentED;
      83             :     PushButton      m_aSendAsPB;
      84             :     PushButton      m_aSendDocumentsPB;
      85             : 
      86             :     //some FixedLine labels
      87             :     String          m_sSaveStartST;
      88             :     String          m_sSaveMergedST;
      89             :     String          m_sPrintST;
      90             :     String          m_sSendMailST;
      91             : 
      92             :     //misc strings
      93             :     String          m_sDefaultAttachmentST;
      94             :     String          m_sNoSubjectQueryST;
      95             :     String          m_sNoSubjectST;
      96             :     String          m_sNoAttachmentNameST;
      97             :     String          m_sConfigureMail;
      98             : 
      99             :     String          m_sBody;
     100             : 
     101             :     long            m_nFromToRBPos;
     102             :     long            m_nFromToFTPos;
     103             :     long            m_nFromToNFPos;
     104             :     long            m_nRBOffset;
     105             : 
     106             :     bool            m_bCancelSaving;
     107             : 
     108             :     SwMailMergeWizard*  m_pWizard;
     109             : 
     110             :     //some dialog data
     111             :     Printer*        m_pTempPrinter;
     112             :     String          m_sCC;
     113             :     String          m_sBCC;
     114             : 
     115             : 
     116             :     DECL_LINK(OutputTypeHdl_Impl, RadioButton*);
     117             :     DECL_LINK(CopyToHdl_Impl, PushButton*);
     118             :     DECL_LINK(SaveStartHdl_Impl, PushButton* );
     119             :     DECL_LINK(SaveOutputHdl_Impl, PushButton* );
     120             :     DECL_LINK(PrinterChangeHdl_Impl, ListBox* );
     121             :     DECL_LINK(PrintHdl_Impl, void *);
     122             :     DECL_LINK(PrinterSetupHdl_Impl, PushButton* );
     123             :     DECL_LINK(SendTypeHdl_Impl, ListBox*);
     124             :     DECL_LINK(SendAsHdl_Impl, PushButton*);
     125             :     DECL_LINK(SendDocumentsHdl_Impl, PushButton*);
     126             :     DECL_LINK(DocumentSelectionHdl_Impl, RadioButton*);
     127             :     DECL_LINK(SaveCancelHdl_Impl, void *);
     128             : protected:
     129             :         virtual bool    canAdvance() const;
     130             :         virtual void    ActivatePage();
     131             : public:
     132             :         SwMailMergeOutputPage( SwMailMergeWizard* _pParent);
     133             :         ~SwMailMergeOutputPage();
     134             : 
     135             : };
     136             : 
     137           0 : struct SwMailDescriptor
     138             : {
     139             :     OUString                             sEMail;
     140             :     OUString                             sAttachmentURL;
     141             :     OUString                             sAttachmentName;
     142             :     OUString                             sMimeType;
     143             :     OUString                             sSubject;
     144             :     OUString                             sBodyMimeType;
     145             :     OUString                             sBodyContent;
     146             : 
     147             : 
     148             :     OUString                             sCC;
     149             :     OUString                             sBCC;
     150             : };
     151             : struct SwSendMailDialog_Impl;
     152             : class SwMailMergeConfigItem;
     153             : class SW_DLLPUBLIC SwSendMailDialog : public ModelessDialog //SfxModalDialog
     154             : {
     155             :     FixedLine               m_aStatusFL;
     156             :     FixedText               m_aStatusFT;
     157             : 
     158             :     FixedLine               m_aTransferStatusFL;
     159             :     FixedText               m_aTransferStatusFT;
     160             :     FixedInfo               m_PausedFI;
     161             :     ProgressBar             m_aProgressBar;
     162             :     FixedText               m_aErrorStatusFT;
     163             : 
     164             :     PushButton              m_aDetailsPB;
     165             :     HeaderBar               m_aStatusHB;
     166             :     SvTabListBox            m_aStatusLB;
     167             : 
     168             :     FixedLine               m_aSeparatorFL;
     169             : 
     170             :     PushButton              m_aStopPB;
     171             :     PushButton              m_aClosePB;
     172             : 
     173             :     String                  m_sMore;
     174             :     String                  m_sLess;
     175             :     String                  m_sContinue;
     176             :     String                  m_sStop;
     177             :     String                  m_sSend;
     178             :     String                  m_sTransferStatus;
     179             :     String                  m_sErrorStatus;
     180             :     String                  m_sSendingTo;
     181             :     String                  m_sCompleted;
     182             :     String                  m_sFailed;
     183             :     String                  m_sTerminateQuery;
     184             : 
     185             :     bool                    m_bCancel;
     186             :     bool                    m_bDesctructionEnabled;
     187             : 
     188             :     ImageList               m_aImageList;
     189             : 
     190             :     SwSendMailDialog_Impl*  m_pImpl;
     191             :     SwMailMergeConfigItem*  m_pConfigItem;
     192             :     sal_Int32               m_nStatusHeight;
     193             :     sal_Int32               m_nSendCount;
     194             :     sal_Int32               m_nErrorCount;
     195             : 
     196             :     SW_DLLPRIVATE DECL_LINK( DetailsHdl_Impl, void* );
     197             :     SW_DLLPRIVATE DECL_LINK( StopHdl_Impl, PushButton* );
     198             :     SW_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* );
     199             :     SW_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* );
     200             :     SW_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog* );
     201             :     SW_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer* );
     202             : 
     203             :     SW_DLLPRIVATE void        IterateMails();
     204             :     SW_DLLPRIVATE void        SendMails();
     205             :     SW_DLLPRIVATE void        UpdateTransferStatus();
     206             : 
     207             :     virtual void        StateChanged( StateChangedType nStateChange );
     208             : 
     209             : public:
     210             :     SwSendMailDialog( Window* pParent, SwMailMergeConfigItem& );
     211             :     ~SwSendMailDialog();
     212             : 
     213             :     void                AddDocument( SwMailDescriptor& rDesc );
     214             :     void                SetDocumentCount( sal_Int32 nAllDocuments );
     215           0 :     void                EnableDesctruction() {m_bDesctructionEnabled = true;}
     216             :     void                ShowDialog();
     217             : 
     218             :     void                DocumentSent( ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage>,
     219             :                                         bool bResult,
     220             :                                         const OUString* pError );
     221             :     void                AllMailsSent();
     222             : 
     223             : };
     224             : #endif
     225             : 
     226             : 
     227             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10