1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include <mutationevent.hxx>
25 
26 namespace DOM { namespace events
27 {
CMutationEvent()28     CMutationEvent::CMutationEvent()
29         : CMutationEvent_Base()
30         , m_attrChangeType(AttrChangeType_MODIFICATION)
31     {
32     }
33 
~CMutationEvent()34     CMutationEvent::~CMutationEvent()
35     {
36     }
37 
getRelatedNode()38     Reference< XNode > SAL_CALL CMutationEvent::getRelatedNode() throw (RuntimeException)
39     {
40         ::osl::MutexGuard const g(m_Mutex);
41         return m_relatedNode;
42     }
43 
getPrevValue()44     OUString SAL_CALL CMutationEvent::getPrevValue() throw (RuntimeException)
45     {
46         ::osl::MutexGuard const g(m_Mutex);
47         return m_prevValue;
48     }
49 
getNewValue()50     OUString SAL_CALL CMutationEvent::getNewValue() throw (RuntimeException)
51     {
52         ::osl::MutexGuard const g(m_Mutex);
53         return m_newValue;
54     }
55 
getAttrName()56     OUString SAL_CALL CMutationEvent::getAttrName() throw (RuntimeException)
57     {
58         ::osl::MutexGuard const g(m_Mutex);
59         return m_attrName;
60     }
61 
getAttrChange()62     AttrChangeType SAL_CALL CMutationEvent::getAttrChange() throw (RuntimeException)
63     {
64         ::osl::MutexGuard const g(m_Mutex);
65         return m_attrChangeType;
66     }
67 
initMutationEvent(const OUString & typeArg,sal_Bool canBubbleArg,sal_Bool cancelableArg,const Reference<XNode> & relatedNodeArg,const OUString & prevValueArg,const OUString & newValueArg,const OUString & attrNameArg,AttrChangeType attrChangeArg)68     void SAL_CALL CMutationEvent::initMutationEvent(const OUString& typeArg,
69         sal_Bool canBubbleArg, sal_Bool cancelableArg,
70         const Reference< XNode >& relatedNodeArg, const OUString& prevValueArg,
71         const OUString& newValueArg, const OUString& attrNameArg,
72         AttrChangeType attrChangeArg) throw (RuntimeException)
73     {
74         ::osl::MutexGuard const g(m_Mutex);
75 
76         CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
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
getType()85     OUString SAL_CALL CMutationEvent::getType() throw (RuntimeException)
86     {
87         return CEvent::getType();
88     }
89 
getTarget()90     Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget() throw (RuntimeException)
91     {
92         return CEvent::getTarget();
93     }
94 
getCurrentTarget()95     Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget() throw (RuntimeException)
96     {
97         return CEvent::getCurrentTarget();
98     }
99 
getEventPhase()100     PhaseType SAL_CALL CMutationEvent::getEventPhase() throw (RuntimeException)
101     {
102         return CEvent::getEventPhase();
103     }
104 
getBubbles()105     sal_Bool SAL_CALL CMutationEvent::getBubbles() throw (RuntimeException)
106     {
107         return CEvent::getBubbles();
108     }
109 
getCancelable()110     sal_Bool SAL_CALL CMutationEvent::getCancelable() throw (RuntimeException)
111     {
112         return CEvent::getCancelable();
113     }
114 
getTimeStamp()115     com::sun::star::util::Time SAL_CALL CMutationEvent::getTimeStamp() throw (RuntimeException)
116     {
117         return CEvent::getTimeStamp();
118     }
119 
stopPropagation()120     void SAL_CALL CMutationEvent::stopPropagation() throw (RuntimeException)
121     {
122         CEvent::stopPropagation();
123     }
preventDefault()124     void SAL_CALL CMutationEvent::preventDefault() throw (RuntimeException)
125     {
126         CEvent::preventDefault();
127     }
128 
initEvent(const OUString & eventTypeArg,sal_Bool canBubbleArg,sal_Bool cancelableArg)129     void SAL_CALL CMutationEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
130         sal_Bool cancelableArg) throw (RuntimeException)
131     {
132         // base initializer
133         CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
134     }
135 }}
136 
137