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