/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX #define INCLUDED_SW_SOURCE_UI_DBUI_MMOUTPUTPAGE_HXX #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mailmergehelper.hxx" class SwMailMergeWizard; class SfxPrinter; class SwSendMailDialog; namespace com{ namespace sun{ namespace star{ namespace mail{ class XMailMessage; } }}} class SwMailMergeOutputPage : public svt::OWizardPage { VclPtr m_pSaveStartDocRB; VclPtr m_pSaveMergedDocRB; VclPtr m_pPrintRB; VclPtr m_pSendMailRB; VclPtr m_pSeparator; VclPtr m_pSaveStartDocPB; VclPtr m_pSaveAsOneRB; VclPtr m_pSaveIndividualRB; VclPtr m_pPrintAllRB; //has to be here for tab control reasons VclPtr m_pSendAllRB; //has to be here for tab control reasons //this group is used in save and print VclPtr m_pFromRB; VclPtr m_pFromNF; VclPtr m_pToFT; VclPtr m_pToNF; VclPtr m_pSaveNowPB; VclPtr m_pPrinterFT; VclPtr m_pPrinterLB; VclPtr m_pPrinterSettingsPB; VclPtr m_pPrintNowPB; VclPtr m_pMailToFT; VclPtr m_pMailToLB; VclPtr m_pCopyToPB; VclPtr m_pSubjectFT; VclPtr m_pSubjectED; VclPtr m_pSendAsFT; VclPtr m_pSendAsLB; VclPtr m_pAttachmentGroup; VclPtr m_pAttachmentED; VclPtr m_pSendAsPB; VclPtr m_pSendDocumentsPB; //some FixedLine labels OUString m_sSaveStartST; OUString m_sSaveMergedST; OUString m_sPrintST; OUString m_sSendMailST; //misc strings OUString m_sDefaultAttachmentST; OUString m_sNoSubjectST; OUString m_sConfigureMail; OUString m_sBody; bool m_bCancelSaving; VclPtr m_pWizard; //some dialog data VclPtr m_pTempPrinter; OUString m_sCC; OUString m_sBCC; DECL_LINK_TYPED(OutputTypeHdl_Impl, Button*, void); DECL_LINK_TYPED(CopyToHdl_Impl, Button*, void); DECL_LINK_TYPED(SaveStartHdl_Impl, Button*, void ); DECL_LINK_TYPED(SaveOutputHdl_Impl, Button* , void); DECL_LINK_TYPED(PrinterChangeHdl_Impl, ListBox&,void ); DECL_LINK_TYPED(PrintHdl_Impl, Button*, void); DECL_LINK_TYPED(PrinterSetupHdl_Impl, Button*, void ); DECL_LINK_TYPED(SendTypeHdl_Impl, ListBox&, void); DECL_LINK_TYPED(SendAsHdl_Impl, Button*, void); DECL_LINK_TYPED(SendDocumentsHdl_Impl, Button*, void); DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); DECL_LINK_TYPED(SaveCancelHdl_Impl, Button*, void); int documentStartPageNumber( int document ) const; int documentEndPageNumber( int document ) const; protected: virtual bool canAdvance() const override; virtual void ActivatePage() override; public: SwMailMergeOutputPage( SwMailMergeWizard* _pParent); virtual ~SwMailMergeOutputPage(); virtual void dispose() override; }; struct SwMailDescriptor { OUString sEMail; OUString sAttachmentURL; OUString sAttachmentName; OUString sMimeType; OUString sSubject; OUString sBodyMimeType; OUString sBodyContent; OUString sCC; OUString sBCC; }; struct SwSendMailDialog_Impl; class SwMailMergeConfigItem; class SwSendMailDialog : public ModelessDialog //SfxModalDialog { VclPtr m_pTransferStatus; VclPtr m_pPaused; VclPtr m_pProgressBar; VclPtr m_pErrorStatus; VclPtr m_pContainer; VclPtr m_pStatusHB; VclPtr m_pStatus; VclPtr m_pStop; VclPtr m_pClose; OUString m_sContinue; OUString m_sStop; OUString m_sTransferStatus; OUString m_sErrorStatus; OUString m_sSendingTo; OUString m_sCompleted; OUString m_sFailed; bool m_bCancel; bool m_bDesctructionEnabled; ImageList m_aImageList; SwSendMailDialog_Impl* m_pImpl; SwMailMergeConfigItem* m_pConfigItem; sal_Int32 m_nStatusHeight; sal_Int32 m_nSendCount; sal_Int32 m_nErrorCount; DECL_DLLPRIVATE_LINK_TYPED( StopHdl_Impl, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( CloseHdl_Impl, Button* , void); DECL_DLLPRIVATE_STATIC_LINK_TYPED( SwSendMailDialog, StartSendMails, void*, void ); DECL_DLLPRIVATE_STATIC_LINK_TYPED( SwSendMailDialog, StopSendMails, void*, void ); DECL_DLLPRIVATE_LINK_TYPED( RemoveThis, Idle*, void ); SAL_DLLPRIVATE void IterateMails(); SAL_DLLPRIVATE void SendMails(); SAL_DLLPRIVATE void UpdateTransferStatus(); virtual void StateChanged( StateChangedType nStateChange ) override; public: SwSendMailDialog( vcl::Window* pParent, SwMailMergeConfigItem& ); virtual ~SwSendMailDialog(); virtual void dispose() override; void AddDocument( SwMailDescriptor& rDesc ); void SetDocumentCount( sal_Int32 nAllDocuments ); void EnableDesctruction() {m_bDesctructionEnabled = true;} void ShowDialog(); void DocumentSent( css::uno::Reference< css::mail::XMailMessage>, bool bResult, const OUString* pError ); void AllMailsSent(); }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */