LCOV - code coverage report
Current view: top level - unoxml/source/events - event.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 26 38 68.4 %
Date: 2014-04-11 Functions: 8 13 61.5 %
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 <event.hxx>
      21             : 
      22             : namespace DOM { namespace events
      23             : {
      24             : 
      25      341734 :     CEvent::CEvent()
      26             :         : m_canceled(sal_False)
      27             :         , m_phase(PhaseType_CAPTURING_PHASE)
      28             :         , m_bubbles(sal_False)
      29      341734 :         , m_cancelable(sal_True)
      30             :     {
      31      341734 :     }
      32             : 
      33      341734 :     CEvent::~CEvent()
      34             :     {
      35      341734 :     }
      36             : 
      37      170867 :     OUString SAL_CALL CEvent::getType() throw (RuntimeException, std::exception)
      38             :     {
      39      170867 :         ::osl::MutexGuard const g(m_Mutex);
      40      170867 :         return m_eventType;
      41             :     }
      42             : 
      43             :     Reference< XEventTarget > SAL_CALL
      44           0 :     CEvent::getTarget() throw (RuntimeException, std::exception)
      45             :     {
      46           0 :         ::osl::MutexGuard const g(m_Mutex);
      47           0 :         return m_target;
      48             :     }
      49             : 
      50             :     Reference< XEventTarget > SAL_CALL
      51      170867 :     CEvent::getCurrentTarget() throw (RuntimeException, std::exception)
      52             :     {
      53      170867 :         ::osl::MutexGuard const g(m_Mutex);
      54      170867 :         return m_currentTarget;
      55             :     }
      56             : 
      57           0 :     PhaseType SAL_CALL CEvent::getEventPhase() throw (RuntimeException, std::exception)
      58             :     {
      59           0 :         ::osl::MutexGuard const g(m_Mutex);
      60           0 :         return m_phase;
      61             :     }
      62             : 
      63      341734 :     sal_Bool SAL_CALL CEvent::getBubbles() throw (RuntimeException, std::exception)
      64             :     {
      65      341734 :         ::osl::MutexGuard const g(m_Mutex);
      66      341734 :         return m_bubbles;
      67             :     }
      68             : 
      69      170867 :     sal_Bool SAL_CALL CEvent::getCancelable() throw (RuntimeException, std::exception)
      70             :     {
      71      170867 :         ::osl::MutexGuard const g(m_Mutex);
      72      170867 :         return m_cancelable;
      73             :     }
      74             : 
      75             :     com::sun::star::util::Time SAL_CALL
      76      170867 :     CEvent::getTimeStamp() throw (RuntimeException, std::exception)
      77             :     {
      78      170867 :         ::osl::MutexGuard const g(m_Mutex);
      79      170867 :         return m_time;
      80             :     }
      81             : 
      82           0 :     void SAL_CALL CEvent::stopPropagation() throw (RuntimeException, std::exception)
      83             :     {
      84           0 :         ::osl::MutexGuard const g(m_Mutex);
      85           0 :         if (m_cancelable) { m_canceled = sal_True; }
      86           0 :     }
      87             : 
      88           0 :     void SAL_CALL CEvent::preventDefault() throw (RuntimeException, std::exception)
      89             :     {
      90           0 :     }
      91             : 
      92             :     void SAL_CALL
      93      341734 :     CEvent::initEvent(OUString const& eventTypeArg, sal_Bool canBubbleArg,
      94             :         sal_Bool cancelableArg) throw (RuntimeException, std::exception)
      95             :     {
      96      341734 :         ::osl::MutexGuard const g(m_Mutex);
      97             : 
      98      341734 :         m_eventType = eventTypeArg;
      99      341734 :         m_bubbles = canBubbleArg;
     100      341734 :         m_cancelable = cancelableArg;
     101      341734 :     }
     102             : 
     103             : }}
     104             : 
     105             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10