Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/unoxml/source/events/uievent.cxx
Line
Count
Source
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 <uievent.hxx>
21
22
using namespace css::uno;
23
using namespace css::xml::dom::events;
24
using namespace css::xml::dom::views;
25
26
namespace DOM::events
27
{
28
    CUIEvent::CUIEvent()
29
0
        : m_detail(0)
30
0
    {
31
0
    }
32
33
    Reference< XAbstractView > SAL_CALL
34
    CUIEvent::getView()
35
0
    {
36
0
        std::unique_lock const g(m_Mutex);
37
0
        return m_view;
38
0
    }
39
40
    sal_Int32 SAL_CALL CUIEvent::getDetail()
41
0
    {
42
0
        std::unique_lock const g(m_Mutex);
43
0
        return m_detail;
44
0
    }
45
46
    void SAL_CALL CUIEvent::initUIEvent(const OUString& typeArg,
47
                     sal_Bool canBubbleArg,
48
                     sal_Bool cancelableArg,
49
                     const Reference< XAbstractView >& viewArg,
50
                     sal_Int32 detailArg)
51
0
    {
52
0
        CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
53
0
        std::unique_lock const g(m_Mutex);
54
0
        m_view = viewArg;
55
0
        m_detail = detailArg;
56
0
    }
57
58
59
    // delegate to CEvent, since we are inheriting from CEvent and XEvent
60
    OUString SAL_CALL CUIEvent::getType()
61
0
    {
62
0
        return CEvent::getType();
63
0
    }
64
65
    Reference< XEventTarget > SAL_CALL CUIEvent::getTarget()
66
0
    {
67
0
        return CEvent::getTarget();
68
0
    }
69
70
    Reference< XEventTarget > SAL_CALL CUIEvent::getCurrentTarget()
71
0
    {
72
0
        return CEvent::getCurrentTarget();
73
0
    }
74
75
    PhaseType SAL_CALL CUIEvent::getEventPhase()
76
0
    {
77
0
        return CEvent::getEventPhase();
78
0
    }
79
80
    sal_Bool SAL_CALL CUIEvent::getBubbles()
81
0
    {
82
0
        return CEvent::getBubbles();
83
0
    }
84
85
    sal_Bool SAL_CALL CUIEvent::getCancelable()
86
0
    {
87
        // mutation events cannot be canceled
88
0
        return false;
89
0
    }
90
91
    css::util::Time SAL_CALL CUIEvent::getTimeStamp()
92
0
    {
93
0
        return CEvent::getTimeStamp();
94
0
    }
95
96
    void SAL_CALL CUIEvent::stopPropagation()
97
0
    {
98
0
        CEvent::stopPropagation();
99
0
    }
100
    void SAL_CALL CUIEvent::preventDefault()
101
0
    {
102
0
        CEvent::preventDefault();
103
0
    }
104
105
    void SAL_CALL CUIEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
106
        sal_Bool cancelableArg)
107
0
    {
108
        // base initializer
109
0
        CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
110
0
    }
111
}
112
113
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */