xref: /aoo42x/main/sd/source/ui/unoidl/unoobj.hxx (revision 67e470da)
1*c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c45d927aSAndrew Rist  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew Rist 
23cdf0e10cSrcweir #ifndef _UNOOBJ_HXX
24cdf0e10cSrcweir #define _UNOOBJ_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
27cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
28cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
29cdf0e10cSrcweir #include <com/sun/star/drawing/XShape.hpp>
30cdf0e10cSrcweir #include <com/sun/star/document/XEventsSupplier.hpp>
31cdf0e10cSrcweir #include <com/sun/star/document/XEventsSupplier.hpp>
32cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
33cdf0e10cSrcweir #include <svx/svdpool.hxx>
34cdf0e10cSrcweir #include <svx/unomaster.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <editeng/unoipset.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class SdrObject;
41cdf0e10cSrcweir class SdXImpressDocument;
42cdf0e10cSrcweir class SdAnimationInfo;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir class SdXShape : public SvxShapeMaster,
45cdf0e10cSrcweir 				 public ::com::sun::star::document::XEventsSupplier
46cdf0e10cSrcweir {
47cdf0e10cSrcweir 	friend class SdUnoEventsAccess;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir private:
50cdf0e10cSrcweir 	SvxShape* mpShape;
51cdf0e10cSrcweir 	const SvxItemPropertySet*	mpPropSet;
52cdf0e10cSrcweir 	const SfxItemPropertyMapEntry* mpMap;
53cdf0e10cSrcweir 	SdXImpressDocument* mpModel;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 	void SetStyleSheet( const ::com::sun::star::uno::Any& rAny ) throw( ::com::sun::star::lang::IllegalArgumentException );
56cdf0e10cSrcweir 	::com::sun::star::uno::Any GetStyleSheet() const throw( ::com::sun::star::beans::UnknownPropertyException  );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 	// Intern
59cdf0e10cSrcweir 	SdAnimationInfo* GetAnimationInfo( sal_Bool bCreate = sal_False ) const throw();
60cdf0e10cSrcweir 	sal_Bool IsPresObj() const throw();
61cdf0e10cSrcweir 	void SetPresObj( sal_Bool bPresObj ) throw();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 	sal_Bool IsEmptyPresObj() const throw();
64cdf0e10cSrcweir 	void SetEmptyPresObj( sal_Bool bEmpty ) throw();
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	sal_Bool IsMasterDepend() const throw();
67cdf0e10cSrcweir 	void SetMasterDepend( sal_Bool bDepend ) throw();
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	SdrObject* GetSdrObject() const throw();
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	com::sun::star::uno::Sequence< sal_Int8 >* mpImplementationId;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir public:
74cdf0e10cSrcweir 	SdXShape(SvxShape* pShape, SdXImpressDocument* pModel) throw();
75cdf0e10cSrcweir 	virtual ~SdXShape() throw();
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	virtual sal_Bool queryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& aAny );
78cdf0e10cSrcweir 	virtual void dispose();
79cdf0e10cSrcweir 	virtual void modelChanged( SdrModel* pNewModel );
80cdf0e10cSrcweir 	virtual void pageChanged( SdrPage* pNewPage );
81cdf0e10cSrcweir 	virtual void objectChanged( SdrObject* pNewObj );
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	// XInterface
84cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir 	virtual void SAL_CALL acquire() throw();
87cdf0e10cSrcweir 	virtual void SAL_CALL release() throw();
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     // XServiceInfo
90cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	//XPropertySet
93cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
94cdf0e10cSrcweir     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
95cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     //XPropertyState
98cdf0e10cSrcweir     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir     virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
100cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	// XTypeProvider
103cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 	// XEventsSupplier
106cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents(  ) throw(::com::sun::star::uno::RuntimeException);
107cdf0e10cSrcweir 
108cdf0e10cSrcweir private:
109cdf0e10cSrcweir 	void setOldEffect( const com::sun::star::uno::Any& aValue );
110cdf0e10cSrcweir 	void setOldTextEffect( const com::sun::star::uno::Any& aValue );
111cdf0e10cSrcweir 	void setOldSpeed( const com::sun::star::uno::Any& aValue );
112cdf0e10cSrcweir 	void setOldDimColor( const com::sun::star::uno::Any& aValue );
113cdf0e10cSrcweir 	void setOldDimHide( const com::sun::star::uno::Any& aValue );
114cdf0e10cSrcweir 	void setOldDimPrevious( const com::sun::star::uno::Any& aValue );
115cdf0e10cSrcweir 	void setOldPresOrder( const com::sun::star::uno::Any& aValue );
116cdf0e10cSrcweir 	void updateOldSoundEffect( SdAnimationInfo* pInfo );
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 	void getOldEffect( com::sun::star::uno::Any& rValue ) const;
119cdf0e10cSrcweir 	void getOldTextEffect( com::sun::star::uno::Any& rValue ) const;
120cdf0e10cSrcweir 	void getOldSpeed( com::sun::star::uno::Any& rValue ) const;
121cdf0e10cSrcweir 	void getOldSoundFile( com::sun::star::uno::Any& rValue ) const;
122cdf0e10cSrcweir 	void getOldSoundOn( com::sun::star::uno::Any& rValue ) const;
123cdf0e10cSrcweir 	void getOldDimColor( com::sun::star::uno::Any& rValue ) const;
124cdf0e10cSrcweir 	void getOldDimHide( com::sun::star::uno::Any& rValue ) const;
125cdf0e10cSrcweir 	void getOldDimPrev( com::sun::star::uno::Any& rValue ) const;
126cdf0e10cSrcweir 	void getOldPresOrder( com::sun::star::uno::Any& rValue ) const;
127cdf0e10cSrcweir };
128cdf0e10cSrcweir 
129cdf0e10cSrcweir struct SvEventDescription;
130cdf0e10cSrcweir const SvEventDescription* ImplGetSupportedMacroItems();
131cdf0e10cSrcweir 
132cdf0e10cSrcweir #endif
133cdf0e10cSrcweir 
134cdf0e10cSrcweir 
135