LCOV - code coverage report
Current view: top level - libreoffice/vcl/source/app - dndhelp.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 13 79 16.5 %
Date: 2012-12-27 Functions: 6 29 20.7 %
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             :  * 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             : 
      20             : #include <vcl/dndhelp.hxx>
      21             : 
      22             : using namespace ::com::sun::star;
      23             : 
      24          80 : vcl::unohelper::DragAndDropClient::~DragAndDropClient() {}
      25             : 
      26           0 : void vcl::unohelper::DragAndDropClient::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& /*dge*/ ) throw (::com::sun::star::uno::RuntimeException)
      27             : {
      28           0 : }
      29             : 
      30           0 : void vcl::unohelper::DragAndDropClient::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& /*dsde*/ ) throw (::com::sun::star::uno::RuntimeException)
      31             : {
      32           0 : }
      33             : 
      34           0 : void vcl::unohelper::DragAndDropClient::dragEnter( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& /*dsde*/ ) throw (::com::sun::star::uno::RuntimeException)
      35             : {
      36           0 : }
      37             : 
      38           0 : void vcl::unohelper::DragAndDropClient::dragExit( const ::com::sun::star::datatransfer::dnd::DragSourceEvent& /*dse*/ ) throw (::com::sun::star::uno::RuntimeException)
      39             : {
      40           0 : }
      41             : 
      42           0 : void vcl::unohelper::DragAndDropClient::dragOver( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& /*dsde*/ ) throw (::com::sun::star::uno::RuntimeException)
      43             : {
      44           0 : }
      45             : 
      46           0 : void vcl::unohelper::DragAndDropClient::dropActionChanged( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& /*dsde*/ ) throw (::com::sun::star::uno::RuntimeException)
      47             : {
      48           0 : }
      49             : 
      50           0 : void vcl::unohelper::DragAndDropClient::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& /*dtde*/ ) throw (::com::sun::star::uno::RuntimeException)
      51             : {
      52           0 : }
      53             : 
      54           0 : void vcl::unohelper::DragAndDropClient::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& /*dtdee*/ ) throw (::com::sun::star::uno::RuntimeException)
      55             : {
      56           0 : }
      57             : 
      58           0 : void vcl::unohelper::DragAndDropClient::dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& /*dte*/ ) throw (::com::sun::star::uno::RuntimeException)
      59             : {
      60           0 : }
      61             : 
      62           0 : void vcl::unohelper::DragAndDropClient::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& /*dtde*/ ) throw (::com::sun::star::uno::RuntimeException)
      63             : {
      64           0 : }
      65             : 
      66           0 : void vcl::unohelper::DragAndDropClient::dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& /*dtde*/ ) throw (::com::sun::star::uno::RuntimeException)
      67             : {
      68           0 : }
      69             : 
      70             : // =======================================================================
      71             : 
      72         262 : vcl::unohelper::DragAndDropWrapper::DragAndDropWrapper( DragAndDropClient* pClient )
      73             : {
      74         262 :     mpClient = pClient;
      75         262 : }
      76             : 
      77         160 : vcl::unohelper::DragAndDropWrapper::~DragAndDropWrapper()
      78             : {
      79         160 : }
      80             : 
      81             : // uno::XInterface
      82         761 : uno::Any vcl::unohelper::DragAndDropWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
      83             : {
      84             :     uno::Any aRet = ::cppu::queryInterface( rType,
      85             :                             (static_cast< ::com::sun::star::lang::XEventListener* >( (::com::sun::star::datatransfer::dnd::XDragGestureListener*)this) ),
      86             :                             (static_cast< ::com::sun::star::datatransfer::dnd::XDragGestureListener* >(this)),
      87             :                             (static_cast< ::com::sun::star::datatransfer::dnd::XDragSourceListener* >(this)),
      88         761 :                             (static_cast< ::com::sun::star::datatransfer::dnd::XDropTargetListener* >(this)) );
      89         761 :     return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
      90             : }
      91             : 
      92             : // ::com::sun::star::lang::XEventListener
      93          83 : void vcl::unohelper::DragAndDropWrapper::disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw (::com::sun::star::uno::RuntimeException)
      94             : {
      95             :     // Empty Source means it's the client, because the client is not a XInterface
      96          83 :     if ( !rEvent.Source.is() )
      97          77 :         mpClient = NULL;
      98          83 : }
      99             : 
     100             : 
     101             : // ::com::sun::star::datatransfer::dnd::XDragGestureListener
     102           0 : void vcl::unohelper::DragAndDropWrapper::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& rDGE ) throw (::com::sun::star::uno::RuntimeException)
     103             : {
     104           0 :     if ( mpClient )
     105           0 :         mpClient->dragGestureRecognized( rDGE );
     106           0 : }
     107             : 
     108             : // ::com::sun::star::datatransfer::dnd::XDragSourceListener
     109           0 : void vcl::unohelper::DragAndDropWrapper::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& rDSDE ) throw (::com::sun::star::uno::RuntimeException)
     110             : {
     111           0 :     if ( mpClient )
     112           0 :         mpClient->dragDropEnd( rDSDE );
     113           0 : }
     114             : 
     115           0 : void vcl::unohelper::DragAndDropWrapper::dragEnter( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException)
     116             : {
     117           0 :     if ( mpClient )
     118           0 :         mpClient->dragEnter( dsde );
     119           0 : }
     120             : 
     121           0 : void vcl::unohelper::DragAndDropWrapper::dragExit( const ::com::sun::star::datatransfer::dnd::DragSourceEvent& dse ) throw (::com::sun::star::uno::RuntimeException)
     122             : {
     123           0 :     if ( mpClient )
     124           0 :         mpClient->dragExit( dse );
     125           0 : }
     126             : 
     127           0 : void vcl::unohelper::DragAndDropWrapper::dragOver( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException)
     128             : {
     129           0 :     if ( mpClient )
     130           0 :         mpClient->dragOver( dsde );
     131           0 : }
     132             : 
     133           0 : void vcl::unohelper::DragAndDropWrapper::dropActionChanged( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException)
     134             : {
     135           0 :     if ( mpClient )
     136           0 :         mpClient->dropActionChanged( dsde );
     137           0 : }
     138             : 
     139             : // ::com::sun::star::datatransfer::dnd::XDropTargetListener
     140           0 : void vcl::unohelper::DragAndDropWrapper::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
     141             : {
     142           0 :     if ( mpClient )
     143           0 :         mpClient->drop( rDTDE );
     144           0 : }
     145             : 
     146           0 : void vcl::unohelper::DragAndDropWrapper::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& rDTDEE ) throw (::com::sun::star::uno::RuntimeException)
     147             : {
     148           0 :     if ( mpClient )
     149           0 :         mpClient->dragEnter( rDTDEE );
     150           0 : }
     151             : 
     152           0 : void vcl::unohelper::DragAndDropWrapper::dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw (::com::sun::star::uno::RuntimeException)
     153             : {
     154           0 :     if ( mpClient )
     155           0 :         mpClient->dragExit( dte );
     156           0 : }
     157             : 
     158           0 : void vcl::unohelper::DragAndDropWrapper::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
     159             : {
     160           0 :     if ( mpClient )
     161           0 :         mpClient->dragOver( rDTDE );
     162           0 : }
     163             : 
     164           0 : void vcl::unohelper::DragAndDropWrapper::dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException)
     165             : {
     166           0 :     if ( mpClient )
     167           0 :         mpClient->dropActionChanged( rDTDE );
     168           0 : }
     169             : 
     170             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10