Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / unoxml / source / events / mutationevent.cxx
bloba0cf02107e1db4c6cadaaf4b6e6e45014b489a65
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include <mutationevent.hxx>
31 namespace DOM { namespace events
33 CMutationEvent::CMutationEvent()
34 : CMutationEvent_Base()
35 , m_attrChangeType(AttrChangeType_MODIFICATION)
39 CMutationEvent::~CMutationEvent()
43 Reference< XNode > SAL_CALL CMutationEvent::getRelatedNode() throw (RuntimeException)
45 ::osl::MutexGuard const g(m_Mutex);
46 return m_relatedNode;
49 OUString SAL_CALL CMutationEvent::getPrevValue() throw (RuntimeException)
51 ::osl::MutexGuard const g(m_Mutex);
52 return m_prevValue;
55 OUString SAL_CALL CMutationEvent::getNewValue() throw (RuntimeException)
57 ::osl::MutexGuard const g(m_Mutex);
58 return m_newValue;
61 OUString SAL_CALL CMutationEvent::getAttrName() throw (RuntimeException)
63 ::osl::MutexGuard const g(m_Mutex);
64 return m_attrName;
67 AttrChangeType SAL_CALL CMutationEvent::getAttrChange() throw (RuntimeException)
69 ::osl::MutexGuard const g(m_Mutex);
70 return m_attrChangeType;
73 void SAL_CALL CMutationEvent::initMutationEvent(const OUString& typeArg,
74 sal_Bool canBubbleArg, sal_Bool cancelableArg,
75 const Reference< XNode >& relatedNodeArg, const OUString& prevValueArg,
76 const OUString& newValueArg, const OUString& attrNameArg,
77 AttrChangeType attrChangeArg) throw (RuntimeException)
79 ::osl::MutexGuard const g(m_Mutex);
81 CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
82 m_relatedNode = relatedNodeArg;
83 m_prevValue = prevValueArg;
84 m_newValue = newValueArg;
85 m_attrName = attrNameArg;
86 m_attrChangeType = attrChangeArg;
89 // delegate to CEvent, since we are inheriting from CEvent and XEvent
90 OUString SAL_CALL CMutationEvent::getType() throw (RuntimeException)
92 return CEvent::getType();
95 Reference< XEventTarget > SAL_CALL CMutationEvent::getTarget() throw (RuntimeException)
97 return CEvent::getTarget();
100 Reference< XEventTarget > SAL_CALL CMutationEvent::getCurrentTarget() throw (RuntimeException)
102 return CEvent::getCurrentTarget();
105 PhaseType SAL_CALL CMutationEvent::getEventPhase() throw (RuntimeException)
107 return CEvent::getEventPhase();
110 sal_Bool SAL_CALL CMutationEvent::getBubbles() throw (RuntimeException)
112 return CEvent::getBubbles();
115 sal_Bool SAL_CALL CMutationEvent::getCancelable() throw (RuntimeException)
117 return CEvent::getCancelable();
120 com::sun::star::util::Time SAL_CALL CMutationEvent::getTimeStamp() throw (RuntimeException)
122 return CEvent::getTimeStamp();
125 void SAL_CALL CMutationEvent::stopPropagation() throw (RuntimeException)
127 CEvent::stopPropagation();
129 void SAL_CALL CMutationEvent::preventDefault() throw (RuntimeException)
131 CEvent::preventDefault();
134 void SAL_CALL CMutationEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
135 sal_Bool cancelableArg) throw (RuntimeException)
137 // base initializer
138 CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */