Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / unoshape.hxx
blob9ca963b9e545fb72f5d4bded959a8e34ffbf778e
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/drawing/XShapes.hpp>
37 #include <com/sun/star/drawing/XShapes2.hpp>
38 #include <com/sun/star/drawing/XShapeGroup.hpp>
39 #include <com/sun/star/container/XIndexAccess.hpp>
40 #include <com/sun/star/container/XNamed.hpp>
41 #include <com/sun/star/container/XChild.hpp>
42 #include <com/sun/star/beans/XMultiPropertySet.hpp>
43 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
44 #include <sal/types.h>
45 #include <tools/weakbase.hxx>
46 #include <svl/lstner.hxx>
47 #include <editeng/unoipset.hxx>
48 #include <cppuhelper/weak.hxx>
49 #include <cppuhelper/weakagg.hxx>
50 #include <cppuhelper/interfacecontainer.h>
51 #include <osl/mutex.hxx>
52 #include <svx/svxdllapi.h>
53 #include <rtl/ref.hxx>
54 #include <com/sun/star/uno/Any.hxx>
56 #include <svx/svdouno.hxx>
58 #include <comphelper/servicehelper.hxx>
60 #include <cppuhelper/implbase1.hxx>
61 #include <cppuhelper/implbase12.hxx>
63 #include <svx/unoprov.hxx>
65 class SfxItemSet;
66 class SdrModel;
67 class SvxDrawPage;
68 class SvGlobalName;
69 class Pair;
70 class IOpenGLRenderer;
72 // Dimension arrows change size/position on save/reload (#i59051#)
73 namespace basegfx
75 class B2DPolyPolygon;
76 } // end of namespace basegfx
78 class SvxShapeMutex
80 protected:
81 ::osl::Mutex maMutex;
84 struct SvxShapeImpl;
85 class SvxShapeMaster;
86 class SvxItemPropertySet;
87 class SfxItemSet;
89 void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SfxItemPropertySimpleEntry* pMap,
90 const com::sun::star::uno::Any& rVal, SfxItemSet& rSet );
92 com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet );
95 // WARNING: if you update the supported interfaces,
96 // also update SvxShape::_getTypes()
97 typedef ::cppu::WeakAggImplHelper12<
98 ::com::sun::star::drawing::XShape,
99 ::com::sun::star::lang::XComponent,
100 ::com::sun::star::beans::XPropertySet,
101 ::com::sun::star::beans::XMultiPropertySet,
102 ::com::sun::star::beans::XPropertyState,
103 ::com::sun::star::lang::XUnoTunnel,
104 ::com::sun::star::container::XNamed,
105 ::com::sun::star::drawing::XGluePointsSupplier,
106 ::com::sun::star::container::XChild,
107 ::com::sun::star::lang::XServiceInfo,
108 ::com::sun::star::document::XActionLockable,
109 ::com::sun::star::beans::XMultiPropertyStates> SvxShape_UnoImplHelper;
111 class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
112 public SfxListener,
113 public SvxShapeMutex
115 private:
116 ::com::sun::star::awt::Size maSize;
117 ::com::sun::star::awt::Point maPosition;
118 OUString maShapeType;
119 OUString maShapeName;
121 /** these members are used to optimize XMultiProperty calls */
122 SvxShapeImpl* mpImpl;
123 bool mbIsMultiPropertyCall;
125 ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XIndexContainer > mxGluePoints;
127 protected:
128 friend class SvxDrawPage;
129 friend class SvxShapeConnector;
130 friend class SdXShape;
132 const SvxItemPropertySet* mpPropSet;
133 const SfxItemPropertyMapEntry* maPropMapEntries;
135 ::tools::WeakReference< SdrObject > mpObj;
136 SdrModel* mpModel;
137 // translations for writer, which works in TWIPS
138 void ForceMetricToItemPoolMetric(Pair& rPoint) const throw();
139 void ForceMetricTo100th_mm(Pair& rPoint) const throw();
140 // Dimension arrows change size/position on save/reload (#i59051#)
141 void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
142 void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
144 ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
146 bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName );
148 /** called from the XActionLockable interface methods on initial locking */
149 virtual void lock();
151 /** called from the XActionLockable interface methods on final unlock */
152 virtual void unlock();
154 /** used from the XActionLockable interface */
155 sal_uInt16 mnLockCount;
157 const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
159 void updateShapeKind();
160 void endSetPropertyValues();
162 // override these for special property handling in subcasses. Return true if property is handled
163 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, std::exception);
164 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, std::exception);
165 virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
166 virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
168 public:
169 SvxShape( SdrObject* pObj ) throw (css::uno::RuntimeException);
170 SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw (css::uno::RuntimeException);
171 SvxShape() throw (css::uno::RuntimeException);
172 virtual ~SvxShape() throw ();
174 // Internals
175 void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
176 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
177 /** takes the ownership of the SdrObject.
179 When the shape is disposed, and it has the ownership of its associated SdrObject, then
180 it will delete this object.
182 void TakeSdrObjectOwnership();
183 bool HasSdrObjectOwnership() const;
185 void ChangeModel( SdrModel* pNewModel );
187 void InvalidateSdrObject() { mpObj.reset( NULL ); };
188 const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
189 SdrObject* GetSdrObject() const {return mpObj.get();}
190 void SetShapeType( const OUString& ShapeType ) { maShapeType = ShapeType; }
191 ::com::sun::star::uno::Any GetBitmap( bool bMetaFile = false ) const
192 throw (css::uno::RuntimeException, std::exception);
194 svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
196 void setShapeKind( sal_uInt32 nKind );
197 sal_uInt32 getShapeKind() const;
199 // styles need this
200 static bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet, SdrModel* pModel );
201 static bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet );
203 /** same as SetFillAttribute but for property names instead of which ids,
204 and the property found is returned instead of set at the object
205 directly.
208 UNO3_GETIMPLEMENTATION_DECL( SvxShape )
210 // access methods for master objects
211 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL _getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
212 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, std::exception);
213 ::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);
215 ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
216 void SAL_CALL _setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
217 ::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);
219 ::com::sun::star::uno::Sequence< OUString > SAL_CALL _getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
221 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL _getTypes( ) throw(::com::sun::star::uno::RuntimeException);
223 void setMaster( SvxShapeMaster* pMaster );
225 // SfxListener
226 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw () SAL_OVERRIDE;
228 // XAggregation
229 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
231 // XNamed
232 virtual OUString SAL_CALL getName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
233 virtual void SAL_CALL setName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
235 // XShapeDescriptor
236 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
238 // XShape
239 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
240 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
241 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
242 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
244 // XComponent
245 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
246 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
247 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
249 // XPropertySet
250 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
251 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, std::exception) SAL_OVERRIDE;
252 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, std::exception) SAL_OVERRIDE;
253 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, std::exception) SAL_OVERRIDE;
254 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, std::exception) SAL_OVERRIDE;
255 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, std::exception) SAL_OVERRIDE;
256 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, std::exception) SAL_OVERRIDE;
258 // XMultiPropertySet
259 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, std::exception) SAL_OVERRIDE;
260 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, std::exception) SAL_OVERRIDE;
261 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, std::exception) SAL_OVERRIDE;
262 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
263 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, std::exception) SAL_OVERRIDE;
265 // XPropertyState
266 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
267 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, std::exception) SAL_OVERRIDE;
268 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
269 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, std::exception) SAL_OVERRIDE;
271 // XMultiPropertyStates
272 virtual void SAL_CALL setAllPropertiesToDefault()
273 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
274 virtual void SAL_CALL setPropertiesToDefault(
275 const ::com::sun::star::uno::Sequence<
276 OUString >& aPropertyNames )
277 throw (::com::sun::star::beans::UnknownPropertyException,
278 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
279 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
280 SAL_CALL getPropertyDefaults(
281 const ::com::sun::star::uno::Sequence<
282 OUString >& aPropertyNames )
283 throw (::com::sun::star::beans::UnknownPropertyException,
284 ::com::sun::star::lang::WrappedTargetException,
285 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
287 // XServiceInfo
288 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
289 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
290 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
292 // XGluePointsSupplier
293 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getGluePoints( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
295 // XChild
296 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
297 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, std::exception) SAL_OVERRIDE;
299 // XTypeProvider
300 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
301 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
303 // XActionLockable
304 virtual sal_Bool SAL_CALL isActionLocked( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
305 virtual void SAL_CALL addActionLock( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
306 virtual void SAL_CALL removeActionLock( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
307 virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
308 virtual sal_Int16 SAL_CALL resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
310 private:
311 /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
313 SVX_DLLPRIVATE void impl_initFromSdrObject();
314 /// CTOR-Impl
315 SVX_DLLPRIVATE void impl_construct();
318 #include <editeng/unotext.hxx>
320 class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
322 protected:
323 /** called from the XActionLockable interface methods on initial locking */
324 virtual void lock() SAL_OVERRIDE;
326 /** called from the XActionLockable interface methods on final unlock */
327 virtual void unlock() SAL_OVERRIDE;
329 protected:
330 // override these for special property handling in subcasses. Return true if property is handled
331 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, std::exception) SAL_OVERRIDE;
332 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, std::exception) SAL_OVERRIDE;
333 virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
334 virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
336 public:
337 SvxShapeText( SdrObject* pObj ) throw ();
338 SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
339 virtual ~SvxShapeText() throw ();
341 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) SAL_OVERRIDE;
343 // XInterface
344 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
345 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
346 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
347 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
349 // XServiceInfo
350 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
351 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
352 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
354 // ::com::sun::star::text::XTextRange
355 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
356 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
357 virtual OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
358 virtual void SAL_CALL setString( const OUString& aString ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
360 // XUnoTunnel
361 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
363 // XTypeProvider
364 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
365 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
368 class SvxShapeRect : public SvxShapeText
370 public:
371 SvxShapeRect( SdrObject* pObj ) throw ();
372 virtual ~SvxShapeRect() throw ();
374 // XInterface
375 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
376 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
377 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
378 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
380 // XServiceInfo
381 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
384 /***********************************************************************
386 ***********************************************************************/
387 class SvxShapeGroup : public SvxShape,
388 public ::com::sun::star::drawing::XShapeGroup,
389 public ::com::sun::star::drawing::XShapes2,
390 public ::com::sun::star::drawing::XShapes
392 private:
393 rtl::Reference< SvxDrawPage> mxPage;
395 void addUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, size_t nPos );
397 public:
398 SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
399 virtual ~SvxShapeGroup() throw ();
401 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) SAL_OVERRIDE;
403 // XInterface
404 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
405 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
406 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
407 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
409 // XShapes
410 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
411 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
413 // XShapes2
414 virtual void SAL_CALL addTop( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
415 virtual void SAL_CALL addBottom( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
417 // XElementAccess
418 virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
419 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
421 // XIndexAccess
422 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
423 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, std::exception) SAL_OVERRIDE;
425 // XShapeDescriptor
426 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
428 // XShape
429 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
430 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
431 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
432 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
434 // XShapeGroup
435 virtual void SAL_CALL enterGroup( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
436 virtual void SAL_CALL leaveGroup( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
438 // XServiceInfo
439 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
441 // XTypeProvider
442 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
443 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
445 #include <com/sun/star/drawing/XConnectorShape.hpp>
447 /***********************************************************************
449 ***********************************************************************/
450 class SvxShapeConnector : public ::com::sun::star::drawing::XConnectorShape,
451 public SvxShapeText
453 public:
454 SvxShapeConnector( SdrObject* pObj ) throw();
455 virtual ~SvxShapeConnector() throw();
457 // XInterface
458 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
459 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
460 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
461 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
463 // XShapeDescriptor
464 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
466 // XShape
467 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
468 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
469 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
470 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
472 // XConnectorShape
473 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, std::exception) SAL_OVERRIDE;
474 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, std::exception) SAL_OVERRIDE;
475 virtual void SAL_CALL disconnectBegin( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
476 virtual void SAL_CALL disconnectEnd( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XConnectableShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
478 // XServiceInfo
479 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
481 // XTypeProvider
482 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
483 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
485 #include <com/sun/star/drawing/XControlShape.hpp>
487 /***********************************************************************
489 ***********************************************************************/
490 class SVX_DLLPUBLIC SvxShapeControl : public ::com::sun::star::drawing::XControlShape, public SvxShapeText
492 protected:
493 using SvxUnoTextRangeBase::setPropertyValue;
494 using SvxUnoTextRangeBase::getPropertyValue;
496 public:
497 SvxShapeControl( SdrObject* pObj ) throw();
498 virtual ~SvxShapeControl() throw();
500 // XInterface
501 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
502 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
503 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
504 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
506 // XPropertySet
507 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, std::exception) SAL_OVERRIDE;
508 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, std::exception) SAL_OVERRIDE;
510 // XPropertyState
511 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
512 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
513 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, std::exception) SAL_OVERRIDE;
515 // XShapeDescriptor
516 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
518 // XShape
519 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
520 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
521 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
522 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
524 // XControlShape
525 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getControl() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
526 virtual void SAL_CALL setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xControl ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
528 // XServiceInfo
529 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
531 // XTypeProvider
532 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
533 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
536 /***********************************************************************
538 ***********************************************************************/
539 class SvxShapeDimensioning : public SvxShapeText
541 public:
542 SvxShapeDimensioning( SdrObject* pObj ) throw();
543 virtual ~SvxShapeDimensioning() throw();
545 // XServiceInfo
546 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
549 /***********************************************************************
551 ***********************************************************************/
552 class SvxShapeCircle : public SvxShapeText
554 public:
555 SvxShapeCircle( SdrObject* pObj ) throw ();
556 virtual ~SvxShapeCircle() throw ();
558 // XServiceInfo
559 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
562 /***********************************************************************
564 ***********************************************************************/
566 // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
567 class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
569 protected:
570 // override these for special property handling in subcasses. Return true if property is handled
571 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, std::exception) SAL_OVERRIDE;
572 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, std::exception) SAL_OVERRIDE;
574 void resetModifiedState();
576 const SvGlobalName GetClassName_Impl(OUString& rHexCLSID);
577 public:
578 SvxOle2Shape( SdrObject* pObj ) throw();
579 SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
580 virtual ~SvxOle2Shape() throw();
582 bool createObject( const SvGlobalName &aClassName );
584 bool createLink( const OUString& aLinkURL );
586 // XInterface
587 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
591 #include <basegfx/polygon/b2dpolypolygon.hxx>
593 /***********************************************************************
595 ***********************************************************************/
596 class SvxShapePolyPolygon : public SvxShapeText
598 private:
599 ::com::sun::star::drawing::PolygonKind mePolygonKind;
601 protected:
602 using SvxUnoTextRangeBase::setPropertyValue;
603 using SvxUnoTextRangeBase::getPropertyValue;
605 // override these for special property handling in subcasses. Return true if property is handled
606 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) SAL_OVERRIDE;
607 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) SAL_OVERRIDE;
609 public:
610 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);
611 virtual ~SvxShapePolyPolygon() throw();
613 // Local support functions
614 ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw() { return mePolygonKind;}
615 void SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw(css::uno::RuntimeException);
616 basegfx::B2DPolyPolygon GetPolygon() const throw();
618 // XServiceInfo
619 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
622 /***********************************************************************
624 ***********************************************************************/
626 class SvxShapePolyPolygonBezier : public SvxShapeText
628 private:
629 ::com::sun::star::drawing::PolygonKind mePolygonKind;
631 protected:
632 using SvxUnoTextRangeBase::setPropertyValue;
633 using SvxUnoTextRangeBase::getPropertyValue;
635 public:
636 // override these for special property handling in subcasses. Return true if property is handled
637 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) SAL_OVERRIDE;
638 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) SAL_OVERRIDE;
640 SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
641 virtual ~SvxShapePolyPolygonBezier() throw();
643 // Local support functions
644 ::com::sun::star::drawing::PolygonKind GetPolygonKind() const throw() { return mePolygonKind;}
645 void SetPolygon(const basegfx::B2DPolyPolygon & rNew) throw(css::uno::RuntimeException);
646 basegfx::B2DPolyPolygon GetPolygon() const throw();
648 // XServiceInfo
649 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
652 /***********************************************************************
654 ***********************************************************************/
655 class SvxGraphicObject : public SvxShapeText
657 protected:
658 using SvxUnoTextRangeBase::setPropertyValue;
659 using SvxUnoTextRangeBase::getPropertyValue;
661 // override these for special property handling in subcasses. Return true if property is handled
662 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, std::exception) SAL_OVERRIDE;
663 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) SAL_OVERRIDE;
665 public:
666 SvxGraphicObject( SdrObject* pObj, OUString const & referer ) throw();
667 virtual ~SvxGraphicObject() throw();
669 private:
670 OUString referer_;
673 /***********************************************************************
675 ***********************************************************************/
676 class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape
678 private:
679 rtl::Reference< SvxDrawPage > mxPage;
681 protected:
682 using SvxShape::setPropertyValue;
683 using SvxShape::getPropertyValue;
685 public:
686 Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
687 // override these for special property handling in subcasses. Return true if property is handled
688 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, std::exception) SAL_OVERRIDE;
689 virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty,
690 css::uno::Any& rValue )
691 throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
692 css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
694 virtual ~Svx3DSceneObject() throw();
696 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) SAL_OVERRIDE;
698 // XInterface
699 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
700 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
701 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
702 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
704 // XShapes
705 virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
706 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
708 // XElementAccess
709 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
710 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
712 // XIndexAccess
713 virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
714 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, std::exception) SAL_OVERRIDE;
716 // XServiceInfo
717 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
719 // XTypeProvider
720 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
721 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
724 /***********************************************************************
726 ***********************************************************************/
727 class Svx3DCubeObject : public SvxShape
729 protected:
730 // override these for special property handling in subcasses. Return true if property is handled
731 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) SAL_OVERRIDE;
732 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, std::exception) SAL_OVERRIDE;
734 public:
735 Svx3DCubeObject( SdrObject* pObj ) throw();
736 virtual ~Svx3DCubeObject() throw();
738 // XServiceInfo
739 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
742 /***********************************************************************
744 ***********************************************************************/
745 class Svx3DSphereObject : public SvxShape
747 public:
748 Svx3DSphereObject( SdrObject* pObj ) throw();
749 protected:
750 // override 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) SAL_OVERRIDE;
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, std::exception) SAL_OVERRIDE;
754 virtual ~Svx3DSphereObject() throw();
756 // XServiceInfo
757 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
760 /***********************************************************************
762 ***********************************************************************/
763 class Svx3DLatheObject : public SvxShape
765 protected:
766 // override these for special property handling in subcasses. Return true if property is handled
767 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) SAL_OVERRIDE;
768 virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
770 public:
771 Svx3DLatheObject( SdrObject* pObj ) throw();
772 virtual ~Svx3DLatheObject() throw();
774 // XServiceInfo
775 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
778 /***********************************************************************
780 ***********************************************************************/
781 class Svx3DExtrudeObject : public SvxShape
783 public:
784 Svx3DExtrudeObject( SdrObject* pObj ) throw();
785 protected:
786 // override 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) SAL_OVERRIDE;
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, std::exception) SAL_OVERRIDE;
790 virtual ~Svx3DExtrudeObject() throw();
792 // XServiceInfo
793 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
796 /***********************************************************************
798 ***********************************************************************/
799 class Svx3DPolygonObject : public SvxShape
801 protected:
802 // override these for special property handling in subcasses. Return true if property is handled
803 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) SAL_OVERRIDE;
804 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, std::exception) SAL_OVERRIDE;
806 public:
807 Svx3DPolygonObject( SdrObject* pObj ) throw();
808 virtual ~Svx3DPolygonObject() throw();
810 // XServiceInfo
811 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
814 /***********************************************************************
816 ***********************************************************************/
817 typedef ::cppu::WeakAggImplHelper1<
818 ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter
819 > SvxShape_UnoImplHelper1;
821 class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1
823 private:
824 rtl::Reference< SvxDrawPage > mxPage;
826 protected:
827 using SvxUnoTextRangeBase::setPropertyValue;
828 using SvxUnoTextRangeBase::getPropertyValue;
830 public:
831 SvxCustomShape( SdrObject* pObj ) throw ();
832 // override these for special property handling in subcasses. Return true if property is handled
833 virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
836 virtual ~SvxCustomShape() throw ();
838 virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) SAL_OVERRIDE;
840 // XInterface
841 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
842 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
843 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
844 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
846 // XShapeDescriptor
847 virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
849 // XShape
850 virtual ::com::sun::star::awt::Point SAL_CALL getPosition() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
851 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
852 virtual ::com::sun::star::awt::Size SAL_CALL getSize() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
853 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
855 // XPropertySet
856 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, std::exception) SAL_OVERRIDE;
858 // XTypeProvider
859 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
860 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
862 //XEnhancedCustomShapeDefaulter
863 virtual void SAL_CALL createCustomShapeDefaults( const OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
866 /***********************************************************************
868 ***********************************************************************/
870 class SvxMediaShape : public SvxShape
872 public:
873 SvxMediaShape( SdrObject* pObj, OUString const & referer ) throw();
874 virtual ~SvxMediaShape() throw();
876 protected:
877 // override these for special property handling in subcasses. Return true if property is handled
878 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) SAL_OVERRIDE;
879 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, std::exception) SAL_OVERRIDE;
881 private:
882 OUString referer_;
885 class SVX_DLLPUBLIC SvxOpenGLObject : public SvxShape
887 public:
888 SvxOpenGLObject( SdrObject* pObj ) throw() : SvxShape(pObj){}
889 virtual ~SvxOpenGLObject() throw() {}
891 void setRenderer(IOpenGLRenderer* pRenderer);
892 IOpenGLRenderer* getRenderer();
896 * This is a really ugly hack for the chart2 OpenGL backend
897 * SvxShapeGroup::add only accepts objects derived from SvxShape and silently drops
898 * other objects. This fixes my life time problems but I will burn for it in hell.
900 * The object does nothing and should not be painted. It is just there to ensure that the
901 * wrapped object is not deleted prematurely.
903 class SVX_DLLPUBLIC SvxDummyShapeContainer : public SvxShape
905 private:
906 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >
907 m_xDummyObject;
909 public:
910 SvxDummyShapeContainer( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xWrappedObject );
911 virtual ~SvxDummyShapeContainer() throw();
913 com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > getWrappedShape()
914 { return m_xDummyObject; }
918 #endif
920 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */