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 using namespace css::uno;
23 using namespace css::xml::dom;
24 using namespace css::xml::dom::events;
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()
39     {
40         ::osl::MutexGuard const g(m_Mutex);
41         return m_relatedNode;
42     }
43 
getPrevValue()44     OUString SAL_CALL CMutationEvent::getPrevValue()
45     {
46         ::osl::MutexGuard const g(m_Mutex);
47         return m_prevValue;
48     }
49 
getNewValue()50     OUString SAL_CALL CMutationEvent::getNewValue()
51     {
52         ::osl::MutexGuard const g(m_Mutex);
53         return m_newValue;
54     }
55 
getAttrName()56     OUString SAL_CALL CMutationEvent::getAttrName()
57     {
58         ::osl::MutexGuard const g(m_Mutex);
59         return m_attrName;
60     }
61 
getAttrChange()62     AttrChangeType SAL_CALL CMutationEvent::getAttrChange()
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)
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()
86     {
87         return CEvent::getType();
88     }
89 
getTarget()90     Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget()
91     {
92         return CEvent::getTarget();
93     }
94 
getCurrentTarget()95     Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget()
96     {
97         return CEvent::getCurrentTarget();
98     }
99 
getEventPhase()100     PhaseType SAL_CALL CMutationEvent::getEventPhase()
101     {
102         return CEvent::getEventPhase();
103     }
104 
getBubbles()105     sal_Bool SAL_CALL CMutationEvent::getBubbles()
106     {
107         return CEvent::getBubbles();
108     }
109 
getCancelable()110     sal_Bool SAL_CALL CMutationEvent::getCancelable()
111     {
112         return CEvent::getCancelable();
113     }
114 
getTimeStamp()115     css::util::Time SAL_CALL CMutationEvent::getTimeStamp()
116     {
117         return CEvent::getTimeStamp();
118     }
119 
stopPropagation()120     void SAL_CALL CMutationEvent::stopPropagation()
121     {
122         CEvent::stopPropagation();
123     }
preventDefault()124     void SAL_CALL CMutationEvent::preventDefault()
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)
131     {
132         // base initializer
133         CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
134     }
135 }}
136 
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
138