1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Shape.cxx,v $
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 ************************************************************************/
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"
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
[] = {
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
)
70 ,ShapePropertySet(_xContext
,static_cast< Implements
>(IMPLEMENTS_PROPERTY_SET
),lcl_getShapeOptionals())
71 ,m_aProps(m_aMutex
,static_cast< container::XContainer
*>( this ),_xContext
)
74 DBG_CTOR( rpt_OShape
,NULL
);
75 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_SHAPE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
77 // -----------------------------------------------------------------------------
78 OShape::OShape(uno::Reference
< uno::XComponentContext
> const & _xContext
79 ,const uno::Reference
< lang::XMultiServiceFactory
>& _xFactory
80 ,uno::Reference
< drawing::XShape
>& _xShape
81 ,const ::rtl::OUString
& _sServiceName
)
83 ,ShapePropertySet(_xContext
,static_cast< Implements
>(IMPLEMENTS_PROPERTY_SET
),lcl_getShapeOptionals())
84 ,m_aProps(m_aMutex
,static_cast< container::XContainer
*>( this ),_xContext
)
86 ,m_sServiceName(_sServiceName
)
88 DBG_CTOR( rpt_OShape
,NULL
);
89 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_SHAPE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
90 m_aProps
.aComponent
.m_xFactory
= _xFactory
;
91 osl_incrementInterlockedCount( &m_refCount
);
93 uno::Reference
<beans::XPropertySet
> xProp(_xShape
,uno::UNO_QUERY
);
96 xProp
->getPropertyValue(PROPERTY_ZORDER
) >>= m_nZOrder
;
99 m_aProps
.aComponent
.setShape(_xShape
,this,m_refCount
);
101 osl_decrementInterlockedCount( &m_refCount
);
103 // -----------------------------------------------------------------------------
106 DBG_DTOR( rpt_OShape
,NULL
);
108 // -----------------------------------------------------------------------------
109 //IMPLEMENT_FORWARD_XINTERFACE2(OShape,ShapeBase,ShapePropertySet)
110 IMPLEMENT_FORWARD_REFCOUNT( OShape
, ShapeBase
)
111 // --------------------------------------------------------------------------------
112 uno::Any SAL_CALL
OShape::queryInterface( const uno::Type
& _rType
) throw (uno::RuntimeException
)
114 uno::Any aReturn
= ShapeBase::queryInterface(_rType
);
115 if ( !aReturn
.hasValue() )
116 aReturn
= ShapePropertySet::queryInterface(_rType
);
118 if ( !aReturn
.hasValue() && OReportControlModel::isInterfaceForbidden(_rType
) )
121 return aReturn
.hasValue() ? aReturn
: (m_aProps
.aComponent
.m_xProxy
.is() ? m_aProps
.aComponent
.m_xProxy
->queryAggregation(_rType
) : aReturn
);
124 // -----------------------------------------------------------------------------
125 void SAL_CALL
OShape::dispose() throw(uno::RuntimeException
)
127 ShapePropertySet::dispose();
128 cppu::WeakComponentImplHelperBase::dispose();
130 // -----------------------------------------------------------------------------
131 ::rtl::OUString
OShape::getImplementationName_Static( ) throw(uno::RuntimeException
)
133 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.Shape"));
136 //--------------------------------------------------------------------------
137 ::rtl::OUString SAL_CALL
OShape::getImplementationName( ) throw(uno::RuntimeException
)
139 return getImplementationName_Static();
141 //--------------------------------------------------------------------------
142 uno::Sequence
< ::rtl::OUString
> OShape::getSupportedServiceNames_Static( ) throw(uno::RuntimeException
)
144 uno::Sequence
< ::rtl::OUString
> aServices(1);
145 aServices
.getArray()[0] = SERVICE_SHAPE
;
149 //------------------------------------------------------------------------------
150 uno::Reference
< uno::XInterface
> OShape::create(uno::Reference
< uno::XComponentContext
> const & xContext
)
152 return *(new OShape(xContext
));
155 //--------------------------------------------------------------------------
156 uno::Sequence
< ::rtl::OUString
> SAL_CALL
OShape::getSupportedServiceNames( ) throw(uno::RuntimeException
)
158 return getSupportedServiceNames_Static();
160 //------------------------------------------------------------------------------
161 sal_Bool SAL_CALL
OShape::supportsService(const ::rtl::OUString
& ServiceName
) throw( uno::RuntimeException
)
164 return m_sServiceName
== ServiceName
|| ::comphelper::existsValue(ServiceName
,getSupportedServiceNames_Static());
166 // -----------------------------------------------------------------------------
168 REPORTCOMPONENT_IMPL(OShape
,m_aProps
.aComponent
)
169 REPORTCOMPONENT_IMPL2(OShape
,m_aProps
.aComponent
)
170 REPORTCOMPONENT_MASTERDETAIL(OShape
,m_aProps
.aComponent
)
171 REPORTCONTROLFORMAT_IMPL2(OShape
,m_aProps
.aFormatProperties
)
172 // -----------------------------------------------------------------------------
173 ::sal_Int32 SAL_CALL
OShape::getControlBackground() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
175 throw beans::UnknownPropertyException();
177 // -----------------------------------------------------------------------------
178 void SAL_CALL
OShape::setControlBackground( ::sal_Int32
/*_backgroundcolor*/ ) throw (uno::RuntimeException
,beans::UnknownPropertyException
)
180 throw beans::UnknownPropertyException();
182 // -----------------------------------------------------------------------------
183 ::sal_Bool SAL_CALL
OShape::getControlBackgroundTransparent() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
185 throw beans::UnknownPropertyException();
187 // -----------------------------------------------------------------------------
188 void SAL_CALL
OShape::setControlBackgroundTransparent( ::sal_Bool
/*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
190 throw beans::UnknownPropertyException();
192 // -----------------------------------------------------------------------------
193 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
OShape::getPropertySetInfo( ) throw(uno::RuntimeException
)
196 //return ShapePropertySet::getPropertySetInfo();
197 return cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
199 // -----------------------------------------------------------------------------
200 cppu::IPropertyArrayHelper
& OShape::getInfoHelper()
202 if ( !m_pAggHelper
.get() )
204 uno::Sequence
<beans::Property
> aAggSeq
;
205 if ( m_aProps
.aComponent
.m_xProperty
.is() )
206 aAggSeq
= m_aProps
.aComponent
.m_xProperty
->getPropertySetInfo()->getProperties();
207 m_pAggHelper
.reset(new OPropertyArrayAggregationHelper(ShapePropertySet::getPropertySetInfo()->getProperties(),aAggSeq
));
209 return *(m_pAggHelper
.get());
212 // -----------------------------------------------------------------------------
213 void SAL_CALL
OShape::setPropertyValue( const ::rtl::OUString
& aPropertyName
, const uno::Any
& aValue
) throw (beans::UnknownPropertyException
, beans::PropertyVetoException
, lang::IllegalArgumentException
, lang::WrappedTargetException
, uno::RuntimeException
)
216 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
)
217 m_aProps
.aComponent
.m_xProperty
->setPropertyValue( aPropertyName
,aValue
);
219 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
)
220 ShapePropertySet::setPropertyValue( aPropertyName
, aValue
);
222 // -----------------------------------------------------------------------------
223 uno::Any SAL_CALL
OShape::getPropertyValue( const ::rtl::OUString
& PropertyName
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
226 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
)
227 return m_aProps
.aComponent
.m_xProperty
->getPropertyValue( PropertyName
);
229 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
)
230 return ShapePropertySet::getPropertyValue( PropertyName
);
233 // -----------------------------------------------------------------------------
234 void SAL_CALL
OShape::addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& xListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
237 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| !aPropertyName
.getLength() )
238 m_aProps
.aComponent
.m_xProperty
->addPropertyChangeListener( aPropertyName
, xListener
);
240 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| !aPropertyName
.getLength() )
241 ShapePropertySet::addPropertyChangeListener( aPropertyName
, xListener
);
243 // -----------------------------------------------------------------------------
244 void SAL_CALL
OShape::removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
247 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| !aPropertyName
.getLength() )
248 m_aProps
.aComponent
.m_xProperty
->removePropertyChangeListener( aPropertyName
, aListener
);
250 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| !aPropertyName
.getLength() )
251 ShapePropertySet::removePropertyChangeListener( aPropertyName
, aListener
);
253 // -----------------------------------------------------------------------------
254 void SAL_CALL
OShape::addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const uno::Reference
< beans::XVetoableChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
257 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| !PropertyName
.getLength() )
258 m_aProps
.aComponent
.m_xProperty
->addVetoableChangeListener( PropertyName
, aListener
);
260 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| !PropertyName
.getLength() )
261 ShapePropertySet::addVetoableChangeListener( PropertyName
, aListener
);
263 // -----------------------------------------------------------------------------
264 void SAL_CALL
OShape::removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const uno::Reference
< beans::XVetoableChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
267 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| !PropertyName
.getLength() )
268 m_aProps
.aComponent
.m_xProperty
->removeVetoableChangeListener( PropertyName
, aListener
);
270 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| !PropertyName
.getLength() )
271 ShapePropertySet::removeVetoableChangeListener( PropertyName
, aListener
);
273 // -----------------------------------------------------------------------------
274 // XReportControlModel
275 ::rtl::OUString SAL_CALL
OShape::getDataField() throw ( beans::UnknownPropertyException
, uno::RuntimeException
)
277 throw beans::UnknownPropertyException();
279 // -----------------------------------------------------------------------------
280 void SAL_CALL
OShape::setDataField( const ::rtl::OUString
& /*_datafield*/ ) throw (lang::IllegalArgumentException
, beans::UnknownPropertyException
, uno::RuntimeException
)
282 throw beans::UnknownPropertyException();
284 // -----------------------------------------------------------------------------
285 ::sal_Bool SAL_CALL
OShape::getPrintWhenGroupChange() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
287 ::osl::MutexGuard
aGuard(m_aMutex
);
288 return m_aProps
.bPrintWhenGroupChange
;
290 // -----------------------------------------------------------------------------
291 void SAL_CALL
OShape::setPrintWhenGroupChange( ::sal_Bool _printwhengroupchange
) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
293 set(PROPERTY_PRINTWHENGROUPCHANGE
,_printwhengroupchange
,m_aProps
.bPrintWhenGroupChange
);
295 // -----------------------------------------------------------------------------
296 ::rtl::OUString SAL_CALL
OShape::getConditionalPrintExpression() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
298 ::osl::MutexGuard
aGuard(m_aMutex
);
299 return m_aProps
.aConditionalPrintExpression
;
301 // -----------------------------------------------------------------------------
302 void SAL_CALL
OShape::setConditionalPrintExpression( const ::rtl::OUString
& _conditionalprintexpression
) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
304 set(PROPERTY_CONDITIONALPRINTEXPRESSION
,_conditionalprintexpression
,m_aProps
.aConditionalPrintExpression
);
306 // -----------------------------------------------------------------------------
309 uno::Reference
< util::XCloneable
> SAL_CALL
OShape::createClone( ) throw (uno::RuntimeException
)
311 uno::Reference
< report::XReportComponent
> xSource
= this;
312 uno::Reference
< report::XReportComponent
> xSet
;
315 SvxShape
* pShape
= SvxShape::getImplementation( xSource
);
318 SdrObject
* pObject
= pShape
->GetSdrObject();
321 SdrObject
* pClone
= pObject
->Clone();
324 xSet
.set(pClone
->getUnoShape(),uno::UNO_QUERY_THROW
);
326 // ::comphelper::copyProperties(xSource.get(),xSet.get());
331 catch(const uno::Exception
&)
333 DBG_UNHANDLED_EXCEPTION();
337 // -----------------------------------------------------------------------------
339 uno::Reference
< uno::XInterface
> SAL_CALL
OShape::getParent( ) throw (uno::RuntimeException
)
341 return OShapeHelper::getParent(this);
343 // -----------------------------------------------------------------------------
344 void SAL_CALL
OShape::setParent( const uno::Reference
< uno::XInterface
>& Parent
) throw (lang::NoSupportException
, uno::RuntimeException
)
346 ::osl::MutexGuard
aGuard(m_aMutex
);
347 m_aProps
.aComponent
.m_xParent
= uno::Reference
< container::XChild
>(Parent
,uno::UNO_QUERY
);
348 // not supported by the shape
349 //uno::Reference< container::XChild > xChild;
350 //comphelper::query_aggregation(m_aProps.aComponent.m_xProxy,xChild);
352 // xChild->setParent(Parent);
354 uno::Reference
< report::XFormatCondition
> SAL_CALL
OShape::createFormatCondition( ) throw (uno::Exception
, uno::RuntimeException
)
356 return new OFormatCondition(m_aProps
.aComponent
.m_xContext
);
358 // -----------------------------------------------------------------------------
360 void SAL_CALL
OShape::addContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
)
362 m_aProps
.addContainerListener(xListener
);
364 // -----------------------------------------------------------------------------
365 void SAL_CALL
OShape::removeContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
)
367 m_aProps
.removeContainerListener(xListener
);
369 // -----------------------------------------------------------------------------
371 uno::Type SAL_CALL
OShape::getElementType( ) throw (uno::RuntimeException
)
373 return ::getCppuType(static_cast< uno::Reference
<report::XFormatCondition
>*>(NULL
));
375 // -----------------------------------------------------------------------------
376 ::sal_Bool SAL_CALL
OShape::hasElements( ) throw (uno::RuntimeException
)
378 return m_aProps
.hasElements();
380 // -----------------------------------------------------------------------------
382 void SAL_CALL
OShape::insertByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
384 m_aProps
.insertByIndex(Index
,Element
);
386 // -----------------------------------------------------------------------------
387 void SAL_CALL
OShape::removeByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
389 m_aProps
.removeByIndex(Index
);
391 // -----------------------------------------------------------------------------
393 void SAL_CALL
OShape::replaceByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
395 m_aProps
.replaceByIndex(Index
,Element
);
397 // -----------------------------------------------------------------------------
399 ::sal_Int32 SAL_CALL
OShape::getCount( ) throw (uno::RuntimeException
)
401 return m_aProps
.getCount();
403 // -----------------------------------------------------------------------------
404 uno::Any SAL_CALL
OShape::getByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
406 return m_aProps
.getByIndex( Index
);
408 // -----------------------------------------------------------------------------
410 awt::Point SAL_CALL
OShape::getPosition( ) throw (uno::RuntimeException
)
412 return OShapeHelper::getPosition(this);
414 // -----------------------------------------------------------------------------
415 void SAL_CALL
OShape::setPosition( const awt::Point
& aPosition
) throw (uno::RuntimeException
)
417 OShapeHelper::setPosition(aPosition
,this);
419 // -----------------------------------------------------------------------------
420 awt::Size SAL_CALL
OShape::getSize( ) throw (uno::RuntimeException
)
422 return OShapeHelper::getSize(this);
424 // -----------------------------------------------------------------------------
425 void SAL_CALL
OShape::setSize( const awt::Size
& aSize
) throw (beans::PropertyVetoException
, uno::RuntimeException
)
427 OShapeHelper::setSize(aSize
,this);
429 // -----------------------------------------------------------------------------
432 ::rtl::OUString SAL_CALL
OShape::getShapeType( ) throw (uno::RuntimeException
)
434 ::osl::MutexGuard
aGuard(m_aMutex
);
435 if ( m_aProps
.aComponent
.m_xShape
.is() )
436 return m_aProps
.aComponent
.m_xShape
->getShapeType();
437 return ::rtl::OUString();
439 // -----------------------------------------------------------------------------
440 ::sal_Int32 SAL_CALL
OShape::getZOrder() throw (uno::RuntimeException
)
442 ::osl::MutexGuard
aGuard(m_aMutex
);
443 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_ZORDER
) >>= m_nZOrder
;
446 // -----------------------------------------------------------------------------
447 void SAL_CALL
OShape::setZOrder( ::sal_Int32 _zorder
) throw (uno::RuntimeException
)
449 ::osl::MutexGuard
aGuard(m_aMutex
);
450 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_ZORDER
,uno::makeAny(_zorder
));
451 set(PROPERTY_ZORDER
,_zorder
,m_nZOrder
);
453 // -----------------------------------------------------------------------------
454 drawing::HomogenMatrix3 SAL_CALL
OShape::getTransformation() throw (uno::RuntimeException
)
456 ::osl::MutexGuard
aGuard(m_aMutex
);
457 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_TRANSFORMATION
) >>= m_Transformation
;
458 return m_Transformation
;
460 // -----------------------------------------------------------------------------
461 void SAL_CALL
OShape::setTransformation( const drawing::HomogenMatrix3
& _transformation
) throw (uno::RuntimeException
)
463 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_TRANSFORMATION
,uno::makeAny(_transformation
));
464 set(PROPERTY_TRANSFORMATION
,_transformation
,m_Transformation
);
466 // -----------------------------------------------------------------------------
467 ::rtl::OUString SAL_CALL
OShape::getCustomShapeEngine() throw (uno::RuntimeException
)
469 ::osl::MutexGuard
aGuard(m_aMutex
);
470 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEENGINE
) >>= m_CustomShapeEngine
;
472 return m_CustomShapeEngine
;
474 // -----------------------------------------------------------------------------
475 void SAL_CALL
OShape::setCustomShapeEngine( const ::rtl::OUString
& _customshapeengine
) throw (uno::RuntimeException
)
477 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEENGINE
,uno::makeAny(_customshapeengine
));
478 set(PROPERTY_CUSTOMSHAPEENGINE
,_customshapeengine
,m_CustomShapeEngine
);
480 // -----------------------------------------------------------------------------
481 ::rtl::OUString SAL_CALL
OShape::getCustomShapeData() throw (uno::RuntimeException
)
483 ::osl::MutexGuard
aGuard(m_aMutex
);
484 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEDATA
) >>= m_CustomShapeData
;
485 return m_CustomShapeData
;
487 // -----------------------------------------------------------------------------
488 void SAL_CALL
OShape::setCustomShapeData( const ::rtl::OUString
& _customshapedata
) throw (uno::RuntimeException
)
490 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEDATA
,uno::makeAny(_customshapedata
));
491 set(PROPERTY_CUSTOMSHAPEDATA
,_customshapedata
,m_CustomShapeData
);
493 // -----------------------------------------------------------------------------
494 uno::Sequence
< beans::PropertyValue
> SAL_CALL
OShape::getCustomShapeGeometry() throw (uno::RuntimeException
)
496 ::osl::MutexGuard
aGuard(m_aMutex
);
497 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY
) >>= m_CustomShapeGeometry
;
498 return m_CustomShapeGeometry
;
500 // -----------------------------------------------------------------------------
501 void SAL_CALL
OShape::setCustomShapeGeometry( const uno::Sequence
< beans::PropertyValue
>& _customshapegeometry
) throw (uno::RuntimeException
)
503 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY
,uno::makeAny(_customshapegeometry
));
504 set(PROPERTY_CUSTOMSHAPEGEOMETRY
,_customshapegeometry
,m_CustomShapeGeometry
);
506 // -----------------------------------------------------------------------------
507 // -----------------------------------------------------------------------------
509 // =============================================================================
510 }// namespace reportdesign
511 // =============================================================================