sync master with lastest vba changes
[ooovba.git] / reportdesign / source / core / api / ImageControl.cxx
blobf53413023b3dd5f2741bec0600cca6b39c6a94b2
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: ImageControl.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 "ImageControl.hxx"
31 #include <com/sun/star/beans/PropertyAttribute.hpp>
32 #include <com/sun/star/beans/XPropertyState.hpp>
33 #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
34 #include "corestrings.hrc"
35 #endif
36 #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
37 #include "core_resource.hrc"
38 #endif
39 #include "core_resource.hxx"
40 #include <comphelper/sequence.hxx>
41 #include "Tools.hxx"
42 #include <tools/debug.hxx>
43 #include <comphelper/property.hxx>
44 #include "FormatCondition.hxx"
45 #include <com/sun/star/text/ParagraphVertAlign.hpp>
46 #include "ReportHelperImpl.hxx"
47 // =============================================================================
48 namespace reportdesign
50 // =============================================================================
51 using namespace com::sun::star;
52 using namespace comphelper;
53 uno::Sequence< ::rtl::OUString > lcl_getImageOptionals()
55 ::rtl::OUString pProps[] = {
56 PROPERTY_CHARCOLOR
57 ,PROPERTY_CHAREMPHASIS
58 ,PROPERTY_CHARFONTCHARSET
59 ,PROPERTY_CHARFONTFAMILY
60 ,PROPERTY_CHARFONTNAME
61 ,PROPERTY_CHARFONTPITCH
62 ,PROPERTY_CHARFONTSTYLENAME
63 ,PROPERTY_CHARHEIGHT
64 ,PROPERTY_CHARPOSTURE
65 ,PROPERTY_CHARRELIEF
66 ,PROPERTY_FONTDESCRIPTOR
67 ,PROPERTY_FONTDESCRIPTORASIAN
68 ,PROPERTY_FONTDESCRIPTORCOMPLEX
69 ,PROPERTY_CONTROLTEXTEMPHASISMARK
70 ,PROPERTY_CHARROTATION
71 ,PROPERTY_CHARSCALEWIDTH
72 ,PROPERTY_CHARSTRIKEOUT
73 ,PROPERTY_CHARUNDERLINECOLOR
74 ,PROPERTY_CHARUNDERLINE
75 ,PROPERTY_CHARWEIGHT
76 ,PROPERTY_CHARWORDMODE
77 ,PROPERTY_CHARFLASH
78 ,PROPERTY_CHARAUTOKERNING
79 ,PROPERTY_CHARESCAPEMENTHEIGHT
80 ,PROPERTY_CHARLOCALE
81 ,PROPERTY_CHARESCAPEMENT
82 ,PROPERTY_CHARCASEMAP
83 ,PROPERTY_CHARCOMBINEISON
84 ,PROPERTY_CHARCOMBINEPREFIX
85 ,PROPERTY_CHARCOMBINESUFFIX
86 ,PROPERTY_CHARHIDDEN
87 ,PROPERTY_CHARSHADOWED
88 ,PROPERTY_CHARCONTOURED
89 ,PROPERTY_VISITEDCHARSTYLENAME
90 ,PROPERTY_UNVISITEDCHARSTYLENAME
91 ,PROPERTY_CHARKERNING
92 ,PROPERTY_MASTERFIELDS
93 ,PROPERTY_DETAILFIELDS
94 ,PROPERTY_PARAADJUST
95 , PROPERTY_CHAREMPHASISASIAN
96 , PROPERTY_CHARFONTNAMEASIAN
97 , PROPERTY_CHARFONTSTYLENAMEASIAN
98 , PROPERTY_CHARFONTFAMILYASIAN
99 , PROPERTY_CHARFONTCHARSETASIAN
100 , PROPERTY_CHARFONTPITCHASIAN
101 , PROPERTY_CHARHEIGHTASIAN
102 , PROPERTY_CHARUNDERLINEASIAN
103 , PROPERTY_CHARWEIGHTASIAN
104 , PROPERTY_CHARPOSTUREASIAN
105 , PROPERTY_CHARWORDMODEASIAN
106 , PROPERTY_CHARROTATIONASIAN
107 , PROPERTY_CHARSCALEWIDTHASIAN
108 , PROPERTY_CHARLOCALEASIAN
109 , PROPERTY_CHAREMPHASISCOMPLEX
110 , PROPERTY_CHARFONTNAMECOMPLEX
111 , PROPERTY_CHARFONTSTYLENAMECOMPLEX
112 , PROPERTY_CHARFONTFAMILYCOMPLEX
113 , PROPERTY_CHARFONTCHARSETCOMPLEX
114 , PROPERTY_CHARFONTPITCHCOMPLEX
115 , PROPERTY_CHARHEIGHTCOMPLEX
116 , PROPERTY_CHARUNDERLINECOMPLEX
117 , PROPERTY_CHARWEIGHTCOMPLEX
118 , PROPERTY_CHARPOSTURECOMPLEX
119 , PROPERTY_CHARWORDMODECOMPLEX
120 , PROPERTY_CHARROTATIONCOMPLEX
121 , PROPERTY_CHARSCALEWIDTHCOMPLEX
122 , PROPERTY_CHARLOCALECOMPLEX
125 return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
128 DBG_NAME( rpt_OImageControl )
129 // -----------------------------------------------------------------------------
130 OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _xContext)
131 :ImageControlBase(m_aMutex)
132 ,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals())
133 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
134 ,m_bScaleImage(sal_False)
135 ,m_bPreserveIRI(sal_True)
137 DBG_CTOR( rpt_OImageControl,NULL);
138 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager());
140 // -----------------------------------------------------------------------------
141 OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _xContext
142 ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
143 ,uno::Reference< drawing::XShape >& _xShape)
144 :ImageControlBase(m_aMutex)
145 ,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals())
146 ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
147 ,m_bScaleImage(sal_False)
148 ,m_bPreserveIRI(sal_True)
150 DBG_CTOR( rpt_OImageControl,NULL);
151 m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager());
152 m_aProps.aComponent.m_xFactory = _xFactory;
153 osl_incrementInterlockedCount( &m_refCount );
155 m_aProps.aComponent.setShape(_xShape,this,m_refCount);
157 osl_decrementInterlockedCount( &m_refCount );
159 // -----------------------------------------------------------------------------
160 OImageControl::~OImageControl()
162 DBG_DTOR( rpt_OImageControl,NULL);
164 // -----------------------------------------------------------------------------
165 //IMPLEMENT_FORWARD_XINTERFACE2(OImageControl,ImageControlBase,ImageControlPropertySet)
166 IMPLEMENT_FORWARD_REFCOUNT( OImageControl, ImageControlBase )
167 // --------------------------------------------------------------------------------
168 uno::Any SAL_CALL OImageControl::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
170 uno::Any aReturn = ImageControlBase::queryInterface(_rType);
171 if ( !aReturn.hasValue() )
172 aReturn = ImageControlPropertySet::queryInterface(_rType);
174 if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
175 return aReturn;
177 return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
180 // -----------------------------------------------------------------------------
181 void SAL_CALL OImageControl::dispose() throw(uno::RuntimeException)
183 ImageControlPropertySet::dispose();
184 cppu::WeakComponentImplHelperBase::dispose();
186 // -----------------------------------------------------------------------------
187 ::rtl::OUString OImageControl::getImplementationName_Static( ) throw(uno::RuntimeException)
189 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OImageControl"));
192 //--------------------------------------------------------------------------
193 ::rtl::OUString SAL_CALL OImageControl::getImplementationName( ) throw(uno::RuntimeException)
195 return getImplementationName_Static();
197 //--------------------------------------------------------------------------
198 uno::Sequence< ::rtl::OUString > OImageControl::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
200 uno::Sequence< ::rtl::OUString > aServices(1);
201 aServices.getArray()[0] = SERVICE_IMAGECONTROL;
203 return aServices;
205 //------------------------------------------------------------------------------
206 uno::Reference< uno::XInterface > OImageControl::create(uno::Reference< uno::XComponentContext > const & xContext)
208 return *(new OImageControl(xContext));
211 //--------------------------------------------------------------------------
212 uno::Sequence< ::rtl::OUString > SAL_CALL OImageControl::getSupportedServiceNames( ) throw(uno::RuntimeException)
214 return getSupportedServiceNames_Static();
216 //------------------------------------------------------------------------------
217 sal_Bool SAL_CALL OImageControl::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
219 return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
221 // -----------------------------------------------------------------------------
222 // XReportComponent
223 REPORTCOMPONENT_IMPL(OImageControl,m_aProps.aComponent)
224 REPORTCOMPONENT_IMPL2(OImageControl,m_aProps.aComponent)
225 REPORTCOMPONENT_NOMASTERDETAIL(OImageControl)
226 //REPORTCONTROLFORMAT_IMPL(OImageControl,m_aProps.aFormatProperties)
227 NO_REPORTCONTROLFORMAT_IMPL(OImageControl)
228 ::rtl::OUString SAL_CALL OImageControl::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
230 ::osl::MutexGuard aGuard(m_aMutex);
231 return m_aProps.aFormatProperties.sHyperLinkURL;
233 void SAL_CALL OImageControl::setHyperLinkURL(const ::rtl::OUString & the_value) throw (uno::RuntimeException, beans::UnknownPropertyException)
235 set(PROPERTY_HYPERLINKURL,the_value,m_aProps.aFormatProperties.sHyperLinkURL);
237 ::rtl::OUString SAL_CALL OImageControl::getHyperLinkTarget() throw (uno::RuntimeException, beans::UnknownPropertyException)
239 ::osl::MutexGuard aGuard(m_aMutex);
240 return m_aProps.aFormatProperties.sHyperLinkTarget;
242 void SAL_CALL OImageControl::setHyperLinkTarget(const ::rtl::OUString & the_value) throw (uno::RuntimeException, beans::UnknownPropertyException)
244 set(PROPERTY_HYPERLINKTARGET,the_value,m_aProps.aFormatProperties.sHyperLinkTarget);
246 ::rtl::OUString SAL_CALL OImageControl::getHyperLinkName() throw (uno::RuntimeException, beans::UnknownPropertyException)
248 ::osl::MutexGuard aGuard(m_aMutex);
249 return m_aProps.aFormatProperties.sHyperLinkName;
251 void SAL_CALL OImageControl::setHyperLinkName(const ::rtl::OUString & the_value) throw (uno::RuntimeException, beans::UnknownPropertyException)
253 set(PROPERTY_HYPERLINKNAME,the_value,m_aProps.aFormatProperties.sHyperLinkName);
256 // -----------------------------------------------------------------------------
257 ::sal_Int32 SAL_CALL OImageControl::getControlBackground() throw (::com::sun::star::beans::UnknownPropertyException, uno::RuntimeException)
259 ::osl::MutexGuard aGuard(m_aMutex);
260 return m_aProps.aFormatProperties.m_bBackgroundTransparent ? COL_TRANSPARENT : m_aProps.aFormatProperties.nBackgroundColor;
263 void SAL_CALL OImageControl::setControlBackground( ::sal_Int32 _backgroundcolor ) throw (uno::RuntimeException, beans::UnknownPropertyException)
265 sal_Bool bTransparent = _backgroundcolor == static_cast<sal_Int32>(COL_TRANSPARENT);
266 setControlBackgroundTransparent(bTransparent);
267 if ( !bTransparent )
268 set(PROPERTY_CONTROLBACKGROUND,_backgroundcolor,m_aProps.aFormatProperties.nBackgroundColor);
271 ::sal_Bool SAL_CALL OImageControl::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException)
273 ::osl::MutexGuard aGuard(m_aMutex);
274 return m_aProps.aFormatProperties.m_bBackgroundTransparent;
277 void SAL_CALL OImageControl::setControlBackgroundTransparent( ::sal_Bool _controlbackgroundtransparent ) throw (beans::UnknownPropertyException, uno::RuntimeException)
279 set(PROPERTY_CONTROLBACKGROUNDTRANSPARENT,_controlbackgroundtransparent,m_aProps.aFormatProperties.m_bBackgroundTransparent);
280 if ( _controlbackgroundtransparent )
281 set(PROPERTY_CONTROLBACKGROUND,static_cast<sal_Int32>(COL_TRANSPARENT),m_aProps.aFormatProperties.nBackgroundColor);
284 // -----------------------------------------------------------------------------
285 uno::Reference< beans::XPropertySetInfo > SAL_CALL OImageControl::getPropertySetInfo( ) throw(uno::RuntimeException)
287 return ImageControlPropertySet::getPropertySetInfo();
289 // -----------------------------------------------------------------------------
290 void SAL_CALL OImageControl::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
292 ImageControlPropertySet::setPropertyValue( aPropertyName, aValue );
294 // -----------------------------------------------------------------------------
295 uno::Any SAL_CALL OImageControl::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
297 return ImageControlPropertySet::getPropertyValue( PropertyName);
299 // -----------------------------------------------------------------------------
300 void SAL_CALL OImageControl::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
302 ImageControlPropertySet::addPropertyChangeListener( aPropertyName, xListener );
304 // -----------------------------------------------------------------------------
305 void SAL_CALL OImageControl::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
307 ImageControlPropertySet::removePropertyChangeListener( aPropertyName, aListener );
309 // -----------------------------------------------------------------------------
310 void SAL_CALL OImageControl::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
312 ImageControlPropertySet::addVetoableChangeListener( PropertyName, aListener );
314 // -----------------------------------------------------------------------------
315 void SAL_CALL OImageControl::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
317 ImageControlPropertySet::removeVetoableChangeListener( PropertyName, aListener );
319 // -----------------------------------------------------------------------------
320 // XReportControlModel
321 ::rtl::OUString SAL_CALL OImageControl::getDataField() throw ( beans::UnknownPropertyException, uno::RuntimeException)
323 ::osl::MutexGuard aGuard(m_aMutex);
324 return m_aProps.aDataField;
326 // -----------------------------------------------------------------------------
327 void SAL_CALL OImageControl::setDataField( const ::rtl::OUString& _datafield ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
329 set(PROPERTY_DATAFIELD,_datafield,m_aProps.aDataField);
331 // -----------------------------------------------------------------------------
332 // -----------------------------------------------------------------------------
333 ::sal_Bool SAL_CALL OImageControl::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
335 ::osl::MutexGuard aGuard(m_aMutex);
336 return m_aProps.bPrintWhenGroupChange;
338 // -----------------------------------------------------------------------------
339 void SAL_CALL OImageControl::setPrintWhenGroupChange( ::sal_Bool _printwhengroupchange ) throw (beans::UnknownPropertyException, uno::RuntimeException)
341 set(PROPERTY_PRINTWHENGROUPCHANGE,_printwhengroupchange,m_aProps.bPrintWhenGroupChange);
343 // -----------------------------------------------------------------------------
344 ::rtl::OUString SAL_CALL OImageControl::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
346 ::osl::MutexGuard aGuard(m_aMutex);
347 return m_aProps.aConditionalPrintExpression;
349 // -----------------------------------------------------------------------------
350 void SAL_CALL OImageControl::setConditionalPrintExpression( const ::rtl::OUString& _conditionalprintexpression ) throw (beans::UnknownPropertyException, uno::RuntimeException)
352 set(PROPERTY_CONDITIONALPRINTEXPRESSION,_conditionalprintexpression,m_aProps.aConditionalPrintExpression);
355 // -----------------------------------------------------------------------------
357 // XCloneable
358 uno::Reference< util::XCloneable > SAL_CALL OImageControl::createClone( ) throw (uno::RuntimeException)
360 uno::Reference< report::XReportComponent> xSource = this;
361 uno::Reference< report::XImageControl> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_IMAGECONTROL),uno::UNO_QUERY_THROW);
362 return xSet.get();
364 // -----------------------------------------------------------------------------
366 // XImageControl
367 ::sal_Bool SAL_CALL OImageControl::getScaleImage() throw (uno::RuntimeException)
369 ::osl::MutexGuard aGuard(m_aMutex);
370 return m_bScaleImage;
372 // -----------------------------------------------------------------------------
373 void SAL_CALL OImageControl::setScaleImage( ::sal_Bool _scaleimage ) throw (uno::RuntimeException)
375 set(PROPERTY_SCALEIMAGE,_scaleimage,m_bScaleImage);
377 // -----------------------------------------------------------------------------
378 ::rtl::OUString SAL_CALL OImageControl::getImageURL() throw (uno::RuntimeException)
380 ::osl::MutexGuard aGuard(m_aMutex);
381 return m_aImageURL;
383 // -----------------------------------------------------------------------------
384 void SAL_CALL OImageControl::setImageURL( const ::rtl::OUString& _imageurl ) throw (uno::RuntimeException)
386 set(PROPERTY_IMAGEURL,_imageurl,m_aImageURL);
388 // -----------------------------------------------------------------------------
389 uno::Reference< awt::XImageProducer > SAL_CALL OImageControl::getImageProducer( ) throw (uno::RuntimeException)
391 return uno::Reference< awt::XImageProducer >();
393 // -----------------------------------------------------------------------------
394 // XChild
395 uno::Reference< uno::XInterface > SAL_CALL OImageControl::getParent( ) throw (uno::RuntimeException)
397 return OShapeHelper::getParent(this);
399 // -----------------------------------------------------------------------------
400 void SAL_CALL OImageControl::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
402 OShapeHelper::setParent(Parent,this);
404 uno::Reference< report::XFormatCondition > SAL_CALL OImageControl::createFormatCondition( ) throw (uno::Exception, uno::RuntimeException)
406 return new OFormatCondition(m_aProps.aComponent.m_xContext);
408 // -----------------------------------------------------------------------------
409 // XContainer
410 void SAL_CALL OImageControl::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
412 m_aProps.addContainerListener(xListener);
414 // -----------------------------------------------------------------------------
415 void SAL_CALL OImageControl::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
417 m_aProps.removeContainerListener(xListener);
419 // -----------------------------------------------------------------------------
420 // XElementAccess
421 uno::Type SAL_CALL OImageControl::getElementType( ) throw (uno::RuntimeException)
423 return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
425 // -----------------------------------------------------------------------------
426 ::sal_Bool SAL_CALL OImageControl::hasElements( ) throw (uno::RuntimeException)
428 return m_aProps.hasElements();
430 // -----------------------------------------------------------------------------
431 // XIndexContainer
432 void SAL_CALL OImageControl::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
434 m_aProps.insertByIndex(Index,Element);
436 // -----------------------------------------------------------------------------
437 void SAL_CALL OImageControl::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
439 m_aProps.removeByIndex(Index);
441 // -----------------------------------------------------------------------------
442 // XIndexReplace
443 void SAL_CALL OImageControl::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
445 m_aProps.replaceByIndex(Index,Element);
447 // -----------------------------------------------------------------------------
448 // XIndexAccess
449 ::sal_Int32 SAL_CALL OImageControl::getCount( ) throw (uno::RuntimeException)
451 return m_aProps.getCount();
453 // -----------------------------------------------------------------------------
454 uno::Any SAL_CALL OImageControl::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
456 return m_aProps.getByIndex( Index );
458 // -----------------------------------------------------------------------------
459 // -----------------------------------------------------------------------------
460 // XShape
461 awt::Point SAL_CALL OImageControl::getPosition( ) throw (uno::RuntimeException)
463 return OShapeHelper::getPosition(this);
465 // -----------------------------------------------------------------------------
466 void SAL_CALL OImageControl::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
468 OShapeHelper::setPosition(aPosition,this);
470 // -----------------------------------------------------------------------------
471 awt::Size SAL_CALL OImageControl::getSize( ) throw (uno::RuntimeException)
473 return OShapeHelper::getSize(this);
475 // -----------------------------------------------------------------------------
476 void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
478 OShapeHelper::setSize(aSize,this);
480 // -----------------------------------------------------------------------------
482 // XShapeDescriptor
483 ::rtl::OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException)
485 ::osl::MutexGuard aGuard(m_aMutex);
486 if ( m_aProps.aComponent.m_xShape.is() )
487 return m_aProps.aComponent.m_xShape->getShapeType();
488 return ::rtl::OUString();
490 // -----------------------------------------------------------------------------
491 ::sal_Bool SAL_CALL OImageControl::getPreserveIRI() throw (uno::RuntimeException)
493 ::osl::MutexGuard aGuard(m_aMutex);
494 return m_bPreserveIRI;
496 // -----------------------------------------------------------------------------
497 void SAL_CALL OImageControl::setPreserveIRI( ::sal_Bool _preserveiri ) throw (uno::RuntimeException)
499 set(PROPERTY_PRESERVEIRI,_preserveiri,m_bPreserveIRI);
501 // =============================================================================
502 } // namespace reportdesign
503 // =============================================================================