LibreOffice Module sfx2 (master) 1
mailmodelapi.hxx
Go to the documentation of this file.
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 INCLUDED_SFX2_MAILMODELAPI_HXX
20#define INCLUDED_SFX2_MAILMODELAPI_HXX
21
22#include <com/sun/star/uno/Reference.hxx>
23#include <rtl/ustring.hxx>
24#include <sfx2/dllapi.h>
25#include <vector>
26#include <string_view>
27#include <memory>
28
29namespace com::sun::star::beans { struct PropertyValue; }
30namespace com::sun::star::frame { class XFrame; }
31namespace com::sun::star::frame { class XModel; }
32namespace com::sun::star::lang { class XMultiServiceFactory; }
33namespace com::sun::star::uno { class XInterface; }
34namespace com::sun::star::uno { template <class E> class Sequence; }
35
36// class AddressList_Impl ------------------------------------------------
37typedef ::std::vector< OUString > AddressList_Impl;
38
39// class SfxMailModel_Impl -----------------------------------------------
40
42{
43protected:
45 {
48 SAVE_ERROR
49 };
50 ::std::vector< OUString > maAttachedDocuments;
51 static SaveResult SaveDocumentAsFormat( const OUString& aSaveFileName,
52 const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
53 const OUString& rType,
54 OUString& rFileNamePath );
55
56private:
57 std::unique_ptr<AddressList_Impl> mpToList;
58 OUString maFromAddress;
59
60 static SaveResult ShowFilterOptionsDialog( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR,
61 const css::uno::Reference< css::frame::XModel >& xModel,
62 const OUString& rFilterName,
63 std::u16string_view rType,
64 bool bModified,
65 sal_Int32& rNumArgs,
66 css::uno::Sequence< css::beans::PropertyValue >& rArgs );
67
68public:
70 {
73 SEND_MAIL_ERROR
74 };
75
78
79 void AddToAddress( const OUString& rAddress );
80
90 SendMailResult AttachDocument( const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
91 const OUString& sAttachmentTitle );
92
93 SendMailResult SaveAndSend( const css::uno::Reference< css::frame::XFrame >& xFrame,
94 const OUString& rType );
95 SendMailResult Send( const css::uno::Reference< css::frame::XFrame >& xFrame );
96
97 bool IsEmpty() const;
98};
99
100bool CreateFromAddress_Impl( OUString& rFrom );
101
102#endif // INCLUDED_SFX2_MAILMODELAPI_HXX
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< AddressList_Impl > mpToList
::std::vector< OUString > maAttachedDocuments
OUString maFromAddress
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
called to query another interface of the component @descr Will allow to query for XInteractionHandler...
::std::vector< OUString > AddressList_Impl
bool CreateFromAddress_Impl(OUString &rFrom)
Definition: mailmodel.cxx:800