LibreOffice Module unoxml (master) 1
mutationevent.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 <mutationevent.hxx>
21
22using namespace css::uno;
23using namespace css::xml::dom;
24using namespace css::xml::dom::events;
25
26namespace DOM::events
27{
29 : m_attrChangeType(AttrChangeType_MODIFICATION)
30 {
31 }
32
34 {
35 }
36
37 Reference< XNode > SAL_CALL CMutationEvent::getRelatedNode()
38 {
39 std::unique_lock const g(m_Mutex);
40 return m_relatedNode;
41 }
42
43 OUString SAL_CALL CMutationEvent::getPrevValue()
44 {
45 std::unique_lock const g(m_Mutex);
46 return m_prevValue;
47 }
48
49 OUString SAL_CALL CMutationEvent::getNewValue()
50 {
51 std::unique_lock const g(m_Mutex);
52 return m_newValue;
53 }
54
55 OUString SAL_CALL CMutationEvent::getAttrName()
56 {
57 std::unique_lock const g(m_Mutex);
58 return m_attrName;
59 }
60
61 AttrChangeType SAL_CALL CMutationEvent::getAttrChange()
62 {
63 std::unique_lock const g(m_Mutex);
64 return m_attrChangeType;
65 }
66
67 void SAL_CALL CMutationEvent::initMutationEvent(const OUString& typeArg,
68 sal_Bool canBubbleArg, sal_Bool cancelableArg,
69 const Reference< XNode >& relatedNodeArg, const OUString& prevValueArg,
70 const OUString& newValueArg, const OUString& attrNameArg,
71 AttrChangeType attrChangeArg)
72 {
73 CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
74
75 std::unique_lock const g(m_Mutex);
76
77 m_relatedNode = relatedNodeArg;
78 m_prevValue = prevValueArg;
79 m_newValue = newValueArg;
80 m_attrName = attrNameArg;
81 m_attrChangeType = attrChangeArg;
82 }
83
84 // delegate to CEvent, since we are inheriting from CEvent and XEvent
85 OUString SAL_CALL CMutationEvent::getType()
86 {
87 return CEvent::getType();
88 }
89
90 Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget()
91 {
92 return CEvent::getTarget();
93 }
94
95 Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget()
96 {
98 }
99
100 PhaseType SAL_CALL CMutationEvent::getEventPhase()
101 {
102 return CEvent::getEventPhase();
103 }
104
106 {
107 return CEvent::getBubbles();
108 }
109
111 {
112 return CEvent::getCancelable();
113 }
114
115 css::util::Time SAL_CALL CMutationEvent::getTimeStamp()
116 {
117 return CEvent::getTimeStamp();
118 }
119
121 {
123 }
125 {
127 }
128
129 void SAL_CALL CMutationEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
130 sal_Bool cancelableArg)
131 {
132 // base initializer
133 CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
134 }
135}
136
137/* 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 sal_Bool SAL_CALL getCancelable() override
Definition: event.cxx:72
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 css::xml::dom::events::AttrChangeType SAL_CALL getAttrChange() override
virtual void SAL_CALL initMutationEvent(const OUString &typeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg, const css::uno::Reference< css::xml::dom::XNode > &relatedNodeArg, const OUString &prevValueArg, const OUString &newValueArg, const OUString &attrNameArg, css::xml::dom::events::AttrChangeType attrChangeArg) override
virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getCurrentTarget() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL getRelatedNode() override
virtual OUString SAL_CALL getPrevValue() override
virtual void SAL_CALL stopPropagation() override
virtual css::util::Time SAL_CALL getTimeStamp() override
virtual void SAL_CALL preventDefault() override
css::xml::dom::events::AttrChangeType m_attrChangeType
virtual sal_Bool SAL_CALL getBubbles() override
virtual css::xml::dom::events::PhaseType SAL_CALL getEventPhase() override
virtual css::uno::Reference< css::xml::dom::events::XEventTarget > SAL_CALL getTarget() override
virtual sal_Bool SAL_CALL getCancelable() override
virtual OUString SAL_CALL getNewValue() override
virtual OUString SAL_CALL getAttrName() override
virtual void SAL_CALL initEvent(const OUString &eventTypeArg, sal_Bool canBubbleArg, sal_Bool cancelableArg) override
virtual OUString SAL_CALL getType() override
css::uno::Reference< css::xml::dom::XNode > m_relatedNode
virtual ~CMutationEvent() override
unsigned char sal_Bool