1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <com/sun/star/beans/NamedValue.hpp>
22 #include <com/sun/star/beans/PropertyAttribute.hpp>
23 #include <com/sun/star/beans/XPropertyState.hpp>
24 #include <com/sun/star/text/ParagraphVertAlign.hpp>
25 #include <comphelper/property.hxx>
26 #include <comphelper/sequence.hxx>
27 #include <tools/debug.hxx>
28 #include <tools/diagnose_ex.h>
29 #include <svx/unoshape.hxx>
31 #include "corestrings.hrc"
32 #include "core_resource.hrc"
33 #include "core_resource.hxx"
35 #include "RptObject.hxx"
36 #include "FormatCondition.hxx"
37 #include "ReportHelperImpl.hxx"
38 // =============================================================================
39 namespace reportdesign
41 // =============================================================================
42 using namespace com::sun::star
;
43 using namespace comphelper
;
44 uno::Sequence
< OUString
> lcl_getShapeOptionals()
47 OUString(PROPERTY_DATAFIELD
)
48 ,OUString(PROPERTY_CONTROLBACKGROUND
)
49 ,OUString(PROPERTY_CONTROLBACKGROUNDTRANSPARENT
)
51 return uno::Sequence
< OUString
>(pProps
,sizeof(pProps
)/sizeof(pProps
[0]));
54 DBG_NAME( rpt_OShape
)
55 // -----------------------------------------------------------------------------
56 OShape::OShape(uno::Reference
< uno::XComponentContext
> const & _xContext
)
58 ,ShapePropertySet(_xContext
,static_cast< Implements
>(IMPLEMENTS_PROPERTY_SET
),lcl_getShapeOptionals())
59 ,m_aProps(m_aMutex
,static_cast< container::XContainer
*>( this ),_xContext
)
63 DBG_CTOR( rpt_OShape
,NULL
);
64 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_SHAPE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
66 // -----------------------------------------------------------------------------
67 OShape::OShape(uno::Reference
< uno::XComponentContext
> const & _xContext
68 ,const uno::Reference
< lang::XMultiServiceFactory
>& _xFactory
69 ,uno::Reference
< drawing::XShape
>& _xShape
70 ,const OUString
& _sServiceName
)
72 ,ShapePropertySet(_xContext
,static_cast< Implements
>(IMPLEMENTS_PROPERTY_SET
),lcl_getShapeOptionals())
73 ,m_aProps(m_aMutex
,static_cast< container::XContainer
*>( this ),_xContext
)
76 ,m_sServiceName(_sServiceName
)
78 DBG_CTOR( rpt_OShape
,NULL
);
79 m_aProps
.aComponent
.m_sName
= RPT_RESSTRING(RID_STR_SHAPE
,m_aProps
.aComponent
.m_xContext
->getServiceManager());
80 m_aProps
.aComponent
.m_xFactory
= _xFactory
;
81 osl_atomic_increment( &m_refCount
);
83 uno::Reference
<beans::XPropertySet
> xProp(_xShape
,uno::UNO_QUERY
);
86 xProp
->getPropertyValue(PROPERTY_ZORDER
) >>= m_nZOrder
;
89 m_aProps
.aComponent
.setShape(_xShape
,this,m_refCount
);
91 osl_atomic_decrement( &m_refCount
);
93 // -----------------------------------------------------------------------------
96 DBG_DTOR( rpt_OShape
,NULL
);
98 // -----------------------------------------------------------------------------
99 //IMPLEMENT_FORWARD_XINTERFACE2(OShape,ShapeBase,ShapePropertySet)
100 IMPLEMENT_FORWARD_REFCOUNT( OShape
, ShapeBase
)
101 // --------------------------------------------------------------------------------
102 uno::Any SAL_CALL
OShape::queryInterface( const uno::Type
& _rType
) throw (uno::RuntimeException
)
104 uno::Any aReturn
= ShapeBase::queryInterface(_rType
);
105 if ( !aReturn
.hasValue() )
106 aReturn
= ShapePropertySet::queryInterface(_rType
);
108 if ( !aReturn
.hasValue() && OReportControlModel::isInterfaceForbidden(_rType
) )
111 return aReturn
.hasValue() ? aReturn
: (m_aProps
.aComponent
.m_xProxy
.is() ? m_aProps
.aComponent
.m_xProxy
->queryAggregation(_rType
) : aReturn
);
114 // -----------------------------------------------------------------------------
115 void SAL_CALL
OShape::dispose() throw(uno::RuntimeException
)
117 ShapePropertySet::dispose();
118 cppu::WeakComponentImplHelperBase::dispose();
120 // -----------------------------------------------------------------------------
121 OUString
OShape::getImplementationName_Static( ) throw(uno::RuntimeException
)
123 return OUString("com.sun.star.comp.report.Shape");
126 //--------------------------------------------------------------------------
127 OUString SAL_CALL
OShape::getImplementationName( ) throw(uno::RuntimeException
)
129 return getImplementationName_Static();
131 //--------------------------------------------------------------------------
132 uno::Sequence
< OUString
> OShape::getSupportedServiceNames_Static( ) throw(uno::RuntimeException
)
134 uno::Sequence
< OUString
> aServices(1);
135 aServices
.getArray()[0] = SERVICE_SHAPE
;
139 //------------------------------------------------------------------------------
140 uno::Reference
< uno::XInterface
> OShape::create(uno::Reference
< uno::XComponentContext
> const & xContext
)
142 return *(new OShape(xContext
));
145 //--------------------------------------------------------------------------
146 uno::Sequence
< OUString
> SAL_CALL
OShape::getSupportedServiceNames( ) throw(uno::RuntimeException
)
148 return getSupportedServiceNames_Static();
150 //------------------------------------------------------------------------------
151 sal_Bool SAL_CALL
OShape::supportsService(const OUString
& ServiceName
) throw( uno::RuntimeException
)
154 return m_sServiceName
== ServiceName
|| ::comphelper::existsValue(ServiceName
,getSupportedServiceNames_Static());
156 // -----------------------------------------------------------------------------
158 REPORTCOMPONENT_IMPL(OShape
,m_aProps
.aComponent
)
159 REPORTCOMPONENT_IMPL2(OShape
,m_aProps
.aComponent
)
160 REPORTCOMPONENT_MASTERDETAIL(OShape
,m_aProps
.aComponent
)
161 REPORTCONTROLFORMAT_IMPL2(OShape
,m_aProps
.aFormatProperties
)
162 // -----------------------------------------------------------------------------
163 ::sal_Int32 SAL_CALL
OShape::getControlBackground() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
165 throw beans::UnknownPropertyException();
167 // -----------------------------------------------------------------------------
168 void SAL_CALL
OShape::setControlBackground( ::sal_Int32
/*_backgroundcolor*/ ) throw (uno::RuntimeException
,beans::UnknownPropertyException
)
170 throw beans::UnknownPropertyException();
172 // -----------------------------------------------------------------------------
173 ::sal_Bool SAL_CALL
OShape::getControlBackgroundTransparent() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
175 throw beans::UnknownPropertyException();
177 // -----------------------------------------------------------------------------
178 void SAL_CALL
OShape::setControlBackgroundTransparent( ::sal_Bool
/*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
180 throw beans::UnknownPropertyException();
182 // -----------------------------------------------------------------------------
183 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
OShape::getPropertySetInfo( ) throw(uno::RuntimeException
)
186 //return ShapePropertySet::getPropertySetInfo();
187 return cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
189 // -----------------------------------------------------------------------------
190 cppu::IPropertyArrayHelper
& OShape::getInfoHelper()
192 if ( !m_pAggHelper
.get() )
194 uno::Sequence
<beans::Property
> aAggSeq
;
195 if ( m_aProps
.aComponent
.m_xProperty
.is() )
196 aAggSeq
= m_aProps
.aComponent
.m_xProperty
->getPropertySetInfo()->getProperties();
197 m_pAggHelper
.reset(new OPropertyArrayAggregationHelper(ShapePropertySet::getPropertySetInfo()->getProperties(),aAggSeq
));
199 return *(m_pAggHelper
.get());
202 // -----------------------------------------------------------------------------
203 void SAL_CALL
OShape::setPropertyValue( const OUString
& aPropertyName
, const uno::Any
& aValue
) throw (beans::UnknownPropertyException
, beans::PropertyVetoException
, lang::IllegalArgumentException
, lang::WrappedTargetException
, uno::RuntimeException
)
206 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
)
207 m_aProps
.aComponent
.m_xProperty
->setPropertyValue( aPropertyName
,aValue
);
209 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
)
210 ShapePropertySet::setPropertyValue( aPropertyName
, aValue
);
212 // -----------------------------------------------------------------------------
213 uno::Any SAL_CALL
OShape::getPropertyValue( const OUString
& PropertyName
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
216 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
)
217 return m_aProps
.aComponent
.m_xProperty
->getPropertyValue( PropertyName
);
219 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
)
220 return ShapePropertySet::getPropertyValue( PropertyName
);
223 // -----------------------------------------------------------------------------
224 void SAL_CALL
OShape::addPropertyChangeListener( const OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& xListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
227 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| aPropertyName
.isEmpty() )
228 m_aProps
.aComponent
.m_xProperty
->addPropertyChangeListener( aPropertyName
, xListener
);
230 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| aPropertyName
.isEmpty() )
231 ShapePropertySet::addPropertyChangeListener( aPropertyName
, xListener
);
233 // -----------------------------------------------------------------------------
234 void SAL_CALL
OShape::removePropertyChangeListener( const OUString
& aPropertyName
, const uno::Reference
< beans::XPropertyChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
237 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| aPropertyName
.isEmpty() )
238 m_aProps
.aComponent
.m_xProperty
->removePropertyChangeListener( aPropertyName
, aListener
);
240 if( m_pAggHelper
->classifyProperty(aPropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| aPropertyName
.isEmpty() )
241 ShapePropertySet::removePropertyChangeListener( aPropertyName
, aListener
);
243 // -----------------------------------------------------------------------------
244 void SAL_CALL
OShape::addVetoableChangeListener( const OUString
& PropertyName
, const uno::Reference
< beans::XVetoableChangeListener
>& aListener
) throw (beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
)
247 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY
|| PropertyName
.isEmpty() )
248 m_aProps
.aComponent
.m_xProperty
->addVetoableChangeListener( PropertyName
, aListener
);
250 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| PropertyName
.isEmpty() )
251 ShapePropertySet::addVetoableChangeListener( PropertyName
, aListener
);
253 // -----------------------------------------------------------------------------
254 void SAL_CALL
OShape::removeVetoableChangeListener( const 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
.isEmpty() )
258 m_aProps
.aComponent
.m_xProperty
->removeVetoableChangeListener( PropertyName
, aListener
);
260 if( m_pAggHelper
->classifyProperty(PropertyName
) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY
|| PropertyName
.isEmpty() )
261 ShapePropertySet::removeVetoableChangeListener( PropertyName
, aListener
);
263 // -----------------------------------------------------------------------------
264 // XReportControlModel
265 OUString SAL_CALL
OShape::getDataField() throw ( beans::UnknownPropertyException
, uno::RuntimeException
)
267 throw beans::UnknownPropertyException();
269 // -----------------------------------------------------------------------------
270 void SAL_CALL
OShape::setDataField( const OUString
& /*_datafield*/ ) throw (lang::IllegalArgumentException
, beans::UnknownPropertyException
, uno::RuntimeException
)
272 throw beans::UnknownPropertyException();
274 // -----------------------------------------------------------------------------
275 ::sal_Bool SAL_CALL
OShape::getPrintWhenGroupChange() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
277 ::osl::MutexGuard
aGuard(m_aMutex
);
278 return m_aProps
.bPrintWhenGroupChange
;
280 // -----------------------------------------------------------------------------
281 void SAL_CALL
OShape::setPrintWhenGroupChange( ::sal_Bool _printwhengroupchange
) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
283 set(PROPERTY_PRINTWHENGROUPCHANGE
,_printwhengroupchange
,m_aProps
.bPrintWhenGroupChange
);
285 // -----------------------------------------------------------------------------
286 OUString SAL_CALL
OShape::getConditionalPrintExpression() throw (beans::UnknownPropertyException
, uno::RuntimeException
)
288 ::osl::MutexGuard
aGuard(m_aMutex
);
289 return m_aProps
.aConditionalPrintExpression
;
291 // -----------------------------------------------------------------------------
292 void SAL_CALL
OShape::setConditionalPrintExpression( const OUString
& _conditionalprintexpression
) throw (beans::UnknownPropertyException
, uno::RuntimeException
)
294 set(PROPERTY_CONDITIONALPRINTEXPRESSION
,_conditionalprintexpression
,m_aProps
.aConditionalPrintExpression
);
296 // -----------------------------------------------------------------------------
299 uno::Reference
< util::XCloneable
> SAL_CALL
OShape::createClone( ) throw (uno::RuntimeException
)
301 uno::Reference
< report::XReportComponent
> xSource
= this;
302 uno::Reference
< report::XReportComponent
> xSet
;
305 SvxShape
* pShape
= SvxShape::getImplementation( xSource
);
308 SdrObject
* pObject
= pShape
->GetSdrObject();
311 SdrObject
* pClone
= pObject
->Clone();
314 xSet
.set(pClone
->getUnoShape(),uno::UNO_QUERY_THROW
);
319 catch(const uno::Exception
&)
321 DBG_UNHANDLED_EXCEPTION();
325 // -----------------------------------------------------------------------------
327 uno::Reference
< uno::XInterface
> SAL_CALL
OShape::getParent( ) throw (uno::RuntimeException
)
329 return OShapeHelper::getParent(this);
331 // -----------------------------------------------------------------------------
332 void SAL_CALL
OShape::setParent( const uno::Reference
< uno::XInterface
>& Parent
) throw (lang::NoSupportException
, uno::RuntimeException
)
334 ::osl::MutexGuard
aGuard(m_aMutex
);
335 m_aProps
.aComponent
.m_xParent
= uno::Reference
< container::XChild
>(Parent
,uno::UNO_QUERY
);
337 uno::Reference
< report::XFormatCondition
> SAL_CALL
OShape::createFormatCondition( ) throw (uno::Exception
, uno::RuntimeException
)
339 return new OFormatCondition(m_aProps
.aComponent
.m_xContext
);
341 // -----------------------------------------------------------------------------
343 void SAL_CALL
OShape::addContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
)
345 m_aProps
.addContainerListener(xListener
);
347 // -----------------------------------------------------------------------------
348 void SAL_CALL
OShape::removeContainerListener( const uno::Reference
< container::XContainerListener
>& xListener
) throw (uno::RuntimeException
)
350 m_aProps
.removeContainerListener(xListener
);
352 // -----------------------------------------------------------------------------
354 uno::Type SAL_CALL
OShape::getElementType( ) throw (uno::RuntimeException
)
356 return ::getCppuType(static_cast< uno::Reference
<report::XFormatCondition
>*>(NULL
));
358 // -----------------------------------------------------------------------------
359 ::sal_Bool SAL_CALL
OShape::hasElements( ) throw (uno::RuntimeException
)
361 return m_aProps
.hasElements();
363 // -----------------------------------------------------------------------------
365 void SAL_CALL
OShape::insertByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
367 m_aProps
.insertByIndex(Index
,Element
);
369 // -----------------------------------------------------------------------------
370 void SAL_CALL
OShape::removeByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
372 m_aProps
.removeByIndex(Index
);
374 // -----------------------------------------------------------------------------
376 void SAL_CALL
OShape::replaceByIndex( ::sal_Int32 Index
, const uno::Any
& Element
) throw (lang::IllegalArgumentException
, lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
378 m_aProps
.replaceByIndex(Index
,Element
);
380 // -----------------------------------------------------------------------------
382 ::sal_Int32 SAL_CALL
OShape::getCount( ) throw (uno::RuntimeException
)
384 return m_aProps
.getCount();
386 // -----------------------------------------------------------------------------
387 uno::Any SAL_CALL
OShape::getByIndex( ::sal_Int32 Index
) throw (lang::IndexOutOfBoundsException
, lang::WrappedTargetException
, uno::RuntimeException
)
389 return m_aProps
.getByIndex( Index
);
391 // -----------------------------------------------------------------------------
393 awt::Point SAL_CALL
OShape::getPosition( ) throw (uno::RuntimeException
)
395 return OShapeHelper::getPosition(this);
397 // -----------------------------------------------------------------------------
398 void SAL_CALL
OShape::setPosition( const awt::Point
& aPosition
) throw (uno::RuntimeException
)
400 OShapeHelper::setPosition(aPosition
,this);
402 // -----------------------------------------------------------------------------
403 awt::Size SAL_CALL
OShape::getSize( ) throw (uno::RuntimeException
)
405 return OShapeHelper::getSize(this);
407 // -----------------------------------------------------------------------------
408 void SAL_CALL
OShape::setSize( const awt::Size
& aSize
) throw (beans::PropertyVetoException
, uno::RuntimeException
)
410 OShapeHelper::setSize(aSize
,this);
412 // -----------------------------------------------------------------------------
415 OUString SAL_CALL
OShape::getShapeType( ) throw (uno::RuntimeException
)
417 ::osl::MutexGuard
aGuard(m_aMutex
);
418 if ( m_aProps
.aComponent
.m_xShape
.is() )
419 return m_aProps
.aComponent
.m_xShape
->getShapeType();
420 return OUString("com.sun.star.drawing.CustomShape");
422 // -----------------------------------------------------------------------------
423 ::sal_Int32 SAL_CALL
OShape::getZOrder() throw (uno::RuntimeException
)
425 ::osl::MutexGuard
aGuard(m_aMutex
);
426 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_ZORDER
) >>= m_nZOrder
;
429 // -----------------------------------------------------------------------------
430 void SAL_CALL
OShape::setZOrder( ::sal_Int32 _zorder
) throw (uno::RuntimeException
)
432 ::osl::MutexGuard
aGuard(m_aMutex
);
433 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_ZORDER
,uno::makeAny(_zorder
));
434 set(PROPERTY_ZORDER
,_zorder
,m_nZOrder
);
436 // -----------------------------------------------------------------------------
437 ::sal_Bool SAL_CALL
OShape::getOpaque() throw (::com::sun::star::uno::RuntimeException
)
439 ::osl::MutexGuard
aGuard(m_aMutex
);
442 // -----------------------------------------------------------------------------
443 void SAL_CALL
OShape::setOpaque( ::sal_Bool _opaque
) throw (::com::sun::star::uno::RuntimeException
)
445 ::osl::MutexGuard
aGuard(m_aMutex
);
446 set(PROPERTY_OPAQUE
,_opaque
,m_bOpaque
);
448 // -----------------------------------------------------------------------------
449 drawing::HomogenMatrix3 SAL_CALL
OShape::getTransformation() throw (uno::RuntimeException
)
451 ::osl::MutexGuard
aGuard(m_aMutex
);
452 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_TRANSFORMATION
) >>= m_Transformation
;
453 return m_Transformation
;
455 // -----------------------------------------------------------------------------
456 void SAL_CALL
OShape::setTransformation( const drawing::HomogenMatrix3
& _transformation
) throw (uno::RuntimeException
)
458 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_TRANSFORMATION
,uno::makeAny(_transformation
));
459 set(PROPERTY_TRANSFORMATION
,_transformation
,m_Transformation
);
461 // -----------------------------------------------------------------------------
462 OUString SAL_CALL
OShape::getCustomShapeEngine() throw (uno::RuntimeException
)
464 ::osl::MutexGuard
aGuard(m_aMutex
);
465 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEENGINE
) >>= m_CustomShapeEngine
;
467 return m_CustomShapeEngine
;
469 // -----------------------------------------------------------------------------
470 void SAL_CALL
OShape::setCustomShapeEngine( const OUString
& _customshapeengine
) throw (uno::RuntimeException
)
472 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEENGINE
,uno::makeAny(_customshapeengine
));
473 set(PROPERTY_CUSTOMSHAPEENGINE
,_customshapeengine
,m_CustomShapeEngine
);
475 // -----------------------------------------------------------------------------
476 OUString SAL_CALL
OShape::getCustomShapeData() throw (uno::RuntimeException
)
478 ::osl::MutexGuard
aGuard(m_aMutex
);
479 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEDATA
) >>= m_CustomShapeData
;
480 return m_CustomShapeData
;
482 // -----------------------------------------------------------------------------
483 void SAL_CALL
OShape::setCustomShapeData( const OUString
& _customshapedata
) throw (uno::RuntimeException
)
485 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEDATA
,uno::makeAny(_customshapedata
));
486 set(PROPERTY_CUSTOMSHAPEDATA
,_customshapedata
,m_CustomShapeData
);
488 // -----------------------------------------------------------------------------
489 uno::Sequence
< beans::PropertyValue
> SAL_CALL
OShape::getCustomShapeGeometry() throw (uno::RuntimeException
)
491 ::osl::MutexGuard
aGuard(m_aMutex
);
492 m_aProps
.aComponent
.m_xProperty
->getPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY
) >>= m_CustomShapeGeometry
;
493 return m_CustomShapeGeometry
;
495 // -----------------------------------------------------------------------------
496 void SAL_CALL
OShape::setCustomShapeGeometry( const uno::Sequence
< beans::PropertyValue
>& _customshapegeometry
) throw (uno::RuntimeException
)
498 m_aProps
.aComponent
.m_xProperty
->setPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY
,uno::makeAny(_customshapegeometry
));
499 set(PROPERTY_CUSTOMSHAPEGEOMETRY
,_customshapegeometry
,m_CustomShapeGeometry
);
501 // -----------------------------------------------------------------------------
502 // -----------------------------------------------------------------------------
504 // =============================================================================
505 }// namespace reportdesign
506 // =============================================================================
508 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */