summaryrefslogtreecommitdiff
path: root/reportdesign/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 20:09:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 13:10:10 +0200
commit140b070bb187e3d5e35a588a1d187e3a40e11547 (patch)
tree2ccb2413f49ac733f49256bd335700732c6c4f6b /reportdesign/source/core
parente1983485a83bb81d3675c429a2525f7969cc6169 (diff)
loplugin:referencecasting in reportdesign
Change-Id: I911bfc95f479d130052a51143dd3073287853a8f Reviewed-on: https://gerrit.libreoffice.org/75975 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source/core')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx4
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 600dd78628b1..f4994d40397d 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1840,7 +1840,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL OReportDefinition::getViewDat
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
if ( !m_pImpl->m_xViewData.is() )
{
- m_pImpl->m_xViewData.set( document::IndexedPropertyValues::create(m_aProps->m_xContext), uno::UNO_QUERY);
+ m_pImpl->m_xViewData = document::IndexedPropertyValues::create(m_aProps->m_xContext);
uno::Reference< container::XIndexContainer > xContainer(m_pImpl->m_xViewData,uno::UNO_QUERY);
for (const auto& rxController : m_pImpl->m_aControllers)
{
@@ -1907,7 +1907,7 @@ uno::Sequence< OUString > SAL_CALL OReportDefinition::getDocumentSubStoragesName
{
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
- uno::Reference<container::XNameAccess> xNameAccess(m_pImpl->m_xStorage,uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xNameAccess = m_pImpl->m_xStorage;
return xNameAccess.is() ? xNameAccess->getElementNames() : uno::Sequence< OUString >();
}
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 3c712d8f1878..294572903558 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -275,7 +275,7 @@ uno::Reference< frame::XModel > OReportEngineJFree::createDocumentAlive( const u
if ( !xFrameLoad.is() )
{
// if there is no frame given, find the right
- xFrameLoad.set( frame::Desktop::create(m_xContext), uno::UNO_QUERY);
+ xFrameLoad = frame::Desktop::create(m_xContext);
sal_Int32 const nFrameSearchFlag = frame::FrameSearchFlag::TASKS | frame::FrameSearchFlag::CREATE;
uno::Reference< frame::XFrame> xFrame = uno::Reference< frame::XFrame>(xFrameLoad,uno::UNO_QUERY_THROW)->findFrame("_blank",nFrameSearchFlag);
xFrameLoad.set( xFrame,uno::UNO_QUERY);
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 15910df12a12..00027a557a7b 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -90,7 +90,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj
else
bChangeOrientation = rUnoObj.GetObjIdentifier() == OBJ_DLG_HFIXEDLINE;
SvxShapeControl* pShape = new SvxShapeControl( pObj );
- xShape.set(static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper *>(pShape)),uno::UNO_QUERY);
+ xShape = static_cast<SvxShape_UnoImplHelper *>(pShape);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
else if (dynamic_cast< const OCustomShape* >(pObj) != nullptr)
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index bbfc0e47d41e..7a77b212e25e 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -568,7 +568,7 @@ bool OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
uno::Reference< beans::XPropertySet> OCustomShape::getAwtComponent()
{
- return uno::Reference< beans::XPropertySet>(m_xReportComponent,uno::UNO_QUERY);
+ return m_xReportComponent;
}
@@ -1072,7 +1072,7 @@ bool OOle2Obj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
uno::Reference< beans::XPropertySet> OOle2Obj::getAwtComponent()
{
- return uno::Reference< beans::XPropertySet>(m_xReportComponent,uno::UNO_QUERY);
+ return m_xReportComponent;
}