xref: /trunk/main/forms/source/xforms/xformsevent.cxx (revision 24acc546)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 // MARKER(update_precomp.py): autogen include statement, do not remove
26 #include "precompiled_forms.hxx"
27 #include "xformsevent.hxx"
28 
29 namespace com {
30 namespace sun {
31 namespace star {
32 namespace xforms {
33 
34 using rtl::OUString;
35 using com::sun::star::uno::RuntimeException;
36 
initXFormsEvent(const OUString & typeArg,sal_Bool canBubbleArg,sal_Bool cancelableArg)37 void SAL_CALL XFormsEventConcrete::initXFormsEvent(const OUString& typeArg,
38     sal_Bool canBubbleArg, sal_Bool cancelableArg)
39 	throw (RuntimeException)
40 {
41     initEvent(typeArg, canBubbleArg, cancelableArg);
42 }
43 
getType()44 OUString SAL_CALL XFormsEventConcrete::getType() throw (RuntimeException)
45 {
46     return m_eventType;
47 }
48 
getTarget()49 XFormsEventConcrete::XEventTarget_t SAL_CALL XFormsEventConcrete::getTarget() throw (RuntimeException)
50 {
51     return m_target;
52 }
53 
getCurrentTarget()54 XFormsEventConcrete::XEventTarget_t SAL_CALL XFormsEventConcrete::getCurrentTarget() throw (RuntimeException)
55 {
56     return m_currentTarget;
57 }
58 
getEventPhase()59 XFormsEventConcrete::PhaseType_t SAL_CALL XFormsEventConcrete::getEventPhase() throw (RuntimeException)
60 {
61     return m_phase;
62 }
63 
getBubbles()64 sal_Bool SAL_CALL XFormsEventConcrete::getBubbles() throw (RuntimeException)
65 {
66     return m_bubbles;
67 }
68 
getCancelable()69 sal_Bool SAL_CALL XFormsEventConcrete::getCancelable() throw (RuntimeException)
70 {
71     return m_cancelable;
72 }
73 
getTimeStamp()74 XFormsEventConcrete::Time_t SAL_CALL XFormsEventConcrete::getTimeStamp() throw (RuntimeException)
75 {
76     return m_time;
77 }
78 
stopPropagation()79 void SAL_CALL XFormsEventConcrete::stopPropagation() throw (RuntimeException)
80 {
81     if(m_cancelable)
82 		m_canceled = sal_True;
83 }
preventDefault()84 void SAL_CALL XFormsEventConcrete::preventDefault() throw (RuntimeException)
85 {
86 }
87 
initEvent(const OUString & eventTypeArg,sal_Bool canBubbleArg,sal_Bool cancelableArg)88 void SAL_CALL XFormsEventConcrete::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
89     sal_Bool cancelableArg) throw (RuntimeException)
90 {
91 	m_eventType = eventTypeArg;
92 	m_bubbles = canBubbleArg;
93 	m_cancelable = cancelableArg;
94 }
95 
96 } } } }
97