summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-07-24 15:31:15 +0530
committerMuthu Subramanian <sumuthu@suse.com>2012-07-24 15:39:06 +0530
commit1360309e64f8bbb21e23c94a65ada4aa282e1eb3 (patch)
treeda856e803d4d1fca3129b287c9163fb08a539ea7 /sfx2/source/view
parent5a243f140975167aa5c42c95b30edb1cdb1ea639 (diff)
"Send via Bluetooth" (experimental) feature.
This currently works only on Linux as of now.
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/viewsh.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 6686b09df463..e1d0210c70e5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -67,6 +67,7 @@
#include "sfxlocal.hrc"
#include <sfx2/sfxbasecontroller.hxx>
#include "sfx2/mailmodelapi.hxx"
+#include "bluthsndapi.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/event.hxx>
#include <sfx2/fcontnr.hxx>
@@ -595,6 +596,26 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
break;
}
+ case SID_BLUETOOTH_SENDDOC:
+ {
+ SfxBluetoothModel aModel;
+ SfxObjectShell* pDoc = GetObjectShell();
+ if ( pDoc && pDoc->QueryHiddenInformation(
+ WhenSaving, &GetViewFrame()->GetWindow() ) != RET_YES )
+ break;
+ uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, rtl::OUString() );
+ if( eResult == SfxMailModel::SEND_MAIL_ERROR )
+ {
+ InfoBox aBox( SFX_APP()->GetTopWindow(), SfxResId( MSG_ERROR_SEND_MAIL ));
+ aBox.Execute();
+ rReq.Ignore();
+ }
+ else
+ rReq.Done();
+ }
+ break;
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_WEBHTML:
{