update credits
[LibreOffice.git] / include / svx / unoshape.hxx
blob23cbf8811a3a695e2eb87ff9cb31c120c473d3c2
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 _SVX_UNOSHAPE_HXX
21 #define _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 ) throw();
657 virtual ~SvxGraphicObject() throw();
660 /***********************************************************************
662 ***********************************************************************/
663 class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape
665 private:
666 rtl::Reference< SvxDrawPage > mxPage;
668 protected:
669 using SvxShape::setPropertyValue;
670 using SvxShape::getPropertyValue;
672 public:
673 Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
674 // overide these for special property handling in subcasses. Return true if property is handled
675 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);
676 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);
678 virtual ~Svx3DSceneObject() throw();
680 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
682 // XInterface
683 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
684 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
685 virtual void SAL_CALL acquire() throw();
686 virtual void SAL_CALL release() throw();
688 // XShapes
689 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
690 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
692 // XElementAccess
693 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
694 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
696 // XIndexAccess
697 virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException) ;
698 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);
700 // XServiceInfo
701 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
703 // XTypeProvider
704 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
705 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
708 /***********************************************************************
710 ***********************************************************************/
711 class Svx3DCubeObject : public SvxShape
713 protected:
714 // overide these for special property handling in subcasses. Return true if property is handled
715 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);
716 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);
718 public:
719 Svx3DCubeObject( SdrObject* pObj ) throw();
720 virtual ~Svx3DCubeObject() throw();
722 // XServiceInfo
723 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
726 /***********************************************************************
728 ***********************************************************************/
729 class Svx3DSphereObject : public SvxShape
731 public:
732 Svx3DSphereObject( SdrObject* pObj ) throw();
733 protected:
734 // overide these for special property handling in subcasses. Return true if property is handled
735 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);
736 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);
738 virtual ~Svx3DSphereObject() throw();
740 // XServiceInfo
741 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
744 /***********************************************************************
746 ***********************************************************************/
747 class Svx3DLatheObject : public SvxShape
749 protected:
750 // overide these for special property handling in subcasses. Return true if property is handled
751 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);
752 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);
754 public:
755 Svx3DLatheObject( SdrObject* pObj ) throw();
756 virtual ~Svx3DLatheObject() throw();
758 // XServiceInfo
759 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
762 /***********************************************************************
764 ***********************************************************************/
765 class Svx3DExtrudeObject : public SvxShape
767 public:
768 Svx3DExtrudeObject( SdrObject* pObj ) throw();
769 protected:
770 // overide these for special property handling in subcasses. Return true if property is handled
771 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);
772 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);
774 virtual ~Svx3DExtrudeObject() throw();
776 // XServiceInfo
777 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
780 /***********************************************************************
782 ***********************************************************************/
783 class Svx3DPolygonObject : public SvxShape
785 protected:
786 // overide these for special property handling in subcasses. Return true if property is handled
787 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);
788 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);
790 public:
791 Svx3DPolygonObject( SdrObject* pObj ) throw();
792 virtual ~Svx3DPolygonObject() throw();
794 // XServiceInfo
795 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
798 /***********************************************************************
800 ***********************************************************************/
801 typedef ::cppu::WeakAggImplHelper1<
802 ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter
803 > SvxShape_UnoImplHelper1;
805 class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1
807 private:
808 rtl::Reference< SvxDrawPage > mxPage;
810 protected:
811 using SvxUnoTextRangeBase::setPropertyValue;
812 using SvxUnoTextRangeBase::getPropertyValue;
814 public:
815 SvxCustomShape( SdrObject* pObj ) throw ();
816 // overide these for special property handling in subcasses. Return true if property is handled
817 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);
820 virtual ~SvxCustomShape() throw ();
822 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
824 // XInterface
825 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
826 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
827 virtual void SAL_CALL acquire() throw();
828 virtual void SAL_CALL release() throw();
830 // XShapeDescriptor
831 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
833 // XShape
834 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException);
835 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
836 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException);
837 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
839 // XPropertySet
840 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);
842 // XTypeProvider
843 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
844 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
846 //XEnhancedCustomShapeDefaulter
847 virtual void SAL_CALL createCustomShapeDefaults( const OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException);
850 /***********************************************************************
852 ***********************************************************************/
854 class SvxMediaShape : public SvxShape
856 public:
857 SvxMediaShape( SdrObject* pObj ) throw();
858 virtual ~SvxMediaShape() throw();
860 protected:
861 // overide these for special property handling in subcasses. Return true if property is handled
862 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);
863 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);
866 #endif
868 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */