bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / unoshape.hxx
blobc27f8b7c6bf1c54428a4a92882b0e574d49cf1d7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVX_UNOSHAPE_HXX
21 #define INCLUDED_SVX_UNOSHAPE_HXX
23 #include <com/sun/star/document/XActionLockable.hpp>
24 #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
25 #include <com/sun/star/drawing/XGluePointsSupplier.hpp>
26 #include <com/sun/star/drawing/XShape.hpp>
27 #include <com/sun/star/lang/XComponent.hpp>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/beans/XPropertyState.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/uno/XAggregation.hpp>
32 #include <com/sun/star/lang/XTypeProvider.hpp>
33 #include <com/sun/star/lang/XUnoTunnel.hpp>
34 #include <com/sun/star/awt/Point.hpp>
35 #include <com/sun/star/drawing/PolygonKind.hpp>
36 #include <com/sun/star/container/XNamed.hpp>
37 #include <com/sun/star/container/XChild.hpp>
38 #include <com/sun/star/beans/XMultiPropertySet.hpp>
39 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
40 #include <sal/types.h>
41 #include <tools/weakbase.hxx>
42 #include <svl/lstner.hxx>
43 #include <editeng/unoipset.hxx>
44 #include <cppuhelper/weak.hxx>
45 #include <cppuhelper/weakagg.hxx>
46 #include <cppuhelper/interfacecontainer.h>
47 #include <osl/mutex.hxx>
48 #include <svx/svxdllapi.h>
49 #include <rtl/ref.hxx>
50 #include <com/sun/star/uno/Any.hxx>
52 #include <svx/svdouno.hxx>
54 #include <comphelper/servicehelper.hxx>
56 #include <cppuhelper/implbase1.hxx>
57 #include <cppuhelper/implbase12.hxx>
59 #include <svx/unoprov.hxx>
61 class SfxItemSet;
62 class SdrModel;
63 class SvxDrawPage;
64 class SvGlobalName;
65 class Pair;
67 // Dimension arrows change size/position on save/reload (#i59051#)
68 namespace basegfx
70 class B2DPolyPolygon;
71 } // end of namespace basegfx
73 class SvxShapeMutex
75 protected:
76 ::osl::Mutex maMutex;
79 struct SvxShapeImpl;
80 class SvxShapeMaster;
81 class SvxItemPropertySet;
82 class SfxItemSet;
84 void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap,
85 const com::sun::star::uno::Any& rVal, SfxItemSet& rSet );
87 com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet );
90 // WARNING: if you update the supported interfaces,
91 // also update SvxShape::_getTypes()
92 typedef ::cppu::WeakAggImplHelper12<
93 ::com::sun::star::drawing::XShape,
94 ::com::sun::star::lang::XComponent,
95 ::com::sun::star::beans::XPropertySet,
96 ::com::sun::star::beans::XMultiPropertySet,
97 ::com::sun::star::beans::XPropertyState,
98 ::com::sun::star::lang::XUnoTunnel,
99 ::com::sun::star::container::XNamed,
100 ::com::sun::star::drawing::XGluePointsSupplier,
101 ::com::sun::star::container::XChild,
102 ::com::sun::star::lang::XServiceInfo,
103 ::com::sun::star::document::XActionLockable,
104 ::com::sun::star::beans::XMultiPropertyStates> SvxShape_UnoImplHelper;
106 class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
107 public SfxListener,
108 public SvxShapeMutex
110 private:
111 ::com::sun::star::awt::Size maSize;
112 ::com::sun::star::awt::Point maPosition;
113 OUString maShapeType;
114 OUString maShapeName;
116 /** these members are used to optimize XMultiProperty calls */
117 SvxShapeImpl* mpImpl;
118 bool mbIsMultiPropertyCall;
120 ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XIndexContainer > mxGluePoints;
122 protected:
123 friend class SvxDrawPage;
124 friend class SvxShapeConnector;
125 friend class SdXShape;
127 const SvxItemPropertySet* mpPropSet;
128 const SfxItemPropertyMapEntry* maPropMapEntries;
130 ::tools::WeakReference< SdrObject > mpObj;
131 SdrModel* mpModel;
132 // Umrechnungen fuer den Writer, der in TWIPS arbeitet
133 void ForceMetricToItemPoolMetric(Pair& rPoint) const throw();
134 void ForceMetricTo100th_mm(Pair& rPoint) const throw();
135 // Dimension arrows change size/position on save/reload (#i59051#)
136 void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
137 void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
139 ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
141 sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName );
143 /** called from the XActionLockable interface methods on initial locking */
144 virtual void lock();
146 /** called from the XActionLockable interface methods on final unlock */
147 virtual void unlock();
149 /** used from the XActionLockable interface */
150 sal_uInt16 mnLockCount;
152 const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
154 void updateShapeKind();
155 void endSetPropertyValues();
157 // overide these for special property handling in subcasses. Return true if property is handled
158 virtual bool setPropertyValueImpl( const 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);
159 virtual bool getPropertyValueImpl( const 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);
160 virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
161 virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
163 public:
164 SvxShape( SdrObject* pObj ) throw ();
165 SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw ();
166 SvxShape() throw ();
167 virtual ~SvxShape() throw ();
169 // Internals
170 void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
171 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
172 /** takes the ownership of the SdrObject.
174 When the shape is disposed, and it has the ownership of its associated SdrObject, then
175 it will delete this object.
177 void TakeSdrObjectOwnership();
178 bool HasSdrObjectOwnership() const;
180 void ChangeModel( SdrModel* pNewModel );
182 void InvalidateSdrObject() { mpObj.reset( NULL ); };
183 const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
184 SdrObject* GetSdrObject() const {return mpObj.get();}
185 void SetShapeType( const OUString& ShapeType ) { maShapeType = ShapeType; }
186 ::com::sun::star::uno::Any GetBitmap( sal_Bool bMetaFile = sal_False ) const throw ();
188 ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
190 void setShapeKind( sal_uInt32 nKind );
191 sal_uInt32 getShapeKind() const;
193 // styles need this
194 static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel* pModel );
195 static sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet );
197 /** same as SetFillAttribute but for property names instead of which ids,
198 and the property found is returned instead of set at the object
199 directly.
202 UNO3_GETIMPLEMENTATION_DECL( SvxShape )
204 // access methods for master objects
205 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL _getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
206 void SAL_CALL _setPropertyValue( const 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);
207 ::com::sun::star::uno::Any SAL_CALL _getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
209 ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
210 void SAL_CALL _setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
211 ::com::sun::star::uno::Any SAL_CALL _getPropertyDefault( const OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
213 ::com::sun::star::uno::Sequence< OUString > SAL_CALL _getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
215 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL _getTypes( ) throw(::com::sun::star::uno::RuntimeException);
217 void setMaster( SvxShapeMaster* pMaster );
219 // SfxListener
220 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
222 // XAggregation
223 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
225 // XNamed
226 virtual OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException);
227 virtual void SAL_CALL setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
229 // XShapeDescriptor
230 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
232 // XShape
233 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
234 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
235 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
236 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
238 // XComponent
239 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
240 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
241 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
243 // XPropertySet
244 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
245 virtual void SAL_CALL setPropertyValue( const 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);
246 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
247 virtual void SAL_CALL addPropertyChangeListener( const 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);
248 virtual void SAL_CALL removePropertyChangeListener( const 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);
249 virtual void SAL_CALL addVetoableChangeListener( const 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);
250 virtual void SAL_CALL removeVetoableChangeListener( const 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);
252 // XMultiPropertySet
253 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< 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);
254 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
255 virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
256 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
257 virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
259 // XPropertyState
260 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
261 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
262 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
263 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
265 // XMultiPropertyStates
266 virtual void SAL_CALL setAllPropertiesToDefault()
267 throw (::com::sun::star::uno::RuntimeException);
268 virtual void SAL_CALL setPropertiesToDefault(
269 const ::com::sun::star::uno::Sequence<
270 OUString >& aPropertyNames )
271 throw (::com::sun::star::beans::UnknownPropertyException,
272 ::com::sun::star::uno::RuntimeException);
273 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
274 SAL_CALL getPropertyDefaults(
275 const ::com::sun::star::uno::Sequence<
276 OUString >& aPropertyNames )
277 throw (::com::sun::star::beans::UnknownPropertyException,
278 ::com::sun::star::lang::WrappedTargetException,
279 ::com::sun::star::uno::RuntimeException);
281 // XServiceInfo
282 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
283 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
284 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
286 // XGluePointsSupplier
287 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getGluePoints( ) throw(::com::sun::star::uno::RuntimeException);
289 // XChild
290 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw(::com::sun::star::uno::RuntimeException);
291 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);
293 // XTypeProvider
294 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
295 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
297 // XActionLockable
298 virtual sal_Bool SAL_CALL isActionLocked( ) throw (::com::sun::star::uno::RuntimeException);
299 virtual void SAL_CALL addActionLock( ) throw (::com::sun::star::uno::RuntimeException);
300 virtual void SAL_CALL removeActionLock( ) throw (::com::sun::star::uno::RuntimeException);
301 virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException);
302 virtual sal_Int16 SAL_CALL resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException);
304 private:
305 /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
307 SVX_DLLPRIVATE void impl_initFromSdrObject();
308 /// CTOR-Impl
309 SVX_DLLPRIVATE void impl_construct();
312 #include <editeng/unotext.hxx>
314 class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
316 protected:
317 /** called from the XActionLockable interface methods on initial locking */
318 virtual void lock();
320 /** called from the XActionLockable interface methods on final unlock */
321 virtual void unlock();
323 protected:
324 // overide these for special property handling in subcasses. Return true if property is handled
325 virtual bool setPropertyValueImpl( const 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);
326 virtual bool getPropertyValueImpl( const 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);
327 virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
328 virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
330 public:
331 SvxShapeText( SdrObject* pObj ) throw ();
332 SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
333 virtual ~SvxShapeText() throw ();
335 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
337 // XInterface
338 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
339 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
340 virtual void SAL_CALL acquire() throw();
341 virtual void SAL_CALL release() throw();
343 // XServiceInfo
344 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
345 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
346 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
348 // ::com::sun::star::text::XTextRange
349 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException);
350 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException);
351 virtual OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException);
352 virtual void SAL_CALL setString( const OUString& aString ) throw(::com::sun::star::uno::RuntimeException);
354 // XUnoTunnel
355 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
357 // XTypeProvider
358 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
359 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
362 class SvxShapeRect : public SvxShapeText
364 public:
365 SvxShapeRect( SdrObject* pObj ) throw ();
366 virtual ~SvxShapeRect() throw ();
368 // XInterface
369 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
370 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
371 virtual void SAL_CALL acquire() throw();
372 virtual void SAL_CALL release() throw();
374 // XServiceInfo
375 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
377 #include <com/sun/star/drawing/XShapes.hpp>
378 #include <com/sun/star/drawing/XShapeGroup.hpp>
379 #include <com/sun/star/container/XIndexAccess.hpp>
381 /***********************************************************************
383 ***********************************************************************/
384 class SvxShapeGroup : public SvxShape,
385 public ::com::sun::star::drawing::XShapeGroup,
386 public ::com::sun::star::drawing::XShapes
388 private:
389 rtl::Reference< SvxDrawPage> mxPage;
391 public:
392 SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
393 virtual ~SvxShapeGroup() throw ();
395 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
397 // XInterface
398 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
399 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
400 virtual void SAL_CALL acquire() throw();
401 virtual void SAL_CALL release() throw();
403 // XShapes
404 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
405 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
407 // XElementAccess
408 virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
409 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
411 // XIndexAccess
412 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
413 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);
415 // XShapeDescriptor
416 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
418 // XShape
419 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
420 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
421 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
422 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
424 // XShapeGroup
425 virtual void SAL_CALL enterGroup( ) throw(::com::sun::star::uno::RuntimeException);
426 virtual void SAL_CALL leaveGroup( ) throw(::com::sun::star::uno::RuntimeException);
428 // XServiceInfo
429 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
431 // XTypeProvider
432 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
433 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
435 #include <com/sun/star/drawing/XConnectorShape.hpp>
437 /***********************************************************************
439 ***********************************************************************/
440 class SvxShapeConnector : public ::com::sun::star::drawing::XConnectorShape,
441 public SvxShapeText
443 public:
444 SvxShapeConnector( SdrObject* pObj ) throw();
445 virtual ~SvxShapeConnector() throw();
447 // XInterface
448 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
449 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
450 virtual void SAL_CALL acquire() throw();
451 virtual void SAL_CALL release() throw();
453 // XShapeDescriptor
454 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
456 // XShape
457 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
458 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
459 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
460 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
462 // XConnectorShape
463 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);
464 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);
465 virtual void SAL_CALL disconnectBegin( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
466 virtual void SAL_CALL disconnectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
468 // XServiceInfo
469 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
471 // XTypeProvider
472 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
473 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
475 #include <com/sun/star/drawing/XControlShape.hpp>
477 /***********************************************************************
479 ***********************************************************************/
480 class SVX_DLLPUBLIC SvxShapeControl : public ::com::sun::star::drawing::XControlShape, public SvxShapeText
482 protected:
483 using SvxUnoTextRangeBase::setPropertyValue;
484 using SvxUnoTextRangeBase::getPropertyValue;
486 public:
487 SvxShapeControl( SdrObject* pObj ) throw();
488 virtual ~SvxShapeControl() throw();
490 // XInterface
491 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
492 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
493 virtual void SAL_CALL acquire() throw();
494 virtual void SAL_CALL release() throw();
496 // XPropertySet
497 virtual void SAL_CALL setPropertyValue( const 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);
498 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
500 // XPropertyState
501 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
502 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
503 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
505 // XShapeDescriptor
506 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
508 // XShape
509 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
510 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
511 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
512 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
514 // XControlShape
515 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getControl() throw(::com::sun::star::uno::RuntimeException);
516 virtual void SAL_CALL setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xControl ) throw(::com::sun::star::uno::RuntimeException);
518 // XServiceInfo
519 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
521 // XTypeProvider
522 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
523 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
526 /***********************************************************************
528 ***********************************************************************/
529 class SvxShapeDimensioning : public SvxShapeText
531 public:
532 SvxShapeDimensioning( SdrObject* pObj ) throw();
533 virtual ~SvxShapeDimensioning() throw();
535 // XServiceInfo
536 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
539 /***********************************************************************
541 ***********************************************************************/
542 class SvxShapeCircle : public SvxShapeText
544 public:
545 SvxShapeCircle( SdrObject* pObj ) throw ();
546 virtual ~SvxShapeCircle() throw ();
548 // XServiceInfo
549 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
552 /***********************************************************************
554 ***********************************************************************/
556 // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
557 class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
559 protected:
560 // overide these for special property handling in subcasses. Return true if property is handled
561 virtual bool setPropertyValueImpl( const 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);
562 virtual bool getPropertyValueImpl( const 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);
564 void resetModifiedState();
566 const SvGlobalName GetClassName_Impl(OUString& rHexCLSID);
567 public:
568 SvxOle2Shape( SdrObject* pObj ) throw();
569 SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
570 virtual ~SvxOle2Shape() throw();
572 sal_Bool createObject( const SvGlobalName &aClassName );
574 sal_Bool createLink( const OUString& aLinkURL );
576 // XInterface
577 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
581 #include <basegfx/polygon/b2dpolypolygon.hxx>
583 /***********************************************************************
585 ***********************************************************************/
586 class SvxShapePolyPolygon : public SvxShapeText
588 private:
589 ::com::sun::star::drawing::PolygonKind mePolygonKind;
591 protected:
592 using SvxUnoTextRangeBase::setPropertyValue;
593 using SvxUnoTextRangeBase::getPropertyValue;
595 // overide these for special property handling in subcasses. Return true if property is handled
596 virtual bool setPropertyValueImpl( const 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);
597 virtual bool getPropertyValueImpl( const 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);
599 public:
600 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);
601 virtual ~SvxShapePolyPolygon() throw();
603 // Local support functions
604 ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw();
605 void SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw();
606 basegfx::B2DPolyPolygon GetPolygon() const throw();
608 // XServiceInfo
609 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
612 /***********************************************************************
614 ***********************************************************************/
616 class SvxShapePolyPolygonBezier : public SvxShapeText
618 private:
619 ::com::sun::star::drawing::PolygonKind mePolygonKind;
621 protected:
622 using SvxUnoTextRangeBase::setPropertyValue;
623 using SvxUnoTextRangeBase::getPropertyValue;
625 public:
626 // overide these for special property handling in subcasses. Return true if property is handled
627 virtual bool setPropertyValueImpl( const 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);
628 virtual bool getPropertyValueImpl( const 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);
630 SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
631 virtual ~SvxShapePolyPolygonBezier() throw();
633 // Local support functions
634 ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw();
635 void SetPolygon(const basegfx::B2DPolyPolygon & rNew) throw();
636 basegfx::B2DPolyPolygon GetPolygon() const throw();
638 // XServiceInfo
639 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
642 /***********************************************************************
644 ***********************************************************************/
645 class SvxGraphicObject : public SvxShapeText
647 protected:
648 using SvxUnoTextRangeBase::setPropertyValue;
649 using SvxUnoTextRangeBase::getPropertyValue;
651 // overide these for special property handling in subcasses. Return true if property is handled
652 virtual bool setPropertyValueImpl( const 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);
653 virtual bool getPropertyValueImpl( const 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);
655 public:
656 SvxGraphicObject( SdrObject* pObj, OUString const & referer ) throw();
657 virtual ~SvxGraphicObject() throw();
659 private:
660 OUString referer_;
663 /***********************************************************************
665 ***********************************************************************/
666 class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape
668 private:
669 rtl::Reference< SvxDrawPage > mxPage;
671 protected:
672 using SvxShape::setPropertyValue;
673 using SvxShape::getPropertyValue;
675 public:
676 Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
677 // overide these for special property handling in subcasses. Return true if property is handled
678 virtual bool setPropertyValueImpl( const 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);
679 virtual bool getPropertyValueImpl( const 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);
681 virtual ~Svx3DSceneObject() throw();
683 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
685 // XInterface
686 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
687 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
688 virtual void SAL_CALL acquire() throw();
689 virtual void SAL_CALL release() throw();
691 // XShapes
692 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
693 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
695 // XElementAccess
696 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
697 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
699 // XIndexAccess
700 virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) ;
701 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);
703 // XServiceInfo
704 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
706 // XTypeProvider
707 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
708 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
711 /***********************************************************************
713 ***********************************************************************/
714 class Svx3DCubeObject : public SvxShape
716 protected:
717 // overide these for special property handling in subcasses. Return true if property is handled
718 virtual bool setPropertyValueImpl( const 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);
719 virtual bool getPropertyValueImpl( const 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);
721 public:
722 Svx3DCubeObject( SdrObject* pObj ) throw();
723 virtual ~Svx3DCubeObject() throw();
725 // XServiceInfo
726 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
729 /***********************************************************************
731 ***********************************************************************/
732 class Svx3DSphereObject : public SvxShape
734 public:
735 Svx3DSphereObject( SdrObject* pObj ) throw();
736 protected:
737 // overide these for special property handling in subcasses. Return true if property is handled
738 virtual bool setPropertyValueImpl( const 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);
739 virtual bool getPropertyValueImpl( const 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);
741 virtual ~Svx3DSphereObject() throw();
743 // XServiceInfo
744 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
747 /***********************************************************************
749 ***********************************************************************/
750 class Svx3DLatheObject : public SvxShape
752 protected:
753 // overide these for special property handling in subcasses. Return true if property is handled
754 virtual bool setPropertyValueImpl( const 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 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);
757 public:
758 Svx3DLatheObject( SdrObject* pObj ) throw();
759 virtual ~Svx3DLatheObject() throw();
761 // XServiceInfo
762 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
765 /***********************************************************************
767 ***********************************************************************/
768 class Svx3DExtrudeObject : public SvxShape
770 public:
771 Svx3DExtrudeObject( SdrObject* pObj ) throw();
772 protected:
773 // overide these for special property handling in subcasses. Return true if property is handled
774 virtual bool setPropertyValueImpl( const 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);
775 virtual bool getPropertyValueImpl( const 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);
777 virtual ~Svx3DExtrudeObject() throw();
779 // XServiceInfo
780 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
783 /***********************************************************************
785 ***********************************************************************/
786 class Svx3DPolygonObject : public SvxShape
788 protected:
789 // overide these for special property handling in subcasses. Return true if property is handled
790 virtual bool setPropertyValueImpl( const 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 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);
793 public:
794 Svx3DPolygonObject( SdrObject* pObj ) throw();
795 virtual ~Svx3DPolygonObject() throw();
797 // XServiceInfo
798 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
801 /***********************************************************************
803 ***********************************************************************/
804 typedef ::cppu::WeakAggImplHelper1<
805 ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter
806 > SvxShape_UnoImplHelper1;
808 class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1
810 private:
811 rtl::Reference< SvxDrawPage > mxPage;
813 protected:
814 using SvxUnoTextRangeBase::setPropertyValue;
815 using SvxUnoTextRangeBase::getPropertyValue;
817 public:
818 SvxCustomShape( SdrObject* pObj ) throw ();
819 // overide these for special property handling in subcasses. Return true if property is handled
820 virtual bool getPropertyValueImpl( const 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);
823 virtual ~SvxCustomShape() throw ();
825 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
827 // XInterface
828 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
829 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
830 virtual void SAL_CALL acquire() throw();
831 virtual void SAL_CALL release() throw();
833 // XShapeDescriptor
834 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
836 // XShape
837 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
838 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
839 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
840 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
842 // XPropertySet
843 void SAL_CALL setPropertyValue( const 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);
845 // XTypeProvider
846 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
847 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
849 //XEnhancedCustomShapeDefaulter
850 virtual void SAL_CALL createCustomShapeDefaults( const OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException);
853 /***********************************************************************
855 ***********************************************************************/
857 class SvxMediaShape : public SvxShape
859 public:
860 SvxMediaShape( SdrObject* pObj, OUString const & referer ) throw();
861 virtual ~SvxMediaShape() throw();
863 protected:
864 // overide these for special property handling in subcasses. Return true if property is handled
865 virtual bool setPropertyValueImpl( const 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);
866 virtual bool getPropertyValueImpl( const 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);
868 private:
869 OUString referer_;
872 #endif
874 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */