LCOV - code coverage report
Current view: top level - sd/source/ui/dlg - RemoteDialog.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 24 0.0 %
Date: 2014-11-03 Functions: 0 7 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      10             : #include "sdattr.hxx"
      11             : #include "sdresid.hxx"
      12             : #include "cusshow.hxx"
      13             : 
      14             : #include "RemoteDialog.hxx"
      15             : #include "RemoteServer.hxx"
      16             : 
      17             : using namespace ::sd;
      18             : using namespace ::std;
      19             : 
      20           0 : RemoteDialog::RemoteDialog( vcl::Window *pWindow )
      21             :     : ModalDialog(pWindow, "RemoteDialog",
      22           0 :         "modules/simpress/ui/remotedialog.ui")
      23             : {
      24           0 :     get(m_pButtonConnect, "connect");
      25           0 :     get(m_pButtonClose, "close");
      26           0 :     get(m_pClientBox, "tree");
      27             : 
      28           0 :     m_pButtonConnect->SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) );
      29           0 :     SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) );
      30           0 :     m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) );
      31           0 : }
      32             : 
      33           0 : IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
      34             : {
      35             : //     setBusy( true );
      36             :     // Fixme: Try and connect
      37             : #if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH)
      38           0 :     long aSelected = m_pClientBox->GetActiveEntryIndex();
      39           0 :     if ( aSelected < 0 )
      40           0 :         return 1;
      41           0 :     TClientBoxEntry aEntry = m_pClientBox->GetEntryData(aSelected);
      42           0 :     OUString aPin ( m_pClientBox->getPin() );
      43           0 :     if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) )
      44             :     {
      45           0 :         return CloseHdl( 0 );
      46             :     }
      47             :     else
      48             :     {
      49           0 :         return 1;
      50           0 :     }
      51             : #else
      52             :     return 0;
      53             : #endif
      54             : }
      55             : 
      56           0 : IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
      57             : {
      58             : #ifdef ENABLE_SDREMOTE
      59           0 :     RemoteServer::restoreDiscoverable();
      60             : #endif
      61           0 :     Close();
      62           0 :     return 0;
      63           0 : }
      64             : 
      65             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10