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 <mutationevent.hxx>
21 : :
22 : : namespace DOM { namespace events
23 : : {
24 : 252974 : CMutationEvent::CMutationEvent()
25 : : : CMutationEvent_Base()
26 : 252974 : , m_attrChangeType(AttrChangeType_MODIFICATION)
27 : : {
28 : 252974 : }
29 : :
30 : 252974 : CMutationEvent::~CMutationEvent()
31 : : {
32 [ - + ]: 505948 : }
33 : :
34 : 126487 : Reference< XNode > SAL_CALL CMutationEvent::getRelatedNode() throw (RuntimeException)
35 : : {
36 [ + - ]: 126487 : ::osl::MutexGuard const g(m_Mutex);
37 [ + - ]: 126487 : return m_relatedNode;
38 : : }
39 : :
40 : 126487 : OUString SAL_CALL CMutationEvent::getPrevValue() throw (RuntimeException)
41 : : {
42 [ + - ]: 126487 : ::osl::MutexGuard const g(m_Mutex);
43 [ + - ]: 126487 : return m_prevValue;
44 : : }
45 : :
46 : 126487 : OUString SAL_CALL CMutationEvent::getNewValue() throw (RuntimeException)
47 : : {
48 [ + - ]: 126487 : ::osl::MutexGuard const g(m_Mutex);
49 [ + - ]: 126487 : return m_newValue;
50 : : }
51 : :
52 : 126487 : OUString SAL_CALL CMutationEvent::getAttrName() throw (RuntimeException)
53 : : {
54 [ + - ]: 126487 : ::osl::MutexGuard const g(m_Mutex);
55 [ + - ]: 126487 : return m_attrName;
56 : : }
57 : :
58 : 126487 : AttrChangeType SAL_CALL CMutationEvent::getAttrChange() throw (RuntimeException)
59 : : {
60 [ + - ]: 126487 : ::osl::MutexGuard const g(m_Mutex);
61 [ + - ]: 126487 : return m_attrChangeType;
62 : : }
63 : :
64 : 252974 : void SAL_CALL CMutationEvent::initMutationEvent(const OUString& typeArg,
65 : : sal_Bool canBubbleArg, sal_Bool cancelableArg,
66 : : const Reference< XNode >& relatedNodeArg, const OUString& prevValueArg,
67 : : const OUString& newValueArg, const OUString& attrNameArg,
68 : : AttrChangeType attrChangeArg) throw (RuntimeException)
69 : : {
70 [ + - ]: 252974 : ::osl::MutexGuard const g(m_Mutex);
71 : :
72 [ + - ]: 252974 : CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
73 [ + - ]: 252974 : m_relatedNode = relatedNodeArg;
74 : 252974 : m_prevValue = prevValueArg;
75 : 252974 : m_newValue = newValueArg;
76 : 252974 : m_attrName = attrNameArg;
77 [ + - ]: 252974 : m_attrChangeType = attrChangeArg;
78 : 252974 : }
79 : :
80 : : // delegate to CEvent, since we are inheriting from CEvent and XEvent
81 : 126487 : OUString SAL_CALL CMutationEvent::getType() throw (RuntimeException)
82 : : {
83 : 126487 : return CEvent::getType();
84 : : }
85 : :
86 : 0 : Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget() throw (RuntimeException)
87 : : {
88 : 0 : return CEvent::getTarget();
89 : : }
90 : :
91 : 126487 : Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget() throw (RuntimeException)
92 : : {
93 : 126487 : return CEvent::getCurrentTarget();
94 : : }
95 : :
96 : 0 : PhaseType SAL_CALL CMutationEvent::getEventPhase() throw (RuntimeException)
97 : : {
98 : 0 : return CEvent::getEventPhase();
99 : : }
100 : :
101 : 252974 : sal_Bool SAL_CALL CMutationEvent::getBubbles() throw (RuntimeException)
102 : : {
103 : 252974 : return CEvent::getBubbles();
104 : : }
105 : :
106 : 126487 : sal_Bool SAL_CALL CMutationEvent::getCancelable() throw (RuntimeException)
107 : : {
108 : 126487 : return CEvent::getCancelable();
109 : : }
110 : :
111 : 126487 : com::sun::star::util::Time SAL_CALL CMutationEvent::getTimeStamp() throw (RuntimeException)
112 : : {
113 : 126487 : return CEvent::getTimeStamp();
114 : : }
115 : :
116 : 0 : void SAL_CALL CMutationEvent::stopPropagation() throw (RuntimeException)
117 : : {
118 : 0 : CEvent::stopPropagation();
119 : 0 : }
120 : 0 : void SAL_CALL CMutationEvent::preventDefault() throw (RuntimeException)
121 : : {
122 : 0 : CEvent::preventDefault();
123 : 0 : }
124 : :
125 : 0 : void SAL_CALL CMutationEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
126 : : sal_Bool cancelableArg) throw (RuntimeException)
127 : : {
128 : : // base initializer
129 : 0 : CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
130 : 0 : }
131 : : }}
132 : :
133 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|