1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #include <com/sun/star/frame/XFrame.hpp>
14 #include <bluthsndapi.hxx>
16 SfxBluetoothModel::SendMailResult
SfxBluetoothModel::SaveAndSend( const css::uno::Reference
< css::frame::XFrame
>& xFrame
)
18 SaveResult eSaveResult
;
19 SendMailResult eResult
= SEND_MAIL_ERROR
;
22 eSaveResult
= SaveDocumentAsFormat( OUString(), xFrame
, OUString(), aFileName
);
23 if( eSaveResult
== SAVE_SUCCESSFUL
)
25 maAttachedDocuments
.push_back( aFileName
);
28 else if( eSaveResult
== SAVE_CANCELLED
)
29 eResult
= SEND_MAIL_CANCELLED
;
34 SfxBluetoothModel::SendMailResult
SfxBluetoothModel::Send()
37 (void) this; // avoid loplugin:staticmethods
38 return SEND_MAIL_ERROR
;
41 SendMailResult eResult
= SEND_MAIL_OK
;
42 OUString aFileName
= maAttachedDocuments
[0];
43 snprintf(bthsend
,300,"bluetooth-sendto %s",OUStringToOString( aFileName
, RTL_TEXTENCODING_UTF8
).getStr() );
44 if( !system( bthsend
) )
45 eResult
= SEND_MAIL_ERROR
;
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */