1*7f654276SAndrew Rist /**************************************************************
2*7f654276SAndrew Rist  *
3*7f654276SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7f654276SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7f654276SAndrew Rist  * distributed with this work for additional information
6*7f654276SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7f654276SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7f654276SAndrew Rist  * "License"); you may not use this file except in compliance
9*7f654276SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*7f654276SAndrew Rist  *
11*7f654276SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*7f654276SAndrew Rist  *
13*7f654276SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7f654276SAndrew Rist  * software distributed under the License is distributed on an
15*7f654276SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7f654276SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7f654276SAndrew Rist  * specific language governing permissions and limitations
18*7f654276SAndrew Rist  * under the License.
19*7f654276SAndrew Rist  *
20*7f654276SAndrew Rist  *************************************************************/
21*7f654276SAndrew Rist 
22*7f654276SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef EVENT_MUTATIONEVENT_HXX
25cdf0e10cSrcweir #define EVENT_MUTATIONEVENT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <sal/types.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/PhaseType.hpp>
32cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/AttrChangeType.hpp>
33cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/XMutationEvent.hpp>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include "event.hxx"
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir using ::rtl::OUString;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir namespace DOM { namespace events {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper1< CEvent, XMutationEvent >
45cdf0e10cSrcweir     CMutationEvent_Base;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class CMutationEvent
48cdf0e10cSrcweir     : public CMutationEvent_Base
49cdf0e10cSrcweir {
50cdf0e10cSrcweir protected:
51cdf0e10cSrcweir     Reference< XNode > m_relatedNode;
52cdf0e10cSrcweir     OUString m_prevValue;
53cdf0e10cSrcweir     OUString m_newValue;
54cdf0e10cSrcweir     OUString m_attrName;
55cdf0e10cSrcweir     AttrChangeType m_attrChangeType;
56cdf0e10cSrcweir 
57cdf0e10cSrcweir public:
58cdf0e10cSrcweir     explicit CMutationEvent();
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     virtual ~CMutationEvent();
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     virtual Reference< XNode > SAL_CALL getRelatedNode() throw (RuntimeException);
63cdf0e10cSrcweir     virtual OUString SAL_CALL getPrevValue() throw (RuntimeException);
64cdf0e10cSrcweir     virtual OUString SAL_CALL getNewValue() throw (RuntimeException);
65cdf0e10cSrcweir     virtual OUString SAL_CALL getAttrName() throw (RuntimeException);
66cdf0e10cSrcweir     virtual AttrChangeType SAL_CALL getAttrChange() throw (RuntimeException);
67cdf0e10cSrcweir     virtual void SAL_CALL initMutationEvent(
68cdf0e10cSrcweir                            const OUString& typeArg,
69cdf0e10cSrcweir                            sal_Bool canBubbleArg,
70cdf0e10cSrcweir                            sal_Bool cancelableArg,
71cdf0e10cSrcweir                            const Reference< XNode >& relatedNodeArg,
72cdf0e10cSrcweir                            const OUString& prevValueArg,
73cdf0e10cSrcweir                            const OUString& newValueArg,
74cdf0e10cSrcweir                            const OUString& attrNameArg,
75cdf0e10cSrcweir                            AttrChangeType attrChangeArg) throw (RuntimeException);
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     // delegate to CEvent, since we are inheriting from CEvent and XEvent
78cdf0e10cSrcweir     virtual OUString SAL_CALL getType() throw (RuntimeException);
79cdf0e10cSrcweir     virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException);
80cdf0e10cSrcweir     virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException);
81cdf0e10cSrcweir     virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException);
82cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException);
83cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException);
84cdf0e10cSrcweir     virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException);
85cdf0e10cSrcweir     virtual void SAL_CALL stopPropagation() throw (RuntimeException);
86cdf0e10cSrcweir     virtual void SAL_CALL preventDefault() throw (RuntimeException);
87cdf0e10cSrcweir     virtual void SAL_CALL initEvent(
88cdf0e10cSrcweir         const OUString& eventTypeArg,
89cdf0e10cSrcweir         sal_Bool canBubbleArg,
90cdf0e10cSrcweir         sal_Bool cancelableArg)
91cdf0e10cSrcweir         throw (RuntimeException);
92cdf0e10cSrcweir };
93cdf0e10cSrcweir }}
94cdf0e10cSrcweir #endif
95