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 #ifndef EVENT_MUTATIONEVENT_HXX 25 #define EVENT_MUTATIONEVENT_HXX 26 27 #include <sal/types.h> 28 29 #include <com/sun/star/uno/Reference.h> 30 31 #include <com/sun/star/xml/dom/events/PhaseType.hpp> 32 #include <com/sun/star/xml/dom/events/AttrChangeType.hpp> 33 #include <com/sun/star/xml/dom/events/XMutationEvent.hpp> 34 35 #include <cppuhelper/implbase1.hxx> 36 37 #include "event.hxx" 38 39 40 using ::rtl::OUString; 41 42 namespace DOM { namespace events { 43 44 typedef ::cppu::ImplInheritanceHelper1< CEvent, XMutationEvent > 45 CMutationEvent_Base; 46 47 class CMutationEvent 48 : public CMutationEvent_Base 49 { 50 protected: 51 Reference< XNode > m_relatedNode; 52 OUString m_prevValue; 53 OUString m_newValue; 54 OUString m_attrName; 55 AttrChangeType m_attrChangeType; 56 57 public: 58 explicit CMutationEvent(); 59 60 virtual ~CMutationEvent(); 61 62 virtual Reference< XNode > SAL_CALL getRelatedNode() throw (RuntimeException); 63 virtual OUString SAL_CALL getPrevValue() throw (RuntimeException); 64 virtual OUString SAL_CALL getNewValue() throw (RuntimeException); 65 virtual OUString SAL_CALL getAttrName() throw (RuntimeException); 66 virtual AttrChangeType SAL_CALL getAttrChange() throw (RuntimeException); 67 virtual void SAL_CALL initMutationEvent( 68 const OUString& typeArg, 69 sal_Bool canBubbleArg, 70 sal_Bool cancelableArg, 71 const Reference< XNode >& relatedNodeArg, 72 const OUString& prevValueArg, 73 const OUString& newValueArg, 74 const OUString& attrNameArg, 75 AttrChangeType attrChangeArg) throw (RuntimeException); 76 77 // delegate to CEvent, since we are inheriting from CEvent and XEvent 78 virtual OUString SAL_CALL getType() throw (RuntimeException); 79 virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException); 80 virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException); 81 virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException); 82 virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException); 83 virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException); 84 virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException); 85 virtual void SAL_CALL stopPropagation() throw (RuntimeException); 86 virtual void SAL_CALL preventDefault() throw (RuntimeException); 87 virtual void SAL_CALL initEvent( 88 const OUString& eventTypeArg, 89 sal_Bool canBubbleArg, 90 sal_Bool cancelableArg) 91 throw (RuntimeException); 92 }; 93 }} 94 #endif 95