LibreOffice Module sfx2 (master) 1
Public Types | Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
SfxMailModel Class Reference

#include <mailmodelapi.hxx>

Inheritance diagram for SfxMailModel:
[legend]

Public Types

enum  SendMailResult {
  SEND_MAIL_OK ,
  SEND_MAIL_CANCELLED ,
  SEND_MAIL_ERROR
}
 

Public Member Functions

 SfxMailModel ()
 
 ~SfxMailModel ()
 
void AddToAddress (const OUString &rAddress)
 
SendMailResult AttachDocument (const css::uno::Reference< css::uno::XInterface > &xFrameOrModel, const OUString &sAttachmentTitle)
 attaches a document to the current attachment list, can be called more than once. More...
 
SendMailResult SaveAndSend (const css::uno::Reference< css::frame::XFrame > &xFrame, const OUString &rType)
 
SendMailResult Send (const css::uno::Reference< css::frame::XFrame > &xFrame)
 
bool IsEmpty () const
 

Protected Types

enum  SaveResult {
  SAVE_SUCCESSFUL ,
  SAVE_CANCELLED ,
  SAVE_ERROR
}
 

Static Protected Member Functions

static SaveResult SaveDocumentAsFormat (const OUString &aSaveFileName, const css::uno::Reference< css::uno::XInterface > &xFrameOrModel, const OUString &rType, OUString &rFileNamePath)
 

Protected Attributes

::std::vector< OUString > maAttachedDocuments
 

Static Private Member Functions

static SaveResult ShowFilterOptionsDialog (const css::uno::Reference< css::lang::XMultiServiceFactory > &xSMGR, const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rFilterName, std::u16string_view rType, bool bModified, sal_Int32 &rNumArgs, css::uno::Sequence< css::beans::PropertyValue > &rArgs)
 

Private Attributes

std::unique_ptr< AddressList_ImplmpToList
 
OUString maFromAddress
 

Detailed Description

Definition at line 41 of file mailmodelapi.hxx.

Member Enumeration Documentation

◆ SaveResult

enum SfxMailModel::SaveResult
protected
Enumerator
SAVE_SUCCESSFUL 
SAVE_CANCELLED 
SAVE_ERROR 

Definition at line 44 of file mailmodelapi.hxx.

◆ SendMailResult

Enumerator
SEND_MAIL_OK 
SEND_MAIL_CANCELLED 
SEND_MAIL_ERROR 

Definition at line 69 of file mailmodelapi.hxx.

Constructor & Destructor Documentation

◆ SfxMailModel()

SfxMailModel::SfxMailModel ( )

Definition at line 626 of file mailmodel.cxx.

◆ ~SfxMailModel()

SfxMailModel::~SfxMailModel ( )

Definition at line 630 of file mailmodel.cxx.

Member Function Documentation

◆ AddToAddress()

void SfxMailModel::AddToAddress ( const OUString &  rAddress)

Definition at line 634 of file mailmodel.cxx.

References mpToList.

Referenced by SfxViewShell::ExecMisc_Impl().

◆ AttachDocument()

SfxMailModel::SendMailResult SfxMailModel::AttachDocument ( const css::uno::Reference< css::uno::XInterface > &  xFrameOrModel,
const OUString &  sAttachmentTitle 
)

attaches a document to the current attachment list, can be called more than once.

at the moment there will be a dialog for export executed for every model which is going to be attached.

Parameters
xModelThe current model to attach
sAttachmentTitleThe title which will be used as attachment title
Returns
See also
error code

Definition at line 648 of file mailmodel.cxx.

References maAttachedDocuments, SAVE_SUCCESSFUL, SaveDocumentAsFormat(), SEND_MAIL_ERROR, and SEND_MAIL_OK.

◆ IsEmpty()

bool SfxMailModel::IsEmpty ( ) const

Definition at line 231 of file mailmodel.cxx.

References maAttachedDocuments.

◆ SaveAndSend()

SfxMailModel::SendMailResult SfxMailModel::SaveAndSend ( const css::uno::Reference< css::frame::XFrame > &  xFrame,
const OUString &  rType 
)

◆ SaveDocumentAsFormat()

SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat ( const OUString &  aSaveFileName,
const css::uno::Reference< css::uno::XInterface > &  xFrameOrModel,
const OUString &  rType,
OUString &  rFileNamePath 
)
staticprotected

◆ Send()

SfxMailModel::SendMailResult SfxMailModel::Send ( const css::uno::Reference< css::frame::XFrame > &  xFrame)

◆ ShowFilterOptionsDialog()

SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog ( const css::uno::Reference< css::lang::XMultiServiceFactory > &  xSMGR,
const css::uno::Reference< css::frame::XModel > &  xModel,
const OUString &  rFilterName,
std::u16string_view  rType,
bool  bModified,
sal_Int32 &  rNumArgs,
css::uno::Sequence< css::beans::PropertyValue > &  rArgs 
)
staticprivate

Member Data Documentation

◆ maAttachedDocuments

::std::vector< OUString > SfxMailModel::maAttachedDocuments
protected

◆ maFromAddress

OUString SfxMailModel::maFromAddress
private

Definition at line 58 of file mailmodelapi.hxx.

Referenced by Send().

◆ mpToList

std::unique_ptr<AddressList_Impl> SfxMailModel::mpToList
private

Definition at line 57 of file mailmodelapi.hxx.

Referenced by AddToAddress(), and Send().


The documentation for this class was generated from the following files: