19#include <ImageControl.hxx>
22#include <core_resource.hxx>
27#include <com/sun/star/awt/ImageScaleMode.hpp>
114,m_nScaleMode(awt::ImageScaleMode::
NONE)
120OImageControl::OImageControl(uno::Reference< uno::XComponentContext >
const & _xContext
121 ,
const uno::Reference< lang::XMultiServiceFactory>& _xFactory
122 ,uno::Reference< drawing::XShape >& _xShape)
126,m_nScaleMode(awt::ImageScaleMode::
NONE)
130 m_aProps.aComponent.m_xFactory = _xFactory;
131 osl_atomic_increment( &m_refCount );
133 m_aProps.aComponent.setShape(_xShape,
this,m_refCount);
135 osl_atomic_decrement( &m_refCount );
138OImageControl::~OImageControl()
147 uno::Any aReturn = ImageControlBase::queryInterface(_rType);
149 aReturn = ImageControlPropertySet::queryInterface(_rType);
151 if ( !aReturn.
hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
154 return aReturn.
hasValue() ? aReturn : (
m_aProps.aComponent.m_xProxy.is() ?
m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
158void SAL_CALL OImageControl::dispose()
160 ImageControlPropertySet::dispose();
161 cppu::WeakComponentImplHelperBase::dispose();
164OUString OImageControl::getImplementationName_Static( )
166 return "com.sun.star.comp.report.OImageControl";
170OUString SAL_CALL OImageControl::getImplementationName( )
172 return getImplementationName_Static();
175uno::Sequence< OUString > OImageControl::getSupportedServiceNames_Static( )
182uno::Reference< uno::XInterface > OImageControl::create(uno::Reference< uno::XComponentContext >
const & xContext)
188uno::Sequence< OUString > SAL_CALL OImageControl::getSupportedServiceNames( )
190 return getSupportedServiceNames_Static();
193sal_Bool SAL_CALL OImageControl::supportsService(
const OUString& ServiceName)
205 ::osl::MutexGuard aGuard(m_aMutex);
206 return m_aProps.aFormatProperties.sHyperLinkURL;
208void SAL_CALL OImageControl::setHyperLinkURL(
const OUString & the_value)
212OUString SAL_CALL OImageControl::getHyperLinkTarget()
214 ::osl::MutexGuard aGuard(m_aMutex);
215 return m_aProps.aFormatProperties.sHyperLinkTarget;
217void SAL_CALL OImageControl::setHyperLinkTarget(
const OUString & the_value)
221OUString SAL_CALL OImageControl::getHyperLinkName()
223 ::osl::MutexGuard aGuard(m_aMutex);
224 return m_aProps.aFormatProperties.sHyperLinkName;
226void SAL_CALL OImageControl::setHyperLinkName(
const OUString & the_value)
232::sal_Int32 SAL_CALL OImageControl::getControlBackground()
234 ::osl::MutexGuard aGuard(m_aMutex);
238void SAL_CALL OImageControl::setControlBackground( ::sal_Int32 _backgroundcolor )
240 bool bTransparent = _backgroundcolor ==
static_cast<sal_Int32
>(
COL_TRANSPARENT);
241 setControlBackgroundTransparent(bTransparent);
246sal_Bool SAL_CALL OImageControl::getControlBackgroundTransparent()
248 ::osl::MutexGuard aGuard(m_aMutex);
249 return m_aProps.aFormatProperties.m_bBackgroundTransparent;
252void SAL_CALL OImageControl::setControlBackgroundTransparent(
sal_Bool _controlbackgroundtransparent )
255 if ( _controlbackgroundtransparent )
260uno::Reference< beans::XPropertySetInfo > SAL_CALL OImageControl::getPropertySetInfo( )
262 return ImageControlPropertySet::getPropertySetInfo();
265void SAL_CALL OImageControl::setPropertyValue(
const OUString& aPropertyName,
const uno::Any& aValue )
267 ImageControlPropertySet::setPropertyValue( aPropertyName, aValue );
270uno::Any SAL_CALL OImageControl::getPropertyValue(
const OUString& PropertyName )
272 return ImageControlPropertySet::getPropertyValue( PropertyName);
275void SAL_CALL OImageControl::addPropertyChangeListener(
const OUString& aPropertyName,
const uno::Reference< beans::XPropertyChangeListener >& xListener )
277 ImageControlPropertySet::addPropertyChangeListener( aPropertyName, xListener );
280void SAL_CALL OImageControl::removePropertyChangeListener(
const OUString& aPropertyName,
const uno::Reference< beans::XPropertyChangeListener >& aListener )
282 ImageControlPropertySet::removePropertyChangeListener( aPropertyName, aListener );
285void SAL_CALL OImageControl::addVetoableChangeListener(
const OUString& PropertyName,
const uno::Reference< beans::XVetoableChangeListener >& aListener )
287 ImageControlPropertySet::addVetoableChangeListener( PropertyName, aListener );
290void SAL_CALL OImageControl::removeVetoableChangeListener(
const OUString& PropertyName,
const uno::Reference< beans::XVetoableChangeListener >& aListener )
292 ImageControlPropertySet::removeVetoableChangeListener( PropertyName, aListener );
296OUString SAL_CALL OImageControl::getDataField()
298 ::osl::MutexGuard aGuard(m_aMutex);
302void SAL_CALL OImageControl::setDataField(
const OUString& _datafield )
308sal_Bool SAL_CALL OImageControl::getPrintWhenGroupChange()
310 ::osl::MutexGuard aGuard(m_aMutex);
311 return m_aProps.bPrintWhenGroupChange;
314void SAL_CALL OImageControl::setPrintWhenGroupChange(
sal_Bool _printwhengroupchange )
319OUString SAL_CALL OImageControl::getConditionalPrintExpression()
321 ::osl::MutexGuard aGuard(m_aMutex);
322 return m_aProps.aConditionalPrintExpression;
325void SAL_CALL OImageControl::setConditionalPrintExpression(
const OUString& _conditionalprintexpression )
332uno::Reference< util::XCloneable > SAL_CALL OImageControl::createClone( )
334 uno::Reference< report::XReportComponent> xSource =
this;
342OUString SAL_CALL OImageControl::getImageURL()
348void SAL_CALL OImageControl::setImageURL(
const OUString& _imageurl )
353uno::Reference< awt::XImageProducer > SAL_CALL OImageControl::getImageProducer( )
355 return uno::Reference< awt::XImageProducer >();
359uno::Reference< uno::XInterface > SAL_CALL OImageControl::getParent( )
361 return OShapeHelper::getParent(
this);
364void SAL_CALL OImageControl::setParent(
const uno::Reference< uno::XInterface >& Parent )
366 OShapeHelper::setParent(
Parent,
this);
368uno::Reference< report::XFormatCondition > SAL_CALL OImageControl::createFormatCondition( )
374void SAL_CALL OImageControl::addContainerListener(
const uno::Reference< container::XContainerListener >& xListener )
376 m_aProps.addContainerListener(xListener);
379void SAL_CALL OImageControl::removeContainerListener(
const uno::Reference< container::XContainerListener >& xListener )
381 m_aProps.removeContainerListener(xListener);
396void SAL_CALL OImageControl::insertByIndex( ::sal_Int32
Index,
const uno::Any& Element )
401void SAL_CALL OImageControl::removeByIndex( ::sal_Int32
Index )
407void SAL_CALL OImageControl::replaceByIndex( ::sal_Int32
Index,
const uno::Any& Element )
413::sal_Int32 SAL_CALL OImageControl::getCount( )
425awt::Point SAL_CALL OImageControl::getPosition( )
427 return OShapeHelper::getPosition(
this);
430void SAL_CALL OImageControl::setPosition(
const awt::Point& aPosition )
432 OShapeHelper::setPosition(aPosition,
this);
435awt::Size SAL_CALL OImageControl::getSize( )
437 return OShapeHelper::getSize(
this);
440void SAL_CALL OImageControl::setSize(
const awt::Size& aSize )
442 OShapeHelper::setSize(aSize,
this);
447OUString SAL_CALL OImageControl::getShapeType( )
450 if (
m_aProps.aComponent.m_xShape.is() )
451 return m_aProps.aComponent.m_xShape->getShapeType();
452 return "com.sun.star.drawing.ControlShape";
455::sal_Int16 SAL_CALL OImageControl::getScaleMode()
461void SAL_CALL OImageControl::setScaleMode( ::sal_Int16 _scalemode )
463 if ( _scalemode < awt::ImageScaleMode::NONE ||_scalemode > awt::ImageScaleMode::ANISOTROPIC )
464 throw lang::IllegalArgumentException();
471 return m_bPreserveIRI;
474void SAL_CALL OImageControl::setPreserveIRI(
sal_Bool _preserveiri )
#define REPORTCOMPONENT_IMPL2(clazz, arg)
#define REPORTCOMPONENT_NOMASTERDETAIL(clazz)
#define REPORTCOMPONENT_IMPL(clazz, arg)
#define NO_REPORTCONTROLFORMAT_IMPL(clazz)
css::uno::Type const & get()
OImageControl(const OImageControl &)=delete
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
OUString RptResId(TranslateId aId)
#define SAL_N_ELEMENTS(arr)
void set(css::uno::UnoInterfaceReference const &value)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
uno::Reference< util::XCloneable > cloneObject(const uno::Reference< report::XReportComponent > &_xReportComponent, const uno::Reference< lang::XMultiServiceFactory > &_xFactory, const OUString &_sServiceName)
::cppu::PropertySetMixin< css::report::XImageControl > ImageControlPropertySet
static uno::Sequence< OUString > lcl_getImageOptionals()
::cppu::WeakComponentImplHelper< css::report::XImageControl,css::lang::XServiceInfo > ImageControlBase
uno::Sequence< beans::Property > m_aProps
constexpr OUStringLiteral PROPERTY_CHARUNDERLINECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARCOMBINEISON
constexpr OUStringLiteral PROPERTY_CHARCOMBINESUFFIX
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUNDTRANSPARENT
constexpr OUStringLiteral PROPERTY_CHARUNDERLINE
constexpr OUStringLiteral PROPERTY_CHARESCAPEMENT
constexpr OUStringLiteral PROPERTY_CHARCONTOURED
constexpr OUStringLiteral PROPERTY_CHARHEIGHTCOMPLEX
constexpr OUStringLiteral PROPERTY_FONTDESCRIPTOR
constexpr OUStringLiteral PROPERTY_CHARROTATIONCOMPLEX
constexpr OUStringLiteral PROPERTY_CHARROTATIONASIAN
constexpr OUStringLiteral PROPERTY_DATAFIELD
constexpr OUStringLiteral PROPERTY_CHARCOLOR
constexpr OUStringLiteral PROPERTY_UNVISITEDCHARSTYLENAME
constexpr OUStringLiteral PROPERTY_CHARFONTNAMECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARWORDMODECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARFONTPITCH
constexpr OUStringLiteral PROPERTY_CHARSHADOWED
constexpr OUStringLiteral PROPERTY_CHARFONTFAMILYCOMPLEX
constexpr OUStringLiteral PROPERTY_HYPERLINKTARGET
constexpr OUStringLiteral PROPERTY_CHARWEIGHT
constexpr OUStringLiteral PROPERTY_VISITEDCHARSTYLENAME
constexpr OUStringLiteral PROPERTY_CHARFLASH
constexpr OUStringLiteral PROPERTY_CHARROTATION
constexpr OUStringLiteral PROPERTY_FONTDESCRIPTORASIAN
constexpr OUStringLiteral SERVICE_IMAGECONTROL
constexpr OUStringLiteral PROPERTY_CHARFONTNAMEASIAN
constexpr OUStringLiteral PROPERTY_CHARFONTFAMILY
constexpr OUStringLiteral PROPERTY_CHARAUTOKERNING
constexpr OUStringLiteral PROPERTY_CHAREMPHASIS
constexpr OUStringLiteral PROPERTY_CHARWEIGHTCOMPLEX
constexpr OUStringLiteral PROPERTY_CHARHEIGHT
constexpr OUStringLiteral PROPERTY_CHARSCALEWIDTHCOMPLEX
constexpr OUStringLiteral PROPERTY_CHARFONTPITCHCOMPLEX
constexpr OUStringLiteral PROPERTY_CHARFONTCHARSET
constexpr OUStringLiteral PROPERTY_CHARSCALEWIDTHASIAN
constexpr OUStringLiteral PROPERTY_CHARUNDERLINEASIAN
constexpr OUStringLiteral PROPERTY_HYPERLINKURL
constexpr OUStringLiteral PROPERTY_CHARWORDMODE
constexpr OUStringLiteral PROPERTY_CHARHEIGHTASIAN
constexpr OUStringLiteral PROPERTY_CHARPOSTURE
constexpr OUStringLiteral PROPERTY_CHARUNDERLINECOLOR
constexpr OUStringLiteral PROPERTY_CHARFONTCHARSETCOMPLEX
constexpr OUStringLiteral PROPERTY_CHARPOSTUREASIAN
constexpr OUStringLiteral PROPERTY_CHARLOCALECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARSCALEWIDTH
constexpr OUStringLiteral PROPERTY_CHARHIDDEN
constexpr OUStringLiteral PROPERTY_DETAILFIELDS
constexpr OUStringLiteral PROPERTY_CHARFONTCHARSETASIAN
constexpr OUStringLiteral PROPERTY_CHARWEIGHTASIAN
constexpr OUStringLiteral PROPERTY_CHARFONTPITCHASIAN
constexpr OUStringLiteral PROPERTY_MASTERFIELDS
constexpr OUStringLiteral PROPERTY_CHARPOSTURECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARFONTSTYLENAMEASIAN
constexpr OUStringLiteral PROPERTY_CHARFONTFAMILYASIAN
constexpr OUStringLiteral PROPERTY_CHARFONTSTYLENAME
constexpr OUStringLiteral PROPERTY_CHARFONTSTYLENAMECOMPLEX
constexpr OUStringLiteral PROPERTY_IMAGEURL
constexpr OUStringLiteral PROPERTY_PARAADJUST
constexpr OUStringLiteral PROPERTY_CHAREMPHASISASIAN
constexpr OUStringLiteral PROPERTY_CHARCASEMAP
constexpr OUStringLiteral PROPERTY_CHARSTRIKEOUT
constexpr OUStringLiteral PROPERTY_CHARCOMBINEPREFIX
constexpr OUStringLiteral PROPERTY_CHARRELIEF
constexpr OUStringLiteral PROPERTY_PRINTWHENGROUPCHANGE
constexpr OUStringLiteral PROPERTY_CHARESCAPEMENTHEIGHT
constexpr OUStringLiteral PROPERTY_CHARKERNING
constexpr OUStringLiteral PROPERTY_CHARLOCALE
constexpr OUStringLiteral PROPERTY_SCALEMODE
constexpr OUStringLiteral PROPERTY_CONDITIONALPRINTEXPRESSION
constexpr OUStringLiteral PROPERTY_CHARWORDMODEASIAN
constexpr OUStringLiteral PROPERTY_HYPERLINKNAME
constexpr OUStringLiteral PROPERTY_FONTDESCRIPTORCOMPLEX
constexpr OUStringLiteral PROPERTY_PRESERVEIRI
constexpr OUStringLiteral PROPERTY_CHARFONTNAME
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUND
constexpr OUStringLiteral PROPERTY_CONTROLTEXTEMPHASISMARK
constexpr OUStringLiteral PROPERTY_CHARLOCALEASIAN
constexpr OUStringLiteral PROPERTY_CHAREMPHASISCOMPLEX
#define IMPLEMENT_FORWARD_REFCOUNT(classname, refcountbase)
Reference< XComponentContext > _xContext