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