summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-11-06 20:58:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-07 07:29:38 +0100
commit7a61256f9e68201ef7b331ca3e1b4c3302104631 (patch)
tree42c6908cdbe521be795224fb912ca4229ba4b706 /reportdesign/source
parentb3325ef8cdfc2c82eec34e747106f75a9fccb7e4 (diff)
return XShape from SdrObject::getUnoShape
instead of XInterface, to make it obvious what the reality of the requirement is Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 75ba20f61479..284fc4c9c5ae 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -436,9 +436,9 @@ void OObjectBase::ensureSdrObjectOwnership( const uno::Reference< uno::XInterfac
}
-uno::Reference< uno::XInterface > OObjectBase::getUnoShapeOf( SdrObject& _rSdrObject )
+uno::Reference< drawing::XShape > OObjectBase::getUnoShapeOf( SdrObject& _rSdrObject )
{
- uno::Reference< uno::XInterface > xShape( _rSdrObject.getWeakUnoShape() );
+ uno::Reference< drawing::XShape > xShape( _rSdrObject.getWeakUnoShape() );
if ( xShape.is() )
return xShape;
@@ -458,7 +458,7 @@ OCustomShape::OCustomShape(
: SdrObjCustomShape(rSdrModel)
,OObjectBase(_xComponent)
{
- impl_setUnoShape( uno::Reference< uno::XInterface >(_xComponent,uno::UNO_QUERY) );
+ impl_setUnoShape( uno::Reference< drawing::XShape >(_xComponent,uno::UNO_QUERY_THROW) );
m_bIsListening = true;
}
@@ -551,9 +551,9 @@ uno::Reference< beans::XPropertySet> OCustomShape::getAwtComponent()
}
-uno::Reference< uno::XInterface > OCustomShape::getUnoShape()
+uno::Reference< drawing::XShape > OCustomShape::getUnoShape()
{
- uno::Reference< uno::XInterface> xShape = OObjectBase::getUnoShapeOf( *this );
+ uno::Reference<drawing::XShape> xShape = OObjectBase::getUnoShapeOf( *this );
if ( !m_xReportComponent.is() )
{
OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
@@ -563,7 +563,7 @@ uno::Reference< uno::XInterface > OCustomShape::getUnoShape()
return xShape;
}
-void OCustomShape::impl_setUnoShape( const uno::Reference< uno::XInterface >& rxUnoShape )
+void OCustomShape::impl_setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
{
SdrObjCustomShape::impl_setUnoShape( rxUnoShape );
releaseUnoShape();
@@ -612,7 +612,7 @@ OUnoObject::OUnoObject(
// tdf#119067
,m_bSetDefaultLabel(false)
{
- impl_setUnoShape( uno::Reference< uno::XInterface >( _xComponent, uno::UNO_QUERY ) );
+ impl_setUnoShape( uno::Reference< drawing::XShape >( _xComponent, uno::UNO_QUERY_THROW ) );
if ( !rModelName.isEmpty() )
impl_initializeModel_nothrow();
@@ -889,12 +889,12 @@ uno::Reference< beans::XPropertySet> OUnoObject::getAwtComponent()
}
-uno::Reference< uno::XInterface > OUnoObject::getUnoShape()
+uno::Reference< drawing::XShape > OUnoObject::getUnoShape()
{
return OObjectBase::getUnoShapeOf( *this );
}
-void OUnoObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& rxUnoShape )
+void OUnoObject::impl_setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
{
SdrUnoObj::impl_setUnoShape( rxUnoShape );
releaseUnoShape();
@@ -915,7 +915,7 @@ OOle2Obj::OOle2Obj(
,m_nType(_nType)
,m_bOnlyOnce(true)
{
- impl_setUnoShape( uno::Reference< uno::XInterface >( _xComponent, uno::UNO_QUERY ) );
+ impl_setUnoShape( uno::Reference< drawing::XShape >( _xComponent, uno::UNO_QUERY_THROW ) );
m_bIsListening = true;
}
@@ -1078,9 +1078,9 @@ uno::Reference< beans::XPropertySet> OOle2Obj::getAwtComponent()
}
-uno::Reference< uno::XInterface > OOle2Obj::getUnoShape()
+uno::Reference< drawing::XShape > OOle2Obj::getUnoShape()
{
- uno::Reference< uno::XInterface> xShape = OObjectBase::getUnoShapeOf( *this );
+ uno::Reference< drawing::XShape> xShape = OObjectBase::getUnoShapeOf( *this );
if ( !m_xReportComponent.is() )
{
OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
@@ -1090,7 +1090,7 @@ uno::Reference< uno::XInterface > OOle2Obj::getUnoShape()
return xShape;
}
-void OOle2Obj::impl_setUnoShape( const uno::Reference< uno::XInterface >& rxUnoShape )
+void OOle2Obj::impl_setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
{
SdrOle2Obj::impl_setUnoShape( rxUnoShape );
releaseUnoShape();