LCOV - code coverage report
Current view: top level - include/vcl - dndhelp.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 3 3 100.0 %
Date: 2015-06-13 12:38:46 Functions: 3 3 100.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             :  * 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             : #ifndef INCLUDED_VCL_DNDHELP_HXX
      21             : #define INCLUDED_VCL_DNDHELP_HXX
      22             : 
      23             : #include <vcl/dllapi.h>
      24             : #include <cppuhelper/weak.hxx>
      25             : #include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
      26             : #include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
      27             : #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
      28             : 
      29             : namespace com {
      30             : namespace sun {
      31             : namespace star {
      32             : 
      33             : namespace datatransfer {
      34             : namespace dnd {
      35             :     struct DragGestureEvent;
      36             :     struct DragSourceDragEvent;
      37             :     struct DragSourceDropEvent;
      38             :     struct DragSourceEvent;
      39             :     struct DropTargetDragEvent;
      40             :     struct DropTargetDragEnterEvent;
      41             :     struct DropTargetDropEvent;
      42             :     struct DropTargetEvent;
      43             : }}
      44             : 
      45             : }}}
      46             : 
      47             : namespace vcl
      48             : {
      49             : 
      50             : namespace unohelper
      51             : {
      52             : 
      53       14291 : class VCL_DLLPUBLIC DragAndDropClient
      54             : {
      55             : public:
      56             :     virtual ~DragAndDropClient();
      57             : 
      58             :     // ::com::sun::star::datatransfer::dnd::XDragGestureListener
      59             :     virtual void dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge )
      60             :         throw (::com::sun::star::uno::RuntimeException,
      61             :                std::exception);
      62             : 
      63             :     // ::com::sun::star::datatransfer::dnd::XDragSourceListener
      64             :     virtual void dragDropEnd(const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& dsde )
      65             :         throw (::com::sun::star::uno::RuntimeException,
      66             :                std::exception);
      67             : 
      68             :     // ::com::sun::star::datatransfer::dnd::XDropTargetListener
      69             :     virtual void drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde )
      70             :         throw (::com::sun::star::uno::RuntimeException,
      71             :                std::exception);
      72             :     virtual void dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtdee )
      73             :         throw (::com::sun::star::uno::RuntimeException,
      74             :                std::exception);
      75             :     virtual void dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte )
      76             :         throw (::com::sun::star::uno::RuntimeException,
      77             :                std::exception);
      78             :     virtual void dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde )
      79             :         throw (::com::sun::star::uno::RuntimeException,
      80             :                std::exception);
      81             : };
      82             : 
      83             : class VCL_DLLPUBLIC DragAndDropWrapper :
      84             :                             public ::com::sun::star::datatransfer::dnd::XDragGestureListener,
      85             :                             public ::com::sun::star::datatransfer::dnd::XDragSourceListener,
      86             :                             public ::com::sun::star::datatransfer::dnd::XDropTargetListener,
      87             :                             public ::cppu::OWeakObject
      88             : {
      89             : private:
      90             :     DragAndDropClient* mpClient;
      91             : 
      92             : public:
      93             :                     DragAndDropWrapper( DragAndDropClient* pClient );
      94             :                     virtual ~DragAndDropWrapper();
      95             : 
      96             :     // ::com::sun::star::uno::XInterface
      97             :     ::com::sun::star::uno::Any                  SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      98      213755 :     void                                        SAL_CALL acquire() throw() SAL_OVERRIDE  { OWeakObject::acquire(); }
      99      213719 :     void                                        SAL_CALL release() throw() SAL_OVERRIDE  { OWeakObject::release(); }
     100             : 
     101             :     // ::com::sun::star::lang::XEventListener
     102             :     void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     103             : 
     104             :     // ::com::sun::star::datatransfer::dnd::XDragGestureListener
     105             :     void SAL_CALL dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     106             : 
     107             :     // ::com::sun::star::datatransfer::dnd::XDragSourceListener
     108             :     void SAL_CALL dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& dsde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     109             :     void SAL_CALL dragEnter( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     110             :     void SAL_CALL dragExit( const ::com::sun::star::datatransfer::dnd::DragSourceEvent& dse ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     111             :     void SAL_CALL dragOver( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     112             :     void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DragSourceDragEvent& dsde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     113             : 
     114             :     // ::com::sun::star::datatransfer::dnd::XDropTargetListener
     115             :     void SAL_CALL drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             :     void SAL_CALL dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             :     void SAL_CALL dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     118             :     void SAL_CALL dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     119             :     void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     120             : };
     121             : 
     122             : }}  // namespace vcl::unohelper
     123             : 
     124             : #endif // INCLUDED_VCL_DNDHELP_HXX
     125             : 
     126             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11