LibreOffice Module sfx2 (master) 1
|
#include <mailmodelapi.hxx>
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_Impl > | mpToList |
OUString | maFromAddress |
Definition at line 41 of file mailmodelapi.hxx.
|
protected |
Enumerator | |
---|---|
SAVE_SUCCESSFUL | |
SAVE_CANCELLED | |
SAVE_ERROR |
Definition at line 44 of file mailmodelapi.hxx.
Enumerator | |
---|---|
SEND_MAIL_OK | |
SEND_MAIL_CANCELLED | |
SEND_MAIL_ERROR |
Definition at line 69 of file mailmodelapi.hxx.
SfxMailModel::SfxMailModel | ( | ) |
Definition at line 626 of file mailmodel.cxx.
SfxMailModel::~SfxMailModel | ( | ) |
Definition at line 630 of file mailmodel.cxx.
void SfxMailModel::AddToAddress | ( | const OUString & | rAddress | ) |
Definition at line 634 of file mailmodel.cxx.
References mpToList.
Referenced by SfxViewShell::ExecMisc_Impl().
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.
xModel | The current model to attach |
sAttachmentTitle | The title which will be used as attachment title |
Definition at line 648 of file mailmodel.cxx.
References maAttachedDocuments, SAVE_SUCCESSFUL, SaveDocumentAsFormat(), SEND_MAIL_ERROR, and SEND_MAIL_OK.
bool SfxMailModel::IsEmpty | ( | ) | const |
Definition at line 231 of file mailmodel.cxx.
References maAttachedDocuments.
SfxMailModel::SendMailResult SfxMailModel::SaveAndSend | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame, |
const OUString & | rType | ||
) |
Definition at line 779 of file mailmodel.cxx.
References maAttachedDocuments, SAVE_CANCELLED, SAVE_SUCCESSFUL, SaveDocumentAsFormat(), Send(), SEND_MAIL_CANCELLED, SEND_MAIL_ERROR, and xFrame.
Referenced by SfxViewShell::ExecMisc_Impl().
|
staticprotected |
Definition at line 236 of file mailmodel.cxx.
References aURL, INetURLObject::getExtension(), INetURLObject::GetMainURL(), INetURLObject::getName(), INetURLObject::GetProtocol(), comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), INetURLObject::insertName(), INetURLObject::LAST_SEGMENT, comphelper::makePropertyValue(), INetURLObject::NONE, PDF_DOCUMENT_TYPE, SAVE_ERROR, SAVE_SUCCESSFUL, INetURLObject::setExtension(), ShowFilterOptionsDialog(), u, xController, xDispatch, xFrame, and xModel.
Referenced by AttachDocument(), SfxBluetoothModel::SaveAndSend(), and SaveAndSend().
SfxMailModel::SendMailResult SfxMailModel::Send | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame | ) |
Definition at line 660 of file mailmodel.cxx.
References Application::CreateBuilder(), CreateFromAddress_Impl(), Exception, INetURLObject::getBase(), Application::GetFrameWeld(), INetURLObject::LAST_SEGMENT, maAttachedDocuments, maFromAddress, mpToList, SEND_MAIL_CANCELLED, SEND_MAIL_ERROR, SEND_MAIL_OK, INetURLObject::WasEncoded, INetURLObject::WithCharset, and xFrame.
Referenced by SaveAndSend().
|
staticprivate |
Definition at line 113 of file mailmodel.cxx.
References comphelper::makePropertyValue(), PDF_DOCUMENT_TYPE, SAVE_CANCELLED, SAVE_ERROR, SAVE_SUCCESSFUL, SfxResId(), uno::Any::Value, and xModel.
Referenced by SaveDocumentAsFormat().
|
protected |
Definition at line 50 of file mailmodelapi.hxx.
Referenced by AttachDocument(), IsEmpty(), SfxBluetoothModel::SaveAndSend(), SaveAndSend(), SfxBluetoothModel::Send(), and Send().
|
private |
Definition at line 58 of file mailmodelapi.hxx.
Referenced by Send().
|
private |
Definition at line 57 of file mailmodelapi.hxx.
Referenced by AddToAddress(), and Send().