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

Generated by: LCOV version 1.10