reportdesign/source/core/api/ReportDefinition.cxx     |    4 ++--
 reportdesign/source/core/api/ReportEngineJFree.cxx    |    2 +-
 reportdesign/source/core/sdr/ReportDrawPage.cxx       |    2 +-
 reportdesign/source/core/sdr/RptObject.cxx            |    4 ++--
 reportdesign/source/filter/xml/xmlfilter.cxx          |    4 ++--
 reportdesign/source/ui/inspection/GeometryHandler.cxx |    2 +-
 reportdesign/source/ui/report/ViewsWindow.cxx         |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 140b070bb187e3d5e35a588a1d187e3a40e11547
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jul 19 20:09:26 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Jul 20 13:10:10 2019 +0200

    loplugin:referencecasting in reportdesign
    
    Change-Id: I911bfc95f479d130052a51143dd3073287853a8f
    Reviewed-on: https://gerrit.libreoffice.org/75975
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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;
 }
 
 
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 5e97042ec818..0f5f539d0da5 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -425,7 +425,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
 
     if ( !sFileName.isEmpty() )
     {
-        uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
+        uno::Reference<XComponent> xCom = GetModel();
 
         tools::SvRef<SfxMedium> pMedium = new SfxMedium(
                 sFileName, ( StreamMode::READ | StreamMode::NOCREATE ) );
@@ -489,7 +489,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
         const OUString sHierarchicalDocumentName( 
aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",OUString()) );
         xProp->setPropertyValue("StreamRelPath", 
uno::makeAny(sHierarchicalDocumentName));
 
-        uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY);
+        uno::Reference<XComponent> xModel = GetModel();
         static const char s_sMeta[] = "meta.xml";
         static const char s_sStreamName[] = "StreamName";
         xProp->setPropertyValue(s_sStreamName, 
uno::makeAny(OUString(s_sMeta)));
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 746c9de1a3f8..6dc21255c9ef 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1768,7 +1768,7 @@ uno::Reference< report::XFunctionsSupplier> 
GeometryHandler::fillScope_throw(OUS
     const uno::Reference< report::XReportDefinition> xReportDefinition = 
xSection->getReportDefinition();
     if ( m_sScope.isEmpty() )
     {
-        const uno::Reference< report::XGroup> 
xGroup(xSection->getGroup(),uno::UNO_QUERY);
+        const uno::Reference< report::XGroup> xGroup = xSection->getGroup();
         if ( xGroup.is() )
         {
             OUString sGroupName = RptResId(RID_STR_SCOPE_GROUP);
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index b2083a95a8b1..47afcfe630fe 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1263,7 +1263,7 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, 
const OSectionView* _pSe
                         if ( (pColIter+1) != pColEnd )
                         {
                             // bring aNewPos to the position of the next object
-                            uno::Reference< report::XReportComponent> 
xRCNext(*(pColIter + 1),uno::UNO_QUERY);
+                            uno::Reference< report::XReportComponent> xRCNext 
= *(pColIter + 1);
                             Point aNextPosition = 
VCLPoint(xRCNext->getPosition());
                             aNewPos += aNextPosition - aPrevious;
                         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to