Bump version to 6.4-15
[LibreOffice.git] / unoxml / source / events / mutationevent.cxx
blobb0648a6de5a95020ef4fedb102b52afc864684d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <mutationevent.hxx>
22 using namespace css::uno;
23 using namespace css::xml::dom;
24 using namespace css::xml::dom::events;
26 namespace DOM { namespace events
28 CMutationEvent::CMutationEvent()
29 : CMutationEvent_Base()
30 , m_attrChangeType(AttrChangeType_MODIFICATION)
34 CMutationEvent::~CMutationEvent()
38 Reference< XNode > SAL_CALL CMutationEvent::getRelatedNode()
40 ::osl::MutexGuard const g(m_Mutex);
41 return m_relatedNode;
44 OUString SAL_CALL CMutationEvent::getPrevValue()
46 ::osl::MutexGuard const g(m_Mutex);
47 return m_prevValue;
50 OUString SAL_CALL CMutationEvent::getNewValue()
52 ::osl::MutexGuard const g(m_Mutex);
53 return m_newValue;
56 OUString SAL_CALL CMutationEvent::getAttrName()
58 ::osl::MutexGuard const g(m_Mutex);
59 return m_attrName;
62 AttrChangeType SAL_CALL CMutationEvent::getAttrChange()
64 ::osl::MutexGuard const g(m_Mutex);
65 return m_attrChangeType;
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)
74 ::osl::MutexGuard const g(m_Mutex);
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;
84 // delegate to CEvent, since we are inheriting from CEvent and XEvent
85 OUString SAL_CALL CMutationEvent::getType()
87 return CEvent::getType();
90 Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget()
92 return CEvent::getTarget();
95 Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget()
97 return CEvent::getCurrentTarget();
100 PhaseType SAL_CALL CMutationEvent::getEventPhase()
102 return CEvent::getEventPhase();
105 sal_Bool SAL_CALL CMutationEvent::getBubbles()
107 return CEvent::getBubbles();
110 sal_Bool SAL_CALL CMutationEvent::getCancelable()
112 return CEvent::getCancelable();
115 css::util::Time SAL_CALL CMutationEvent::getTimeStamp()
117 return CEvent::getTimeStamp();
120 void SAL_CALL CMutationEvent::stopPropagation()
122 CEvent::stopPropagation();
124 void SAL_CALL CMutationEvent::preventDefault()
126 CEvent::preventDefault();
129 void SAL_CALL CMutationEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
130 sal_Bool cancelableArg)
132 // base initializer
133 CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */