Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef _SVX_UNOSHAPE_HXX
21 : #define _SVX_UNOSHAPE_HXX
22 :
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>
51 :
52 : #include <svx/svdouno.hxx>
53 :
54 : #include <comphelper/servicehelper.hxx>
55 :
56 : #include <cppuhelper/implbase1.hxx>
57 : #include <cppuhelper/implbase12.hxx>
58 :
59 : #include <svx/unoprov.hxx>
60 :
61 : class SfxItemSet;
62 : class SdrModel;
63 : class SvxDrawPage;
64 : class SvGlobalName;
65 : class Pair;
66 :
67 : // Dimension arrows change size/position on save/reload (#i59051#)
68 : namespace basegfx
69 : {
70 : class B2DPolyPolygon;
71 : } // end of namespace basegfx
72 :
73 172423 : class SvxShapeMutex
74 : {
75 : protected:
76 : ::osl::Mutex maMutex;
77 : };
78 :
79 : struct SvxShapeImpl;
80 : class SvxShapeMaster;
81 : class SvxItemPropertySet;
82 : class SfxItemSet;
83 :
84 : void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap,
85 : const com::sun::star::uno::Any& rVal, SfxItemSet& rSet );
86 :
87 : com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet );
88 :
89 :
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;
105 :
106 : class SVX_DLLPUBLIC SvxShape : public SvxShape_UnoImplHelper,
107 : public SfxListener,
108 : public SvxShapeMutex
109 : {
110 : private:
111 : ::com::sun::star::awt::Size maSize;
112 : ::com::sun::star::awt::Point maPosition;
113 : OUString maShapeType;
114 : OUString maShapeName;
115 :
116 : /** these members are used to optimize XMultiProperty calls */
117 : SvxShapeImpl* mpImpl;
118 : bool mbIsMultiPropertyCall;
119 :
120 : ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XIndexContainer > mxGluePoints;
121 :
122 : protected:
123 : friend class SvxDrawPage;
124 : friend class SvxShapeConnector;
125 : friend class SdXShape;
126 :
127 : const SvxItemPropertySet* mpPropSet;
128 : const SfxItemPropertyMapEntry* maPropMapEntries;
129 :
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();
138 :
139 : ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
140 :
141 : sal_Bool SAL_CALL SetFillAttribute( sal_Int32 nWID, const OUString& rName );
142 :
143 : /** called from the XActionLockable interface methods on initial locking */
144 : virtual void lock();
145 :
146 : /** called from the XActionLockable interface methods on final unlock */
147 : virtual void unlock();
148 :
149 : /** used from the XActionLockable interface */
150 : sal_uInt16 mnLockCount;
151 :
152 2053 : const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
153 :
154 : void updateShapeKind();
155 : void endSetPropertyValues();
156 :
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);
162 :
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 ();
168 :
169 : // Internals
170 : void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet);
171 : virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
172 : /** takes the ownership of the SdrObject.
173 :
174 : When the shape is disposed, and it has the ownership of its associated SdrObject, then
175 : it will delete this object.
176 : */
177 : void TakeSdrObjectOwnership();
178 : bool HasSdrObjectOwnership() const;
179 :
180 : void ChangeModel( SdrModel* pNewModel );
181 :
182 12777 : void InvalidateSdrObject() { mpObj.reset( NULL ); };
183 : const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
184 71381 : SdrObject* GetSdrObject() const {return mpObj.get();}
185 913 : void SetShapeType( const OUString& ShapeType ) { maShapeType = ShapeType; }
186 : ::com::sun::star::uno::Any GetBitmap( sal_Bool bMetaFile = sal_False ) const throw ();
187 :
188 : ::svx::PropertyChangeNotifier& getShapePropertyChangeNotifier();
189 :
190 : void setShapeKind( sal_uInt32 nKind );
191 : sal_uInt32 getShapeKind() const;
192 :
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 );
196 :
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.
200 : */
201 :
202 : UNO3_GETIMPLEMENTATION_DECL( SvxShape )
203 :
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);
208 :
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);
212 :
213 : ::com::sun::star::uno::Sequence< OUString > SAL_CALL _getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
214 :
215 : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL _getTypes( ) throw(::com::sun::star::uno::RuntimeException);
216 :
217 : void setMaster( SvxShapeMaster* pMaster );
218 :
219 : // SfxListener
220 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
221 :
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);
224 :
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);
228 :
229 : // XShapeDescriptor
230 : virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
231 :
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);
237 :
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);
242 :
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);
251 :
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);
258 :
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);
264 :
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);
280 :
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);
285 :
286 : // XGluePointsSupplier
287 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getGluePoints( ) throw(::com::sun::star::uno::RuntimeException);
288 :
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);
292 :
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);
296 :
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);
303 :
304 : private:
305 : /** initializes SdrObj-dependent members. Only to be called when GetSdrObject() != NULL
306 : */
307 : SVX_DLLPRIVATE void impl_initFromSdrObject();
308 : /// CTOR-Impl
309 : SVX_DLLPRIVATE void impl_construct();
310 : };
311 :
312 : #include <editeng/unotext.hxx>
313 :
314 : class SVX_DLLPUBLIC SvxShapeText : public SvxShape, public SvxUnoTextBase
315 : {
316 : protected:
317 : /** called from the XActionLockable interface methods on initial locking */
318 : virtual void lock();
319 :
320 : /** called from the XActionLockable interface methods on final unlock */
321 : virtual void unlock();
322 :
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);
329 :
330 : public:
331 : SvxShapeText( SdrObject* pObj ) throw ();
332 : SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
333 : virtual ~SvxShapeText() throw ();
334 :
335 : virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
336 :
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();
342 :
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);
347 :
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);
353 :
354 : // XUnoTunnel
355 : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException);
356 :
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);
360 : };
361 :
362 : class SvxShapeRect : public SvxShapeText
363 : {
364 : public:
365 : SvxShapeRect( SdrObject* pObj ) throw ();
366 : virtual ~SvxShapeRect() throw ();
367 :
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();
373 :
374 : // XServiceInfo
375 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
376 : };
377 : #include <com/sun/star/drawing/XShapes.hpp>
378 : #include <com/sun/star/drawing/XShapeGroup.hpp>
379 : #include <com/sun/star/container/XIndexAccess.hpp>
380 :
381 : /***********************************************************************
382 : * *
383 : ***********************************************************************/
384 : class SvxShapeGroup : public SvxShape,
385 : public ::com::sun::star::drawing::XShapeGroup,
386 : public ::com::sun::star::drawing::XShapes
387 : {
388 : private:
389 : rtl::Reference< SvxDrawPage> mxPage;
390 :
391 : public:
392 : SvxShapeGroup( SdrObject* pObj,SvxDrawPage* pDrawPage ) throw ();
393 : virtual ~SvxShapeGroup() throw ();
394 :
395 : virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
396 :
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();
402 :
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);
406 :
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);
410 :
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);
414 :
415 : // XShapeDescriptor
416 : virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
417 :
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);
423 :
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);
427 :
428 : // XServiceInfo
429 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
430 :
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);
434 : };
435 : #include <com/sun/star/drawing/XConnectorShape.hpp>
436 :
437 : /***********************************************************************
438 : * *
439 : ***********************************************************************/
440 : class SvxShapeConnector : public ::com::sun::star::drawing::XConnectorShape,
441 : public SvxShapeText
442 : {
443 : public:
444 : SvxShapeConnector( SdrObject* pObj ) throw();
445 : virtual ~SvxShapeConnector() throw();
446 :
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();
452 :
453 : // XShapeDescriptor
454 : virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
455 :
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);
461 :
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);
467 :
468 : // XServiceInfo
469 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
470 :
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);
474 : };
475 : #include <com/sun/star/drawing/XControlShape.hpp>
476 :
477 : /***********************************************************************
478 : * *
479 : ***********************************************************************/
480 : class SVX_DLLPUBLIC SvxShapeControl : public ::com::sun::star::drawing::XControlShape, public SvxShapeText
481 : {
482 : protected:
483 : using SvxUnoTextRangeBase::setPropertyValue;
484 : using SvxUnoTextRangeBase::getPropertyValue;
485 :
486 : public:
487 : SvxShapeControl( SdrObject* pObj ) throw();
488 : virtual ~SvxShapeControl() throw();
489 :
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();
495 :
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);
499 :
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);
504 :
505 : // XShapeDescriptor
506 : virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
507 :
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);
513 :
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);
517 :
518 : // XServiceInfo
519 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
520 :
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);
524 : };
525 :
526 : /***********************************************************************
527 : * *
528 : ***********************************************************************/
529 : class SvxShapeDimensioning : public SvxShapeText
530 : {
531 : public:
532 : SvxShapeDimensioning( SdrObject* pObj ) throw();
533 : virtual ~SvxShapeDimensioning() throw();
534 :
535 : // XServiceInfo
536 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
537 : };
538 :
539 : /***********************************************************************
540 : * *
541 : ***********************************************************************/
542 : class SvxShapeCircle : public SvxShapeText
543 : {
544 : public:
545 : SvxShapeCircle( SdrObject* pObj ) throw ();
546 : virtual ~SvxShapeCircle() throw ();
547 :
548 : // XServiceInfo
549 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
550 : };
551 :
552 : /***********************************************************************
553 : * *
554 : ***********************************************************************/
555 :
556 : // #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
557 : class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
558 : {
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);
563 :
564 : void resetModifiedState();
565 :
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();
571 :
572 : sal_Bool createObject( const SvGlobalName &aClassName );
573 :
574 : sal_Bool createLink( const OUString& aLinkURL );
575 :
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);
578 : };
579 :
580 :
581 : #include <basegfx/polygon/b2dpolypolygon.hxx>
582 :
583 : /***********************************************************************
584 : * *
585 : ***********************************************************************/
586 : class SvxShapePolyPolygon : public SvxShapeText
587 : {
588 : private:
589 : ::com::sun::star::drawing::PolygonKind mePolygonKind;
590 :
591 : protected:
592 : using SvxUnoTextRangeBase::setPropertyValue;
593 : using SvxUnoTextRangeBase::getPropertyValue;
594 :
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);
598 :
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();
602 :
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();
607 :
608 : // XServiceInfo
609 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
610 : };
611 :
612 : /***********************************************************************
613 : * *
614 : ***********************************************************************/
615 :
616 : class SvxShapePolyPolygonBezier : public SvxShapeText
617 : {
618 : private:
619 : ::com::sun::star::drawing::PolygonKind mePolygonKind;
620 :
621 : protected:
622 : using SvxUnoTextRangeBase::setPropertyValue;
623 : using SvxUnoTextRangeBase::getPropertyValue;
624 :
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);
629 :
630 : SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
631 : virtual ~SvxShapePolyPolygonBezier() throw();
632 :
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();
637 :
638 : // XServiceInfo
639 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
640 : };
641 :
642 : /***********************************************************************
643 : * *
644 : ***********************************************************************/
645 : class SvxGraphicObject : public SvxShapeText
646 : {
647 : protected:
648 : using SvxUnoTextRangeBase::setPropertyValue;
649 : using SvxUnoTextRangeBase::getPropertyValue;
650 :
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);
654 :
655 : public:
656 : SvxGraphicObject( SdrObject* pObj ) throw();
657 : virtual ~SvxGraphicObject() throw();
658 : };
659 :
660 : /***********************************************************************
661 : * *
662 : ***********************************************************************/
663 : class Svx3DSceneObject : public ::com::sun::star::drawing::XShapes, public SvxShape
664 : {
665 : private:
666 : rtl::Reference< SvxDrawPage > mxPage;
667 :
668 : protected:
669 : using SvxShape::setPropertyValue;
670 : using SvxShape::getPropertyValue;
671 :
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);
677 :
678 : virtual ~Svx3DSceneObject() throw();
679 :
680 : virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
681 :
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();
687 :
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);
691 :
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);
695 :
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);
699 :
700 : // XServiceInfo
701 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
702 :
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);
706 : };
707 :
708 : /***********************************************************************
709 : * *
710 : ***********************************************************************/
711 : class Svx3DCubeObject : public SvxShape
712 : {
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);
717 :
718 : public:
719 : Svx3DCubeObject( SdrObject* pObj ) throw();
720 : virtual ~Svx3DCubeObject() throw();
721 :
722 : // XServiceInfo
723 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
724 : };
725 :
726 : /***********************************************************************
727 : * *
728 : ***********************************************************************/
729 : class Svx3DSphereObject : public SvxShape
730 : {
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);
737 :
738 : virtual ~Svx3DSphereObject() throw();
739 :
740 : // XServiceInfo
741 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
742 : };
743 :
744 : /***********************************************************************
745 : * *
746 : ***********************************************************************/
747 : class Svx3DLatheObject : public SvxShape
748 : {
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);
753 :
754 : public:
755 : Svx3DLatheObject( SdrObject* pObj ) throw();
756 : virtual ~Svx3DLatheObject() throw();
757 :
758 : // XServiceInfo
759 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
760 : };
761 :
762 : /***********************************************************************
763 : * *
764 : ***********************************************************************/
765 : class Svx3DExtrudeObject : public SvxShape
766 : {
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);
773 :
774 : virtual ~Svx3DExtrudeObject() throw();
775 :
776 : // XServiceInfo
777 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
778 : };
779 :
780 : /***********************************************************************
781 : * *
782 : ***********************************************************************/
783 : class Svx3DPolygonObject : public SvxShape
784 : {
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);
789 :
790 : public:
791 : Svx3DPolygonObject( SdrObject* pObj ) throw();
792 : virtual ~Svx3DPolygonObject() throw();
793 :
794 : // XServiceInfo
795 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
796 : };
797 :
798 : /***********************************************************************
799 : * *
800 : ***********************************************************************/
801 : typedef ::cppu::WeakAggImplHelper1<
802 : ::com::sun::star::drawing::XEnhancedCustomShapeDefaulter
803 : > SvxShape_UnoImplHelper1;
804 :
805 : class SVX_DLLPUBLIC SvxCustomShape : public SvxShapeText, public SvxShape_UnoImplHelper1
806 : {
807 : private:
808 : rtl::Reference< SvxDrawPage > mxPage;
809 :
810 : protected:
811 : using SvxUnoTextRangeBase::setPropertyValue;
812 : using SvxUnoTextRangeBase::getPropertyValue;
813 :
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);
818 :
819 :
820 : virtual ~SvxCustomShape() throw ();
821 :
822 : virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL );
823 :
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();
829 :
830 : // XShapeDescriptor
831 : virtual OUString SAL_CALL getShapeType() throw(::com::sun::star::uno::RuntimeException);
832 :
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);
838 :
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);
841 :
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);
845 :
846 : //XEnhancedCustomShapeDefaulter
847 : virtual void SAL_CALL createCustomShapeDefaults( const OUString& rShapeType ) throw (::com::sun::star::uno::RuntimeException);
848 : };
849 :
850 : /***********************************************************************
851 : * *
852 : ***********************************************************************/
853 :
854 : class SvxMediaShape : public SvxShape
855 : {
856 : public:
857 : SvxMediaShape( SdrObject* pObj ) throw();
858 : virtual ~SvxMediaShape() throw();
859 :
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);
864 : };
865 :
866 : #endif
867 :
868 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|