bump product version to 4.1.6.2
[LibreOffice.git] / unoxml / source / events / event.cxx
blob316d19a32ac508bd405730f9f6de8e7682866e05
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 <event.hxx>
22 namespace DOM { namespace events
25 CEvent::CEvent()
26 : m_canceled(sal_False)
27 , m_phase(PhaseType_CAPTURING_PHASE)
28 , m_bubbles(sal_False)
29 , m_cancelable(sal_True)
33 CEvent::~CEvent()
37 OUString SAL_CALL CEvent::getType() throw (RuntimeException)
39 ::osl::MutexGuard const g(m_Mutex);
40 return m_eventType;
43 Reference< XEventTarget > SAL_CALL
44 CEvent::getTarget() throw (RuntimeException)
46 ::osl::MutexGuard const g(m_Mutex);
47 return m_target;
50 Reference< XEventTarget > SAL_CALL
51 CEvent::getCurrentTarget() throw (RuntimeException)
53 ::osl::MutexGuard const g(m_Mutex);
54 return m_currentTarget;
57 PhaseType SAL_CALL CEvent::getEventPhase() throw (RuntimeException)
59 ::osl::MutexGuard const g(m_Mutex);
60 return m_phase;
63 sal_Bool SAL_CALL CEvent::getBubbles() throw (RuntimeException)
65 ::osl::MutexGuard const g(m_Mutex);
66 return m_bubbles;
69 sal_Bool SAL_CALL CEvent::getCancelable() throw (RuntimeException)
71 ::osl::MutexGuard const g(m_Mutex);
72 return m_cancelable;
75 com::sun::star::util::Time SAL_CALL
76 CEvent::getTimeStamp() throw (RuntimeException)
78 ::osl::MutexGuard const g(m_Mutex);
79 return m_time;
82 void SAL_CALL CEvent::stopPropagation() throw (RuntimeException)
84 ::osl::MutexGuard const g(m_Mutex);
85 if (m_cancelable) { m_canceled = sal_True; }
88 void SAL_CALL CEvent::preventDefault() throw (RuntimeException)
92 void SAL_CALL
93 CEvent::initEvent(OUString const& eventTypeArg, sal_Bool canBubbleArg,
94 sal_Bool cancelableArg) throw (RuntimeException)
96 ::osl::MutexGuard const g(m_Mutex);
98 m_eventType = eventTypeArg;
99 m_bubbles = canBubbleArg;
100 m_cancelable = cancelableArg;
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */