update dev300-m58
[ooovba.git] / reportdesign / source / core / api / Shape.cxx
blob53cebd28b79c5d2ce905bcb51b723096288bc1b7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Shape.cxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include "Shape.hxx"
32 #include <com/sun/star/beans/NamedValue.hpp>
33 #include <com/sun/star/beans/PropertyAttribute.hpp>
34 #include <com/sun/star/beans/XPropertyState.hpp>
35 #include <com/sun/star/text/ParagraphVertAlign.hpp>
36 #include <comphelper/property.hxx>
37 #include <comphelper/sequence.hxx>
38 #include <tools/debug.hxx>
39 #include <tools/diagnose_ex.h>
40 #include <boost/bind.hpp>
41 #include <svx/unoshape.hxx>
43 #include "corestrings.hrc"
44 #include "core_resource.hrc"
45 #include "core_resource.hxx"
46 #include "Tools.hxx"
47 #include "RptObject.hxx"
48 #include "FormatCondition.hxx"
49 #include "ReportHelperImpl.hxx"
50 // =============================================================================
51 namespace reportdesign
53 // =============================================================================
54 using namespace com::sun::star;
55 using namespace comphelper;
56 uno::Sequence< ::rtl::OUString > lcl_getShapeOptionals()
58 ::rtl::OUString pProps[] = {
59 PROPERTY_DATAFIELD
60 ,PROPERTY_CONTROLBACKGROUND
61 ,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
63 return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
66 DBG_NAME( rpt_OShape )
67 // -----------------------------------------------------------------------------
68 OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext)
69 :ShapeBase(m_aMutex)
70 ,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals())
71 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
72 ,m_nZOrder(0)
73 ,m_bOpaque(sal_False)
75 DBG_CTOR( rpt_OShape,NULL);
76 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
78 // -----------------------------------------------------------------------------
79 OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
80 ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
81 ,uno::Reference< drawing::XShape >& _xShape
82 ,const ::rtl::OUString& _sServiceName)
83 :ShapeBase(m_aMutex)
84 ,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals())
85 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
86 ,m_nZOrder(0)
87 ,m_bOpaque(sal_False)
88 ,m_sServiceName(_sServiceName)
90 DBG_CTOR( rpt_OShape,NULL);
91 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
92 m_aProps.aComponent.m_xFactory = _xFactory;
93 osl_incrementInterlockedCount( &m_refCount );
95 uno::Reference<beans::XPropertySet> xProp(_xShape,uno::UNO_QUERY);
96 if ( xProp.is() )
98 xProp->getPropertyValue(PROPERTY_ZORDER) >>= m_nZOrder;
99 xProp.clear();
101 m_aProps.aComponent.setShape(_xShape,this,m_refCount);
103 osl_decrementInterlockedCount( &m_refCount );
105 // -----------------------------------------------------------------------------
106 OShape::~OShape()
108 DBG_DTOR( rpt_OShape,NULL);
110 // -----------------------------------------------------------------------------
111 //IMPLEMENT_FORWARD_XINTERFACE2(OShape,ShapeBase,ShapePropertySet)
112 IMPLEMENT_FORWARD_REFCOUNT( OShape, ShapeBase )
113 // --------------------------------------------------------------------------------
114 uno::Any SAL_CALL OShape::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
116 uno::Any aReturn = ShapeBase::queryInterface(_rType);
117 if ( !aReturn.hasValue() )
118 aReturn = ShapePropertySet::queryInterface(_rType);
120 if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
121 return aReturn;
123 return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
126 // -----------------------------------------------------------------------------
127 void SAL_CALL OShape::dispose() throw(uno::RuntimeException)
129 ShapePropertySet::dispose();
130 cppu::WeakComponentImplHelperBase::dispose();
132 // -----------------------------------------------------------------------------
133 ::rtl::OUString OShape::getImplementationName_Static( ) throw(uno::RuntimeException)
135 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.Shape"));
138 //--------------------------------------------------------------------------
139 ::rtl::OUString SAL_CALL OShape::getImplementationName( ) throw(uno::RuntimeException)
141 return getImplementationName_Static();
143 //--------------------------------------------------------------------------
144 uno::Sequence< ::rtl::OUString > OShape::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
146 uno::Sequence< ::rtl::OUString > aServices(1);
147 aServices.getArray()[0] = SERVICE_SHAPE;
149 return aServices;
151 //------------------------------------------------------------------------------
152 uno::Reference< uno::XInterface > OShape::create(uno::Reference< uno::XComponentContext > const & xContext)
154 return *(new OShape(xContext));
157 //--------------------------------------------------------------------------
158 uno::Sequence< ::rtl::OUString > SAL_CALL OShape::getSupportedServiceNames( ) throw(uno::RuntimeException)
160 return getSupportedServiceNames_Static();
162 //------------------------------------------------------------------------------
163 sal_Bool SAL_CALL OShape::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
166 return m_sServiceName == ServiceName || ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
168 // -----------------------------------------------------------------------------
169 // XReportComponent
170 REPORTCOMPONENT_IMPL(OShape,m_aProps.aComponent)
171 REPORTCOMPONENT_IMPL2(OShape,m_aProps.aComponent)
172 REPORTCOMPONENT_MASTERDETAIL(OShape,m_aProps.aComponent)
173 REPORTCONTROLFORMAT_IMPL2(OShape,m_aProps.aFormatProperties)
174 // -----------------------------------------------------------------------------
175 ::sal_Int32 SAL_CALL OShape::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException)
177 throw beans::UnknownPropertyException();
179 // -----------------------------------------------------------------------------
180 void SAL_CALL OShape::setControlBackground( ::sal_Int32 /*_backgroundcolor*/ ) throw (uno::RuntimeException,beans::UnknownPropertyException)
182 throw beans::UnknownPropertyException();
184 // -----------------------------------------------------------------------------
185 ::sal_Bool SAL_CALL OShape::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException)
187 throw beans::UnknownPropertyException();
189 // -----------------------------------------------------------------------------
190 void SAL_CALL OShape::setControlBackgroundTransparent( ::sal_Bool /*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
192 throw beans::UnknownPropertyException();
194 // -----------------------------------------------------------------------------
195 uno::Reference< beans::XPropertySetInfo > SAL_CALL OShape::getPropertySetInfo( ) throw(uno::RuntimeException)
198 //return ShapePropertySet::getPropertySetInfo();
199 return cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
201 // -----------------------------------------------------------------------------
202 cppu::IPropertyArrayHelper& OShape::getInfoHelper()
204 if ( !m_pAggHelper.get() )
206 uno::Sequence<beans::Property> aAggSeq;
207 if ( m_aProps.aComponent.m_xProperty.is() )
208 aAggSeq = m_aProps.aComponent.m_xProperty->getPropertySetInfo()->getProperties();
209 m_pAggHelper.reset(new OPropertyArrayAggregationHelper(ShapePropertySet::getPropertySetInfo()->getProperties(),aAggSeq));
211 return *(m_pAggHelper.get());
214 // -----------------------------------------------------------------------------
215 void SAL_CALL OShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
217 getInfoHelper();
218 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY )
219 m_aProps.aComponent.m_xProperty->setPropertyValue( aPropertyName,aValue);
220 // can be in both
221 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY )
222 ShapePropertySet::setPropertyValue( aPropertyName, aValue );
224 // -----------------------------------------------------------------------------
225 uno::Any SAL_CALL OShape::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
227 getInfoHelper();
228 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY )
229 return m_aProps.aComponent.m_xProperty->getPropertyValue( PropertyName);
230 // can be in both
231 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY )
232 return ShapePropertySet::getPropertyValue( PropertyName);
233 return uno::Any();
235 // -----------------------------------------------------------------------------
236 void SAL_CALL OShape::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
238 getInfoHelper();
239 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !aPropertyName.getLength() )
240 m_aProps.aComponent.m_xProperty->addPropertyChangeListener( aPropertyName, xListener);
241 // can be in both
242 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !aPropertyName.getLength() )
243 ShapePropertySet::addPropertyChangeListener( aPropertyName, xListener );
245 // -----------------------------------------------------------------------------
246 void SAL_CALL OShape::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
248 getInfoHelper();
249 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !aPropertyName.getLength() )
250 m_aProps.aComponent.m_xProperty->removePropertyChangeListener( aPropertyName, aListener );
251 // can be in both
252 if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !aPropertyName.getLength() )
253 ShapePropertySet::removePropertyChangeListener( aPropertyName, aListener );
255 // -----------------------------------------------------------------------------
256 void SAL_CALL OShape::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
258 getInfoHelper();
259 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !PropertyName.getLength() )
260 m_aProps.aComponent.m_xProperty->addVetoableChangeListener( PropertyName, aListener );
261 // can be in both
262 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !PropertyName.getLength() )
263 ShapePropertySet::addVetoableChangeListener( PropertyName, aListener );
265 // -----------------------------------------------------------------------------
266 void SAL_CALL OShape::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
268 getInfoHelper();
269 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !PropertyName.getLength() )
270 m_aProps.aComponent.m_xProperty->removeVetoableChangeListener( PropertyName, aListener );
271 // can be in both
272 if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !PropertyName.getLength() )
273 ShapePropertySet::removeVetoableChangeListener( PropertyName, aListener );
275 // -----------------------------------------------------------------------------
276 // XReportControlModel
277 ::rtl::OUString SAL_CALL OShape::getDataField() throw ( beans::UnknownPropertyException, uno::RuntimeException)
279 throw beans::UnknownPropertyException();
281 // -----------------------------------------------------------------------------
282 void SAL_CALL OShape::setDataField( const ::rtl::OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
284 throw beans::UnknownPropertyException();
286 // -----------------------------------------------------------------------------
287 ::sal_Bool SAL_CALL OShape::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
289 ::osl::MutexGuard aGuard(m_aMutex);
290 return m_aProps.bPrintWhenGroupChange;
292 // -----------------------------------------------------------------------------
293 void SAL_CALL OShape::setPrintWhenGroupChange( ::sal_Bool _printwhengroupchange ) throw (beans::UnknownPropertyException, uno::RuntimeException)
295 set(PROPERTY_PRINTWHENGROUPCHANGE,_printwhengroupchange,m_aProps.bPrintWhenGroupChange);
297 // -----------------------------------------------------------------------------
298 ::rtl::OUString SAL_CALL OShape::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
300 ::osl::MutexGuard aGuard(m_aMutex);
301 return m_aProps.aConditionalPrintExpression;
303 // -----------------------------------------------------------------------------
304 void SAL_CALL OShape::setConditionalPrintExpression( const ::rtl::OUString& _conditionalprintexpression ) throw (beans::UnknownPropertyException, uno::RuntimeException)
306 set(PROPERTY_CONDITIONALPRINTEXPRESSION,_conditionalprintexpression,m_aProps.aConditionalPrintExpression);
308 // -----------------------------------------------------------------------------
310 // XCloneable
311 uno::Reference< util::XCloneable > SAL_CALL OShape::createClone( ) throw (uno::RuntimeException)
313 uno::Reference< report::XReportComponent> xSource = this;
314 uno::Reference< report::XReportComponent> xSet;
317 SvxShape* pShape = SvxShape::getImplementation( xSource );
318 if ( pShape )
320 SdrObject* pObject = pShape->GetSdrObject();
321 if ( pObject )
323 SdrObject* pClone = pObject->Clone();
324 if ( pClone )
326 xSet.set(pClone->getUnoShape(),uno::UNO_QUERY_THROW );
328 // ::comphelper::copyProperties(xSource.get(),xSet.get());
331 } // if ( pShape )
333 catch(const uno::Exception&)
335 DBG_UNHANDLED_EXCEPTION();
337 return xSet.get();
339 // -----------------------------------------------------------------------------
340 // XChild
341 uno::Reference< uno::XInterface > SAL_CALL OShape::getParent( ) throw (uno::RuntimeException)
343 return OShapeHelper::getParent(this);
345 // -----------------------------------------------------------------------------
346 void SAL_CALL OShape::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
348 ::osl::MutexGuard aGuard(m_aMutex);
349 m_aProps.aComponent.m_xParent = uno::Reference< container::XChild >(Parent,uno::UNO_QUERY);
350 // not supported by the shape
351 //uno::Reference< container::XChild > xChild;
352 //comphelper::query_aggregation(m_aProps.aComponent.m_xProxy,xChild);
353 //if ( xChild.is() )
354 // xChild->setParent(Parent);
356 uno::Reference< report::XFormatCondition > SAL_CALL OShape::createFormatCondition( ) throw (uno::Exception, uno::RuntimeException)
358 return new OFormatCondition(m_aProps.aComponent.m_xContext);
360 // -----------------------------------------------------------------------------
361 // XContainer
362 void SAL_CALL OShape::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
364 m_aProps.addContainerListener(xListener);
366 // -----------------------------------------------------------------------------
367 void SAL_CALL OShape::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
369 m_aProps.removeContainerListener(xListener);
371 // -----------------------------------------------------------------------------
372 // XElementAccess
373 uno::Type SAL_CALL OShape::getElementType( ) throw (uno::RuntimeException)
375 return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
377 // -----------------------------------------------------------------------------
378 ::sal_Bool SAL_CALL OShape::hasElements( ) throw (uno::RuntimeException)
380 return m_aProps.hasElements();
382 // -----------------------------------------------------------------------------
383 // XIndexContainer
384 void SAL_CALL OShape::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
386 m_aProps.insertByIndex(Index,Element);
388 // -----------------------------------------------------------------------------
389 void SAL_CALL OShape::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
391 m_aProps.removeByIndex(Index);
393 // -----------------------------------------------------------------------------
394 // XIndexReplace
395 void SAL_CALL OShape::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
397 m_aProps.replaceByIndex(Index,Element);
399 // -----------------------------------------------------------------------------
400 // XIndexAccess
401 ::sal_Int32 SAL_CALL OShape::getCount( ) throw (uno::RuntimeException)
403 return m_aProps.getCount();
405 // -----------------------------------------------------------------------------
406 uno::Any SAL_CALL OShape::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
408 return m_aProps.getByIndex( Index );
410 // -----------------------------------------------------------------------------
411 // XShape
412 awt::Point SAL_CALL OShape::getPosition( ) throw (uno::RuntimeException)
414 return OShapeHelper::getPosition(this);
416 // -----------------------------------------------------------------------------
417 void SAL_CALL OShape::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
419 OShapeHelper::setPosition(aPosition,this);
421 // -----------------------------------------------------------------------------
422 awt::Size SAL_CALL OShape::getSize( ) throw (uno::RuntimeException)
424 return OShapeHelper::getSize(this);
426 // -----------------------------------------------------------------------------
427 void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
429 OShapeHelper::setSize(aSize,this);
431 // -----------------------------------------------------------------------------
433 // XShapeDescriptor
434 ::rtl::OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException)
436 ::osl::MutexGuard aGuard(m_aMutex);
437 if ( m_aProps.aComponent.m_xShape.is() )
438 return m_aProps.aComponent.m_xShape->getShapeType();
439 return ::rtl::OUString();
441 // -----------------------------------------------------------------------------
442 ::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException)
444 ::osl::MutexGuard aGuard(m_aMutex);
445 m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_ZORDER) >>= m_nZOrder;
446 return m_nZOrder;
448 // -----------------------------------------------------------------------------
449 void SAL_CALL OShape::setZOrder( ::sal_Int32 _zorder ) throw (uno::RuntimeException)
451 ::osl::MutexGuard aGuard(m_aMutex);
452 m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_ZORDER,uno::makeAny(_zorder));
453 set(PROPERTY_ZORDER,_zorder,m_nZOrder);
455 // -----------------------------------------------------------------------------
456 ::sal_Bool SAL_CALL OShape::getOpaque() throw (::com::sun::star::uno::RuntimeException)
458 ::osl::MutexGuard aGuard(m_aMutex);
459 return m_bOpaque;
461 // -----------------------------------------------------------------------------
462 void SAL_CALL OShape::setOpaque( ::sal_Bool _opaque ) throw (::com::sun::star::uno::RuntimeException)
464 ::osl::MutexGuard aGuard(m_aMutex);
465 set(PROPERTY_OPAQUE,_opaque,m_bOpaque);
467 // -----------------------------------------------------------------------------
468 drawing::HomogenMatrix3 SAL_CALL OShape::getTransformation() throw (uno::RuntimeException)
470 ::osl::MutexGuard aGuard(m_aMutex);
471 m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_TRANSFORMATION) >>= m_Transformation;
472 return m_Transformation;
474 // -----------------------------------------------------------------------------
475 void SAL_CALL OShape::setTransformation( const drawing::HomogenMatrix3& _transformation ) throw (uno::RuntimeException)
477 m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_TRANSFORMATION,uno::makeAny(_transformation));
478 set(PROPERTY_TRANSFORMATION,_transformation,m_Transformation);
480 // -----------------------------------------------------------------------------
481 ::rtl::OUString SAL_CALL OShape::getCustomShapeEngine() throw (uno::RuntimeException)
483 ::osl::MutexGuard aGuard(m_aMutex);
484 m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEENGINE) >>= m_CustomShapeEngine;
486 return m_CustomShapeEngine;
488 // -----------------------------------------------------------------------------
489 void SAL_CALL OShape::setCustomShapeEngine( const ::rtl::OUString& _customshapeengine ) throw (uno::RuntimeException)
491 m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_CUSTOMSHAPEENGINE,uno::makeAny(_customshapeengine));
492 set(PROPERTY_CUSTOMSHAPEENGINE,_customshapeengine,m_CustomShapeEngine);
494 // -----------------------------------------------------------------------------
495 ::rtl::OUString SAL_CALL OShape::getCustomShapeData() throw (uno::RuntimeException)
497 ::osl::MutexGuard aGuard(m_aMutex);
498 m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEDATA) >>= m_CustomShapeData;
499 return m_CustomShapeData;
501 // -----------------------------------------------------------------------------
502 void SAL_CALL OShape::setCustomShapeData( const ::rtl::OUString& _customshapedata ) throw (uno::RuntimeException)
504 m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_CUSTOMSHAPEDATA,uno::makeAny(_customshapedata));
505 set(PROPERTY_CUSTOMSHAPEDATA,_customshapedata,m_CustomShapeData);
507 // -----------------------------------------------------------------------------
508 uno::Sequence< beans::PropertyValue > SAL_CALL OShape::getCustomShapeGeometry() throw (uno::RuntimeException)
510 ::osl::MutexGuard aGuard(m_aMutex);
511 m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY) >>= m_CustomShapeGeometry;
512 return m_CustomShapeGeometry;
514 // -----------------------------------------------------------------------------
515 void SAL_CALL OShape::setCustomShapeGeometry( const uno::Sequence< beans::PropertyValue >& _customshapegeometry ) throw (uno::RuntimeException)
517 m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY,uno::makeAny(_customshapegeometry));
518 set(PROPERTY_CUSTOMSHAPEGEOMETRY,_customshapegeometry,m_CustomShapeGeometry);
520 // -----------------------------------------------------------------------------
521 // -----------------------------------------------------------------------------
523 // =============================================================================
524 }// namespace reportdesign
525 // =============================================================================