xref: /trunk/main/svx/inc/svx/unoshape.hxx (revision 02563ba0)
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 #ifndef _SVX_UNOSHAPE_HXX
24 #define _SVX_UNOSHAPE_HXX
25 
26 #include <com/sun/star/document/XActionLockable.hpp>
27 #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
28 #include <com/sun/star/drawing/XGluePointsSupplier.hpp>
29 #include <com/sun/star/drawing/XShape.hpp>
30 #include <com/sun/star/lang/XComponent.hpp>
31 #include <com/sun/star/beans/XPropertySet.hpp>
32 #include <com/sun/star/beans/XPropertyState.hpp>
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/uno/XAggregation.hpp>
35 #include <com/sun/star/lang/XTypeProvider.hpp>
36 #include <com/sun/star/lang/XUnoTunnel.hpp>
37 #include <com/sun/star/awt/Point.hpp>
38 #include <com/sun/star/drawing/PolygonKind.hpp>
39 #include <com/sun/star/container/XNamed.hpp>
40 #include <com/sun/star/container/XChild.hpp>
41 #include <com/sun/star/beans/XMultiPropertySet.hpp>
42 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
43 #include <tools/gen.hxx>
44 #include <tools/weakbase.hxx>
45 #include <svl/lstner.hxx>
46 #include <editeng/unoipset.hxx>
47 #include <cppuhelper/weak.hxx>
48 #include <cppuhelper/weakagg.hxx>
49 #include <cppuhelper/interfacecontainer.h>
50 #include <osl/mutex.hxx>
51 #include "svx/svxdllapi.h"
52 #include <rtl/ref.hxx>
53 #include <com/sun/star/uno/Any.hxx>
54 
55 #include <svx/svdouno.hxx>
56 
57 #include <comphelper/servicehelper.hxx>
58 
59 #include <cppuhelper/implbase1.hxx>
60 #include <cppuhelper/implbase12.hxx>
61 
62 #include <svx/unoprov.hxx>
63 
64 class SfxItemSet;
65 class SdrModel;
66 class SvxDrawPage;
67 class SvGlobalName;
68 // --> OD 2009-01-16 #i59051#
69 namespace basegfx
70     {
71         class B2DPolyPolygon;
72     } // end of namespace basegfx
73 // <--
74 
75 class SvxShapeMutex
76 {
77 protected:
78 	::osl::Mutex maMutex;
79 };
80 
81 struct SvxShapeImpl;
82 class SvxShapeMaster;
83 class SvxItemPropertySet;
84 class SvxItemPropertySimpleEntry;
85 class SfxItemSet;
86 
87 void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap,
88         const com::sun::star::uno::Any& rVal, SfxItemSet& rSet );
89 
90 com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet );
91 
92 
93 // WARNING: if you update the supported interfaces,
94 //          also update SvxShape::_getTypes()
95 typedef ::cppu::WeakAggImplHelper12<
96     ::com::sun::star::drawing::XShape,
97     ::com::sun::star::lang::XComponent,
98     ::com::sun::star::beans::XPropertySet,
99     ::com::sun::star::beans::XMultiPropertySet,
100     ::com::sun::star::beans::XPropertyState,
101     ::com::sun::star::lang::XUnoTunnel,
102     ::com::sun::star::container::XNamed,
103     ::com::sun::star::drawing::XGluePointsSupplier,
104     ::com::sun::star::container::XChild,
105     ::com::sun::star::lang::XServiceInfo,
106     ::com::sun::star::document::XActionLockable,
107     ::com::sun::star::beans::XMultiPropertyStates> SvxShape_UnoImplHelper;
108 
109 class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
110                  public SfxListener,
111                  public SvxShapeMutex
112 {
113 private:
114 	::com::sun::star::awt::Size maSize;
115 	::com::sun::star::awt::Point maPosition;
116 	::rtl::OUString	maShapeType;
117 	::rtl::OUString maShapeName;
118 
119 	/** these members are used to optimize XMultiProperty calls */
120 	SvxShapeImpl* mpImpl;
121 	bool mbIsMultiPropertyCall;
122 
123 	::com::sun::star::uno::WeakReference< ::com::sun::star::container::XIndexContainer > mxGluePoints;
124 
125 protected:
126 	friend class SvxDrawPage;
127 	friend class SvxShapeConnector;
128 	friend class SdXShape;
129 
130 	const SvxItemPropertySet* mpPropSet;
131     const SfxItemPropertyMapEntry* maPropMapEntries;
132 
133     ::tools::WeakReference< SdrObject > mpObj;
134 	SdrModel* mpModel;
135 	// Umrechnungen fuer den Writer, der in TWIPS arbeitet
136 	void ForceMetricToItemPoolMetric(Pair& rPoint) const throw();
137 	void ForceMetricTo100th_mm(Pair& rPoint) const throw();
138     // --> OD 2009-01-16 #i59051#
139     void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
140     void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
141     // <--
142 
143     ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
144 
145 	sal_Bool tryQueryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& rAny );
146 
147 	sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName );
148 
149 	/** called from the XActionLockable interface methods on initial locking */
150 	virtual void lock();
151 
152 	/** called from the XActionLockable interface methods on final unlock */
153 	virtual void unlock();
154 
155 	/** used from the XActionLockable interface */
156 	sal_uInt16 mnLockCount;
157 
getPropertyMapEntries() const158     const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
159 
160 	void updateShapeKind();
161 	void endSetPropertyValues();
162 
163 	// overide these for special property handling in subcasses. Return true if property is handled
164     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
165     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
166     virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
167     virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
168 
169 public:
170 	SvxShape( SdrObject* pObj ) throw ();
171     SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw ();
172 	SvxShape() throw ();
173 	virtual ~SvxShape() throw ();
174 
175 	// Internals
176 	void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
177 	virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
178     /** takes the ownership of the SdrObject.
179 
180         When the shape is disposed, and it has the ownership of its associated SdrObject, then
181         it will delete this object.
182     */
183     void TakeSdrObjectOwnership();
184     bool HasSdrObjectOwnership() const;
185 
186 	void ChangeModel( SdrModel* pNewModel );
187 
InvalidateSdrObject()188 	void InvalidateSdrObject() { mpObj.reset( NULL ); };
GetPropertySet()189 	const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
GetSdrObject() const190 	SdrObject* GetSdrObject() const {return mpObj.get();}
SetShapeType(const::rtl::OUString & ShapeType)191 	void SetShapeType( const ::rtl::OUString& ShapeType ) { maShapeType = ShapeType; }
192 	::com::sun::star::uno::Any GetBitmap( sal_Bool bMetaFile = sal_False ) const throw ();
193 	static SvxShape* GetShapeForSdrObj( SdrObject* pObj ) throw ();
194 
195     ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
196 
197 	void setShapeKind( sal_uInt32 nKind );
198 	sal_uInt32 getShapeKind() const;
199 
200 	// styles need this
201 	static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet, SdrModel* pModel );
202 	static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet );
203 
204     /** same as SetFillAttribute but for property names instead of which ids,
205         and the property found is returned instead of set at the object
206         directly.
207      */
208 // os: unused function
209 //    static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName(
210 //        const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel );
211 
212 	UNO3_GETIMPLEMENTATION_DECL( SvxShape )
213 
214 	// access methods for master objects
215     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL _getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
216     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);
217 	::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);
218 
219     ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
220 	void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
221     ::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);
222 
223     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
224 
225     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL _getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
226 
227 	void setMaster( SvxShapeMaster* pMaster );
228 	const SvxShapeMaster* getMaster() const;
229 	SvxShapeMaster* getMaster();
230 
231 	// SfxListener
232 	virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
233 
234 
235 	/** @obsolete
236         not used anymore
237 	*/
238 	virtual void onUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect);
239 
240 	// XAggregation
241     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
242 
243     // XNamed
244     virtual ::rtl::OUString SAL_CALL getName(  ) throw(::com::sun::star::uno::RuntimeException);
245     virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
246 
247     // XShapeDescriptor
248     virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
249 
250 	// XShape
251     virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
252     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
253     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
254     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
255 
256 	// XComponent
257     virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
258     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
259     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
260 
261 	// XPropertySet
262     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
263     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);
264     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);
265     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
266     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
267     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
268     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
269 
270 	// XMultiPropertySet
271     virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
272     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
273     virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
274     virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
275     virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
276 
277 	// XPropertyState
278     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
279     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
280 	virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
281     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);
282 
283     // XMultiPropertyStates
284     virtual void SAL_CALL setAllPropertiesToDefault()
285         throw (::com::sun::star::uno::RuntimeException);
286     virtual void SAL_CALL setPropertiesToDefault(
287         const ::com::sun::star::uno::Sequence<
288         ::rtl::OUString >& aPropertyNames )
289         throw (::com::sun::star::beans::UnknownPropertyException,
290                ::com::sun::star::uno::RuntimeException);
291     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
292     SAL_CALL getPropertyDefaults(
293         const ::com::sun::star::uno::Sequence<
294         ::rtl::OUString >& aPropertyNames )
295         throw (::com::sun::star::beans::UnknownPropertyException,
296                ::com::sun::star::lang::WrappedTargetException,
297                ::com::sun::star::uno::RuntimeException);
298 
299     // XServiceInfo
300     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
301     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
302     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
303 
304     // XGluePointsSupplier
305     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getGluePoints(  ) throw(::com::sun::star::uno::RuntimeException);
306 
307 	// XChild
308     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  ) throw(::com::sun::star::uno::RuntimeException);
309     virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
310 
311 	// XTypeProvider
312     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
313     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
314 
315     // XActionLockable
316     virtual sal_Bool SAL_CALL isActionLocked(  ) throw (::com::sun::star::uno::RuntimeException);
317     virtual void SAL_CALL addActionLock(  ) throw (::com::sun::star::uno::RuntimeException);
318     virtual void SAL_CALL removeActionLock(  ) throw (::com::sun::star::uno::RuntimeException);
319     virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException);
320     virtual sal_Int16 SAL_CALL resetActionLocks(  ) throw (::com::sun::star::uno::RuntimeException);
321 
322 private:
323     /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
324     */
325 	SVX_DLLPRIVATE void	impl_initFromSdrObject();
326     /// CTOR-Impl
327     SVX_DLLPRIVATE void impl_construct();
328 };
329 
330 #include <editeng/unotext.hxx>
331 
332 class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
333 {
334 protected:
335 	/** called from the XActionLockable interface methods on initial locking */
336 	virtual void lock();
337 
338 	/** called from the XActionLockable interface methods on final unlock */
339 	virtual void unlock();
340 
341 protected:
342 	// overide these for special property handling in subcasses. Return true if property is handled
343     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
344     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
345     virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
346     virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
347 
348 public:
349 	SvxShapeText() throw ();
350 	SvxShapeText( SdrObject* pObj ) throw ();
351     SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
352 	virtual ~SvxShapeText() throw ();
353 
354 	virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
355 
356 	// XInterface
357 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
358 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
359 	virtual void SAL_CALL acquire() throw();
360 	virtual void SAL_CALL release() throw();
361 
362     // XServiceInfo
363     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
364     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
365     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
366 
367 	// ::com::sun::star::text::XTextRange
368     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException);
369     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException);
370     virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException);
371     virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException);
372 
373 	// XUnoTunnel
374     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
375 
376 	// XTypeProvider
377     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
378     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
379 };
380 
381 class SvxShapeRect : public SvxShapeText
382 {
383 public:
384 	SvxShapeRect( SdrObject* pObj ) throw ();
385 	virtual ~SvxShapeRect() throw ();
386 
387 	// XInterface
388 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
389 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
390 	virtual void SAL_CALL acquire() throw();
391 	virtual void SAL_CALL release() throw();
392 
393 	// XServiceInfo
394 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
395 };
396 #include <com/sun/star/drawing/XShapes.hpp>
397 #include <com/sun/star/drawing/XShapeGroup.hpp>
398 #include <com/sun/star/container/XIndexAccess.hpp>
399 
400 /***********************************************************************
401 *                                                                      *
402 ***********************************************************************/
403 class SvxShapeGroup : public SvxShape,
404 					  public ::com::sun::star::drawing::XShapeGroup,
405 					  public ::com::sun::star::drawing::XShapes
406 {
407 private:
408 	rtl::Reference< SvxDrawPage> mxPage;
409 
410 public:
411 	SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
412 	virtual ~SvxShapeGroup() throw ();
413 
414 	virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
415 
416 	// XInterface
417 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
418 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
419 	virtual void SAL_CALL acquire() throw();
420 	virtual void SAL_CALL release() throw();
421 
422 	// XShapes
423     virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
424     virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
425 
426 	// XElementAccess
427     virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
428     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
429 
430 	// XIndexAccess
431     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
432     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
433 
434     // XShapeDescriptor
435     virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
436 
437 	// XShape
438     virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
439     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
440     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
441     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
442 
443 	// XShapeGroup
444     virtual void SAL_CALL enterGroup(  ) throw(::com::sun::star::uno::RuntimeException);
445     virtual void SAL_CALL leaveGroup(  ) throw(::com::sun::star::uno::RuntimeException);
446 
447 	// XServiceInfo
448     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
449 
450 	// XTypeProvider
451     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
452     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
453 };
454 #include <com/sun/star/drawing/XConnectorShape.hpp>
455 
456 /***********************************************************************
457 *                                                                      *
458 ***********************************************************************/
459 class SvxShapeConnector : public ::com::sun::star::drawing::XConnectorShape,
460 						  public SvxShapeText
461 {
462 public:
463 	SvxShapeConnector( SdrObject* pObj ) throw();
464 	virtual ~SvxShapeConnector() throw();
465 
466 	// XInterface
467 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
468 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
469 	virtual void SAL_CALL acquire() throw();
470 	virtual void SAL_CALL release() throw();
471 
472     // XShapeDescriptor
473     virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
474 
475 	// XShape
476     virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
477     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
478     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
479     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
480 
481 	// XConnectorShape
482     virtual void SAL_CALL connectStart( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape, ::com::sun::star::drawing::ConnectionType nPos ) throw(::com::sun::star::uno::RuntimeException);
483     virtual void SAL_CALL connectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape, ::com::sun::star::drawing::ConnectionType nPos ) throw(::com::sun::star::uno::RuntimeException);
484     virtual void SAL_CALL disconnectBegin( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
485     virtual void SAL_CALL disconnectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
486 
487 	// XServiceInfo
488     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
489 
490 	// XTypeProvider
491     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
492     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
493 };
494 #include <com/sun/star/drawing/XControlShape.hpp>
495 
496 /***********************************************************************
497 *                                                                      *
498 ***********************************************************************/
499 class SVX_DLLPUBLIC SvxShapeControl : public ::com::sun::star::drawing::XControlShape, public SvxShapeText
500 {
501 protected:
502     using SvxUnoTextRangeBase::setPropertyValue;
503     using SvxUnoTextRangeBase::getPropertyValue;
504 
505 public:
506 	SvxShapeControl( SdrObject* pObj ) throw();
507 	virtual ~SvxShapeControl() throw();
508 
509 	// XInterface
510 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
511 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
512 	virtual void SAL_CALL acquire() throw();
513 	virtual void SAL_CALL release() throw();
514 
515 	// XPropertySet
516     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);
517     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);
518 
519 	// XPropertyState
520     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
521 	virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
522     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);
523 
524     // XShapeDescriptor
525     virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
526 
527 	// XShape
528     virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
529     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
530     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
531     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
532 
533 	// XControlShape
534     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getControl() throw(::com::sun::star::uno::RuntimeException);
535     virtual void SAL_CALL setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xControl ) throw(::com::sun::star::uno::RuntimeException);
536 
537 	// XServiceInfo
538     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
539 
540 	// XTypeProvider
541     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
542     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
543 };
544 
545 /***********************************************************************
546 *                                                                      *
547 ***********************************************************************/
548 class SvxShapeDimensioning : public SvxShapeText
549 {
550 public:
551 	SvxShapeDimensioning( SdrObject* pObj ) throw();
552 	virtual ~SvxShapeDimensioning() throw();
553 
554 	// XServiceInfo
555     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
556 };
557 
558 /***********************************************************************
559 *                                                                      *
560 ***********************************************************************/
561 class SvxShapeCircle : public SvxShapeText
562 {
563 public:
564 	SvxShapeCircle( SdrObject* pObj ) throw ();
565 	virtual ~SvxShapeCircle() throw ();
566 
567 	// XServiceInfo
568     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
569 };
570 
571 /***********************************************************************
572 *                                                                      *
573 ***********************************************************************/
574 
575 // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
576 class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
577 {
578 protected:
579     // overide these for special property handling in subcasses. Return true if property is handled
580     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
581     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
582 
583 	void resetModifiedState();
584 
585 	const SvGlobalName GetClassName_Impl(rtl::OUString& rHexCLSID);
586 public:
587 	SvxOle2Shape( SdrObject* pObj ) throw();
588     SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
589 	virtual ~SvxOle2Shape() throw();
590 
591 	sal_Bool createObject( const SvGlobalName &aClassName );
592 
593 	sal_Bool createLink( const ::rtl::OUString& aLinkURL );
594 
595 	// XInterface
596 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
597 };
598 
599 
600 #include <basegfx/polygon/b2dpolypolygon.hxx>
601 
602 /***********************************************************************
603 *                                                                      *
604 ***********************************************************************/
605 class SvxShapePolyPolygon : public SvxShapeText
606 {
607 private:
608 	::com::sun::star::drawing::PolygonKind mePolygonKind;
609 
610 protected:
611     using SvxUnoTextRangeBase::setPropertyValue;
612     using SvxUnoTextRangeBase::getPropertyValue;
613 
614 	// overide these for special property handling in subcasses. Return true if property is handled
615     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
616     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
617 
618 public:
619 	SvxShapePolyPolygon( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_LINE ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException);
620 	virtual ~SvxShapePolyPolygon() throw();
621 
622 	// Local support functions
623 	::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw();
624 	void SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw();
625 	basegfx::B2DPolyPolygon GetPolygon() const throw();
626 
627 	// XServiceInfo
628     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
629 };
630 
631 /***********************************************************************
632 *                                                                      *
633 ***********************************************************************/
634 
635 class SvxShapePolyPolygonBezier : public SvxShapeText
636 {
637 private:
638 	::com::sun::star::drawing::PolygonKind mePolygonKind;
639 
640 protected:
641     using SvxUnoTextRangeBase::setPropertyValue;
642     using SvxUnoTextRangeBase::getPropertyValue;
643 
644 public:
645 	// overide these for special property handling in subcasses. Return true if property is handled
646     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
647     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
648 
649 	SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
650 	virtual ~SvxShapePolyPolygonBezier() throw();
651 
652 	// Local support functions
653 	::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw();
654 	void SetPolygon(const basegfx::B2DPolyPolygon & rNew) throw();
655 	basegfx::B2DPolyPolygon GetPolygon() const throw();
656 
657 	// XServiceInfo
658     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
659 };
660 
661 /***********************************************************************
662 *                                                                      *
663 ***********************************************************************/
664 class SvxGraphicObject : public SvxShapeText
665 {
666 protected:
667     using SvxUnoTextRangeBase::setPropertyValue;
668     using SvxUnoTextRangeBase::getPropertyValue;
669 
670 	// overide these for special property handling in subcasses. Return true if property is handled
671     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
672     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
673 
674 public:
675 	SvxGraphicObject( SdrObject* pObj ) throw();
676 	virtual ~SvxGraphicObject() throw();
677 };
678 
679 /***********************************************************************
680 *                                                                      *
681 ***********************************************************************/
682 class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape
683 {
684 private:
685 	rtl::Reference< SvxDrawPage > mxPage;
686 
687 protected:
688     using SvxShape::setPropertyValue;
689     using SvxShape::getPropertyValue;
690 
691 public:
692 	Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
693 	// overide these for special property handling in subcasses. Return true if property is handled
694     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
695     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
696 
697 	virtual ~Svx3DSceneObject() throw();
698 
699 	virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
700 
701 	// XInterface
702 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
703 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
704 	virtual void SAL_CALL acquire() throw();
705 	virtual void SAL_CALL release() throw();
706 
707 	// XShapes
708     virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
709     virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
710 
711 	// XElementAccess
712     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
713     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
714 
715 	// XIndexAccess
716     virtual sal_Int32 SAL_CALL getCount(  ) throw(::com::sun::star::uno::RuntimeException) ;
717 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
718 
719 	// XServiceInfo
720     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
721 
722 	// XTypeProvider
723     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
724     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
725 };
726 
727 /***********************************************************************
728 *                                                                      *
729 ***********************************************************************/
730 class Svx3DCubeObject : public SvxShape
731 {
732 protected:
733 	// overide these for special property handling in subcasses. Return true if property is handled
734     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
735     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
736 
737 public:
738 	Svx3DCubeObject( SdrObject* pObj ) throw();
739 	virtual ~Svx3DCubeObject() throw();
740 
741 	// XServiceInfo
742     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
743 };
744 
745 /***********************************************************************
746 *                                                                      *
747 ***********************************************************************/
748 class Svx3DSphereObject : public SvxShape
749 {
750 public:
751 	Svx3DSphereObject( SdrObject* pObj ) throw();
752 protected:
753 	// overide these for special property handling in subcasses. Return true if property is handled
754     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
755     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
756 
757 	virtual ~Svx3DSphereObject() throw();
758 
759 	// XServiceInfo
760     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
761 };
762 
763 /***********************************************************************
764 *                                                                      *
765 ***********************************************************************/
766 class Svx3DLatheObject : public SvxShape
767 {
768 protected:
769 	// overide these for special property handling in subcasses. Return true if property is handled
770     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
771     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
772 
773 public:
774 	Svx3DLatheObject( SdrObject* pObj ) throw();
775 	virtual ~Svx3DLatheObject() throw();
776 
777 	// XServiceInfo
778     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
779 };
780 
781 /***********************************************************************
782 *                                                                      *
783 ***********************************************************************/
784 class Svx3DExtrudeObject : public SvxShape
785 {
786 public:
787 	Svx3DExtrudeObject( SdrObject* pObj ) throw();
788 protected:
789 	// overide these for special property handling in subcasses. Return true if property is handled
790     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
791     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
792 
793 	virtual ~Svx3DExtrudeObject() throw();
794 
795 	// XServiceInfo
796     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
797 };
798 
799 /***********************************************************************
800 *                                                                      *
801 ***********************************************************************/
802 class Svx3DPolygonObject : public SvxShape
803 {
804 protected:
805 	// overide these for special property handling in subcasses. Return true if property is handled
806     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
807     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
808 
809 public:
810 	Svx3DPolygonObject( SdrObject* pObj ) throw();
811 	virtual ~Svx3DPolygonObject() throw();
812 
813 	// XServiceInfo
814     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
815 };
816 
817 /***********************************************************************
818 *                                                                      *
819 ***********************************************************************/
820 typedef ::cppu::WeakAggImplHelper1<
821     ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter
822 	> SvxShape_UnoImplHelper1;
823 
824 class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1
825 {
826 private:
827 	rtl::Reference< SvxDrawPage > mxPage;
828 
829 protected:
830     using SvxUnoTextRangeBase::setPropertyValue;
831     using SvxUnoTextRangeBase::getPropertyValue;
832 
833 public:
834 	SvxCustomShape( SdrObject* pObj ) throw ();
835 	// overide these for special property handling in subcasses. Return true if property is handled
836     //virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertyMapEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
837     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
838 
839 
840 	virtual ~SvxCustomShape() throw ();
841 
842 	virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
843 
844 	// XInterface
845 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
846 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
847 	virtual void SAL_CALL acquire() throw();
848 	virtual void SAL_CALL release() throw();
849 
850     // XShapeDescriptor
851     virtual ::rtl::OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
852 
853 	// XShape
854     virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
855     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
856     virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
857     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
858 
859     // XPropertySet
860     void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException);
861 
862 	// XTypeProvider
863     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
864     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
865 
866 	//XEnhancedCustomShapeDefaulter
867 	virtual void SAL_CALL createCustomShapeDefaults( const rtl::OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException);
868 };
869 
870 /***********************************************************************
871 *                                                                      *
872 ***********************************************************************/
873 
874 class SvxMediaShape : public SvxShape
875 {
876 public:
877 	SvxMediaShape( SdrObject* pObj ) throw();
878 	virtual 	~SvxMediaShape() throw();
879 
880 protected:
881 	// overide these for special property handling in subcasses. Return true if property is handled
882     virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) 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);
883     virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
884 };
885 
886 #endif
887