Update git submodules
[LibreOffice.git] / unoxml / source / events / uievent.cxx
blobbe61ca5cf391e8182427f3a7efd81de9308dd012
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 <uievent.hxx>
22 using namespace css::uno;
23 using namespace css::xml::dom::events;
24 using namespace css::xml::dom::views;
26 namespace DOM::events
28 CUIEvent::CUIEvent()
29 : m_detail(0)
33 Reference< XAbstractView > SAL_CALL
34 CUIEvent::getView()
36 std::unique_lock const g(m_Mutex);
37 return m_view;
40 sal_Int32 SAL_CALL CUIEvent::getDetail()
42 std::unique_lock const g(m_Mutex);
43 return m_detail;
46 void SAL_CALL CUIEvent::initUIEvent(const OUString& typeArg,
47 sal_Bool canBubbleArg,
48 sal_Bool cancelableArg,
49 const Reference< XAbstractView >& viewArg,
50 sal_Int32 detailArg)
52 CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
53 std::unique_lock const g(m_Mutex);
54 m_view = viewArg;
55 m_detail = detailArg;
59 // delegate to CEvent, since we are inheriting from CEvent and XEvent
60 OUString SAL_CALL CUIEvent::getType()
62 return CEvent::getType();
65 Reference< XEventTarget > SAL_CALL CUIEvent::getTarget()
67 return CEvent::getTarget();
70 Reference< XEventTarget > SAL_CALL CUIEvent::getCurrentTarget()
72 return CEvent::getCurrentTarget();
75 PhaseType SAL_CALL CUIEvent::getEventPhase()
77 return CEvent::getEventPhase();
80 sal_Bool SAL_CALL CUIEvent::getBubbles()
82 return CEvent::getBubbles();
85 sal_Bool SAL_CALL CUIEvent::getCancelable()
87 // mutation events cannot be canceled
88 return false;
91 css::util::Time SAL_CALL CUIEvent::getTimeStamp()
93 return CEvent::getTimeStamp();
96 void SAL_CALL CUIEvent::stopPropagation()
98 CEvent::stopPropagation();
100 void SAL_CALL CUIEvent::preventDefault()
102 CEvent::preventDefault();
105 void SAL_CALL CUIEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
106 sal_Bool cancelableArg)
108 // base initializer
109 CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */