LCOV - code coverage report
Current view: top level - unoxml/source/events - event.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 26 38 68.4 %
Date: 2012-08-25 Functions: 8 13 61.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 15 44 34.1 %

           Branch data     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                 :     252974 :     CEvent::CEvent()
      26                 :            :         : m_canceled(sal_False)
      27                 :            :         , m_phase(PhaseType_CAPTURING_PHASE)
      28                 :            :         , m_bubbles(sal_False)
      29         [ +  - ]:     252974 :         , m_cancelable(sal_True)
      30                 :            :     {
      31                 :     252974 :     }
      32                 :            : 
      33         [ +  - ]:     252974 :     CEvent::~CEvent()
      34                 :            :     {
      35         [ -  + ]:     252974 :     }
      36                 :            : 
      37                 :     126487 :     OUString SAL_CALL CEvent::getType() throw (RuntimeException)
      38                 :            :     {
      39         [ +  - ]:     126487 :         ::osl::MutexGuard const g(m_Mutex);
      40         [ +  - ]:     126487 :         return m_eventType;
      41                 :            :     }
      42                 :            : 
      43                 :            :     Reference< XEventTarget > SAL_CALL
      44                 :          0 :     CEvent::getTarget() throw (RuntimeException)
      45                 :            :     {
      46         [ #  # ]:          0 :         ::osl::MutexGuard const g(m_Mutex);
      47         [ #  # ]:          0 :         return m_target;
      48                 :            :     }
      49                 :            : 
      50                 :            :     Reference< XEventTarget > SAL_CALL
      51                 :     126487 :     CEvent::getCurrentTarget() throw (RuntimeException)
      52                 :            :     {
      53         [ +  - ]:     126487 :         ::osl::MutexGuard const g(m_Mutex);
      54         [ +  - ]:     126487 :         return m_currentTarget;
      55                 :            :     }
      56                 :            : 
      57                 :          0 :     PhaseType SAL_CALL CEvent::getEventPhase() throw (RuntimeException)
      58                 :            :     {
      59         [ #  # ]:          0 :         ::osl::MutexGuard const g(m_Mutex);
      60         [ #  # ]:          0 :         return m_phase;
      61                 :            :     }
      62                 :            : 
      63                 :     252974 :     sal_Bool SAL_CALL CEvent::getBubbles() throw (RuntimeException)
      64                 :            :     {
      65         [ +  - ]:     252974 :         ::osl::MutexGuard const g(m_Mutex);
      66         [ +  - ]:     252974 :         return m_bubbles;
      67                 :            :     }
      68                 :            : 
      69                 :     126487 :     sal_Bool SAL_CALL CEvent::getCancelable() throw (RuntimeException)
      70                 :            :     {
      71         [ +  - ]:     126487 :         ::osl::MutexGuard const g(m_Mutex);
      72         [ +  - ]:     126487 :         return m_cancelable;
      73                 :            :     }
      74                 :            : 
      75                 :            :     com::sun::star::util::Time SAL_CALL
      76                 :     126487 :     CEvent::getTimeStamp() throw (RuntimeException)
      77                 :            :     {
      78         [ +  - ]:     126487 :         ::osl::MutexGuard const g(m_Mutex);
      79         [ +  - ]:     126487 :         return m_time;
      80                 :            :     }
      81                 :            : 
      82                 :          0 :     void SAL_CALL CEvent::stopPropagation() throw (RuntimeException)
      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)
      89                 :            :     {
      90                 :          0 :     }
      91                 :            : 
      92                 :            :     void SAL_CALL
      93                 :     252974 :     CEvent::initEvent(OUString const& eventTypeArg, sal_Bool canBubbleArg,
      94                 :            :         sal_Bool cancelableArg) throw (RuntimeException)
      95                 :            :     {
      96         [ +  - ]:     252974 :         ::osl::MutexGuard const g(m_Mutex);
      97                 :            : 
      98                 :     252974 :         m_eventType = eventTypeArg;
      99                 :     252974 :         m_bubbles = canBubbleArg;
     100         [ +  - ]:     252974 :         m_cancelable = cancelableArg;
     101                 :     252974 :     }
     102                 :            : 
     103                 :            : }}
     104                 :            : 
     105                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10