1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef EVENT_MUTATIONEVENT_HXX 29 #define EVENT_MUTATIONEVENT_HXX 30 31 #include <sal/types.h> 32 33 #include <com/sun/star/uno/Reference.h> 34 35 #include <com/sun/star/xml/dom/events/PhaseType.hpp> 36 #include <com/sun/star/xml/dom/events/AttrChangeType.hpp> 37 #include <com/sun/star/xml/dom/events/XMutationEvent.hpp> 38 39 #include <cppuhelper/implbase1.hxx> 40 41 #include "event.hxx" 42 43 44 using ::rtl::OUString; 45 46 namespace DOM { namespace events { 47 48 typedef ::cppu::ImplInheritanceHelper1< CEvent, XMutationEvent > 49 CMutationEvent_Base; 50 51 class CMutationEvent 52 : public CMutationEvent_Base 53 { 54 protected: 55 Reference< XNode > m_relatedNode; 56 OUString m_prevValue; 57 OUString m_newValue; 58 OUString m_attrName; 59 AttrChangeType m_attrChangeType; 60 61 public: 62 explicit CMutationEvent(); 63 64 virtual ~CMutationEvent(); 65 66 virtual Reference< XNode > SAL_CALL getRelatedNode() throw (RuntimeException); 67 virtual OUString SAL_CALL getPrevValue() throw (RuntimeException); 68 virtual OUString SAL_CALL getNewValue() throw (RuntimeException); 69 virtual OUString SAL_CALL getAttrName() throw (RuntimeException); 70 virtual AttrChangeType SAL_CALL getAttrChange() throw (RuntimeException); 71 virtual void SAL_CALL initMutationEvent( 72 const OUString& typeArg, 73 sal_Bool canBubbleArg, 74 sal_Bool cancelableArg, 75 const Reference< XNode >& relatedNodeArg, 76 const OUString& prevValueArg, 77 const OUString& newValueArg, 78 const OUString& attrNameArg, 79 AttrChangeType attrChangeArg) throw (RuntimeException); 80 81 // delegate to CEvent, since we are inheriting from CEvent and XEvent 82 virtual OUString SAL_CALL getType() throw (RuntimeException); 83 virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException); 84 virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException); 85 virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException); 86 virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException); 87 virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException); 88 virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException); 89 virtual void SAL_CALL stopPropagation() throw (RuntimeException); 90 virtual void SAL_CALL preventDefault() throw (RuntimeException); 91 virtual void SAL_CALL initEvent( 92 const OUString& eventTypeArg, 93 sal_Bool canBubbleArg, 94 sal_Bool cancelableArg) 95 throw (RuntimeException); 96 }; 97 }} 98 #endif 99