Line data Source code
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 <uievent.hxx>
21 :
22 : using namespace css::uno;
23 : using namespace css::xml::dom::events;
24 : using namespace css::xml::dom::views;
25 :
26 : namespace DOM { namespace events
27 : {
28 0 : CUIEvent::CUIEvent()
29 : : CUIEvent_Base()
30 0 : , m_detail(0)
31 : {
32 0 : }
33 :
34 : Reference< XAbstractView > SAL_CALL
35 0 : CUIEvent::getView() throw(RuntimeException, std::exception)
36 : {
37 0 : ::osl::MutexGuard const g(m_Mutex);
38 0 : return m_view;
39 : }
40 :
41 0 : sal_Int32 SAL_CALL CUIEvent::getDetail() throw(RuntimeException, std::exception)
42 : {
43 0 : ::osl::MutexGuard const g(m_Mutex);
44 0 : return m_detail;
45 : }
46 :
47 0 : void SAL_CALL CUIEvent::initUIEvent(const OUString& typeArg,
48 : sal_Bool canBubbleArg,
49 : sal_Bool cancelableArg,
50 : const Reference< XAbstractView >& viewArg,
51 : sal_Int32 detailArg) throw(RuntimeException, std::exception)
52 : {
53 0 : ::osl::MutexGuard const g(m_Mutex);
54 :
55 0 : CEvent::initEvent(typeArg, canBubbleArg, cancelableArg);
56 0 : m_view = viewArg;
57 0 : m_detail = detailArg;
58 0 : }
59 :
60 :
61 : // delegate to CEvent, since we are inheriting from CEvent and XEvent
62 0 : OUString SAL_CALL CUIEvent::getType() throw (RuntimeException, std::exception)
63 : {
64 0 : return CEvent::getType();
65 : }
66 :
67 0 : Reference< XEventTarget > SAL_CALL CUIEvent::getTarget() throw (RuntimeException, std::exception)
68 : {
69 0 : return CEvent::getTarget();
70 : }
71 :
72 0 : Reference< XEventTarget > SAL_CALL CUIEvent::getCurrentTarget() throw (RuntimeException, std::exception)
73 : {
74 0 : return CEvent::getCurrentTarget();
75 : }
76 :
77 0 : PhaseType SAL_CALL CUIEvent::getEventPhase() throw (RuntimeException, std::exception)
78 : {
79 0 : return CEvent::getEventPhase();
80 : }
81 :
82 0 : sal_Bool SAL_CALL CUIEvent::getBubbles() throw (RuntimeException, std::exception)
83 : {
84 0 : return CEvent::getBubbles();
85 : }
86 :
87 0 : sal_Bool SAL_CALL CUIEvent::getCancelable() throw (RuntimeException, std::exception)
88 : {
89 : // mutation events cannot be canceled
90 0 : return sal_False;
91 : }
92 :
93 0 : css::util::Time SAL_CALL CUIEvent::getTimeStamp() throw (RuntimeException, std::exception)
94 : {
95 0 : return CEvent::getTimeStamp();
96 : }
97 :
98 0 : void SAL_CALL CUIEvent::stopPropagation() throw (RuntimeException, std::exception)
99 : {
100 0 : CEvent::stopPropagation();
101 0 : }
102 0 : void SAL_CALL CUIEvent::preventDefault() throw (RuntimeException, std::exception)
103 : {
104 0 : CEvent::preventDefault();
105 0 : }
106 :
107 0 : void SAL_CALL CUIEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
108 : sal_Bool cancelableArg) throw (RuntimeException, std::exception)
109 : {
110 : // base initializer
111 0 : CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
112 0 : }
113 : }}
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|