merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / unoidl / unoobj.hxx
blob5c2261455902130e309374277c0ff7ac6cd39dac
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoobj.hxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOOBJ_HXX
31 #define _UNOOBJ_HXX
33 #include <com/sun/star/beans/XPropertyState.hpp>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/drawing/XShape.hpp>
37 #include <com/sun/star/document/XEventsSupplier.hpp>
38 #include <com/sun/star/document/XEventsSupplier.hpp>
39 #include <com/sun/star/lang/XTypeProvider.hpp>
40 #include <svx/svdpool.hxx>
41 #include <svx/unomaster.hxx>
43 #include <svx/unoipset.hxx>
45 #include <cppuhelper/implbase2.hxx>
47 class SdrObject;
48 class SdXImpressDocument;
49 class SdAnimationInfo;
51 class SdXShape : public SvxShapeMaster,
52 public ::com::sun::star::document::XEventsSupplier
54 friend class SdUnoEventsAccess;
56 private:
57 SvxShape* mpShape;
58 const SvxItemPropertySet* mpPropSet;
59 const SfxItemPropertyMapEntry* mpMap;
60 SdXImpressDocument* mpModel;
62 void SetStyleSheet( const ::com::sun::star::uno::Any& rAny ) throw( ::com::sun::star::lang::IllegalArgumentException );
63 ::com::sun::star::uno::Any GetStyleSheet() const throw( ::com::sun::star::beans::UnknownPropertyException );
65 // Intern
66 SdAnimationInfo* GetAnimationInfo( sal_Bool bCreate = sal_False ) const throw();
67 sal_Bool IsPresObj() const throw();
68 void SetPresObj( sal_Bool bPresObj ) throw();
70 sal_Bool IsEmptyPresObj() const throw();
71 void SetEmptyPresObj( sal_Bool bEmpty ) throw();
73 sal_Bool IsMasterDepend() const throw();
74 void SetMasterDepend( sal_Bool bDepend ) throw();
76 SdrObject* GetSdrObject() const throw();
78 com::sun::star::uno::Sequence< sal_Int8 >* mpImplementationId;
80 public:
81 SdXShape() throw();
82 SdXShape(SvxShape* pShape, SdXImpressDocument* pModel) throw();
83 virtual ~SdXShape() throw();
85 virtual sal_Bool queryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& aAny );
86 virtual void dispose();
87 virtual void modelChanged( SdrModel* pNewModel );
88 virtual void pageChanged( SdrPage* pNewPage );
89 virtual void objectChanged( SdrObject* pNewObj );
91 // XInterface
92 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
93 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL acquire() throw();
95 virtual void SAL_CALL release() throw();
97 // XServiceInfo
98 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
100 //XPropertySet
101 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
102 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);
103 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);
105 //XPropertyState
106 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
107 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
108 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);
110 // XTypeProvider
111 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
113 // XEventsSupplier
114 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
116 private:
117 void setOldEffect( const com::sun::star::uno::Any& aValue );
118 void setOldTextEffect( const com::sun::star::uno::Any& aValue );
119 void setOldSpeed( const com::sun::star::uno::Any& aValue );
120 void setOldDimColor( const com::sun::star::uno::Any& aValue );
121 void setOldDimHide( const com::sun::star::uno::Any& aValue );
122 void setOldDimPrevious( const com::sun::star::uno::Any& aValue );
123 void setOldPresOrder( const com::sun::star::uno::Any& aValue );
124 void updateOldSoundEffect( SdAnimationInfo* pInfo );
126 void getOldEffect( com::sun::star::uno::Any& rValue ) const;
127 void getOldTextEffect( com::sun::star::uno::Any& rValue ) const;
128 void getOldSpeed( com::sun::star::uno::Any& rValue ) const;
129 void getOldSoundFile( com::sun::star::uno::Any& rValue ) const;
130 void getOldSoundOn( com::sun::star::uno::Any& rValue ) const;
131 void getOldDimColor( com::sun::star::uno::Any& rValue ) const;
132 void getOldDimHide( com::sun::star::uno::Any& rValue ) const;
133 void getOldDimPrev( com::sun::star::uno::Any& rValue ) const;
134 void getOldPresOrder( com::sun::star::uno::Any& rValue ) const;
137 struct SvEventDescription;
138 const SvEventDescription* ImplGetSupportedMacroItems();
140 #endif