include/com/sun/star/uno/Reference.hxx                      |    2 
 reportdesign/source/core/api/FixedLine.cxx                  |    2 
 reportdesign/source/core/api/FixedText.cxx                  |    2 
 reportdesign/source/core/api/FormattedField.cxx             |    4 -
 reportdesign/source/core/api/ImageControl.cxx               |    2 
 reportdesign/source/core/api/ReportDefinition.cxx           |   10 ++--
 reportdesign/source/core/api/Shape.cxx                      |    2 
 reportdesign/source/core/api/Tools.cxx                      |    4 -
 reportdesign/source/core/sdr/RptObject.cxx                  |   12 ++---
 reportdesign/source/core/sdr/UndoActions.cxx                |    4 -
 reportdesign/source/core/sdr/UndoEnv.cxx                    |    8 +--
 reportdesign/source/filter/xml/xmlCell.cxx                  |   22 +++++-----
 reportdesign/source/filter/xml/xmlExport.cxx                |   26 ++++++------
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |    2 
 reportdesign/source/filter/xml/xmlFormatCondition.cxx       |    2 
 reportdesign/source/filter/xml/xmlFormattedField.cxx        |    2 
 reportdesign/source/filter/xml/xmlGroup.cxx                 |    2 
 reportdesign/source/filter/xml/xmlImage.cxx                 |    2 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |    6 +-
 reportdesign/source/filter/xml/xmlReport.cxx                |    4 -
 reportdesign/source/filter/xml/xmlReportElement.cxx         |    4 -
 reportdesign/source/filter/xml/xmlReportElementBase.cxx     |    4 -
 reportdesign/source/filter/xml/xmlSubDocument.cxx           |    6 +-
 reportdesign/source/filter/xml/xmlTable.cxx                 |    4 -
 reportdesign/source/filter/xml/xmlfilter.cxx                |    2 
 reportdesign/source/ui/dlg/AddField.cxx                     |    2 
 reportdesign/source/ui/dlg/CondFormat.cxx                   |    8 +--
 reportdesign/source/ui/dlg/Condition.cxx                    |    2 
 reportdesign/source/ui/dlg/Formula.cxx                      |    2 
 reportdesign/source/ui/dlg/GroupsSorting.cxx                |    8 +--
 reportdesign/source/ui/dlg/Navigator.cxx                    |    6 +-
 reportdesign/source/ui/inspection/DataProviderHandler.cxx   |    2 
 reportdesign/source/ui/inspection/GeometryHandler.cxx       |    4 -
 reportdesign/source/ui/misc/RptUndo.cxx                     |    2 
 reportdesign/source/ui/misc/UITools.cxx                     |    2 
 reportdesign/source/ui/report/FixedTextColor.cxx            |    2 
 reportdesign/source/ui/report/FormattedFieldBeautifier.cxx  |    2 
 reportdesign/source/ui/report/ReportController.cxx          |   10 ++--
 reportdesign/source/ui/report/ReportControllerObserver.cxx  |    4 -
 reportdesign/source/ui/report/ReportSection.cxx             |    4 -
 reportdesign/source/ui/report/SectionWindow.cxx             |    6 +-
 reportdesign/source/ui/report/propbrw.cxx                   |    2 
 42 files changed, 104 insertions(+), 104 deletions(-)

New commits:
commit be92ed5799e7f8dab0d8d1042135afe38b7f258f
Author:     Noel <noel.gran...@collabora.co.uk>
AuthorDate: Mon Feb 15 09:40:30 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 16 07:52:57 2021 +0100

    loplugin:referencecasting in reportdesign
    
    Also, I needed to add
        castToXInterface()
    to the upcasting Reference::Reference constructor,
    to resolve ambiguity in casting to XInterface.
    
    Change-Id: Ica60190bc842444c37de56407b586aa267f08372
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110890
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/com/sun/star/uno/Reference.hxx 
b/include/com/sun/star/uno/Reference.hxx
index ee0117bda0fb..7632c55045ca 100644
--- a/include/com/sun/star/uno/Reference.hxx
+++ b/include/com/sun/star/uno/Reference.hxx
@@ -144,7 +144,7 @@ inline Reference< interface_type >::Reference(
         && !std::is_same_v<interface_type, XInterface>, void *>)
 {
     interface_type * p = rRef.get();
-    _pInterface = p;
+    _pInterface = castToXInterface(p);
     if (_pInterface)
         _pInterface->acquire();
 }
diff --git a/reportdesign/source/core/api/FixedLine.cxx 
b/reportdesign/source/core/api/FixedLine.cxx
index 42082bfc3e95..6e83c1a25b21 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -330,7 +330,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
OFixedLine::createClone(  )
 {
     uno::Reference< report::XReportComponent> xSource = this;
     uno::Reference< report::XFixedLine> 
xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDLINE),uno::UNO_QUERY_THROW);
-    return xSet.get();
+    return xSet;
 }
 
 
diff --git a/reportdesign/source/core/api/FixedText.cxx 
b/reportdesign/source/core/api/FixedText.cxx
index 589d68946406..e77eb4b3aa49 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -184,7 +184,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
OFixedText::createClone(  )
 {
     uno::Reference< report::XReportComponent> xSource = this;
     uno::Reference< report::XFixedText> 
xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDTEXT),uno::UNO_QUERY_THROW);
-    return xSet.get();
+    return xSet;
 }
 
 
diff --git a/reportdesign/source/core/api/FormattedField.cxx 
b/reportdesign/source/core/api/FormattedField.cxx
index 81553f9d7672..d1418825f2d5 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -198,11 +198,11 @@ uno::Reference< util::XCloneable > SAL_CALL 
OFormattedField::createClone(  )
     for (const auto& rxFormatCondition : m_aProps.m_aFormatConditions)
     {
         uno::Reference< report::XFormatCondition > xCond = 
xSet->createFormatCondition();
-        ::comphelper::copyProperties(rxFormatCondition.get(), xCond.get());
+        ::comphelper::copyProperties(rxFormatCondition, xCond);
         xSet->insertByIndex(i,uno::makeAny(xCond));
         ++i;
     }
-    return xSet.get();
+    return xSet;
 }
 
 // XFormattedField
diff --git a/reportdesign/source/core/api/ImageControl.cxx 
b/reportdesign/source/core/api/ImageControl.cxx
index 3260af26e25f..857560194e90 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -314,7 +314,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
OImageControl::createClone(  )
 {
     uno::Reference< report::XReportComponent> xSource = this;
     uno::Reference< report::XImageControl> 
xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_IMAGECONTROL),uno::UNO_QUERY_THROW);
-    return xSet.get();
+    return xSet;
 }
 
 
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 378b8041cb04..c8d52066c048 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -999,7 +999,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
OReportDefinition::createClone(  )
     OSL_FAIL("Not yet implemented correctly");
     uno::Reference< report::XReportComponent> xSource = this;
     uno::Reference< report::XReportDefinition> 
xSet(cloneObject(xSource,m_aProps->m_xFactory,SERVICE_REPORTDEFINITION),uno::UNO_QUERY_THROW);
-    return xSet.get();
+    return xSet;
 }
 
 void OReportDefinition::setSection(  const OUString& _sProperty
@@ -2022,18 +2022,18 @@ uno::Reference< uno::XInterface > SAL_CALL 
OReportDefinition::createInstance( co
     {
         uno::Reference< style::XStyle> xStyle = new OStyle();
         xStyle->setName("Default");
-        return xStyle.get();
+        return xStyle;
     }
     else if ( aServiceSpecifier == "com.sun.star.document.Settings" )
     {
         uno::Reference<beans::XPropertySet> xProp = new OStyle();
 
-        return xProp.get();
+        return xProp;
     }
     else if ( aServiceSpecifier == "com.sun.star.drawing.Defaults" )
     {
         uno::Reference<beans::XPropertySet> xProp = new OStyle();
-        return xProp.get();
+        return xProp;
     }
     else if ( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
     {
@@ -2650,7 +2650,7 @@ sal_Bool SAL_CALL 
OReportDefinition::isDataFlavorSupported( const datatransfer::
 uno::Reference< document::XUndoManager > SAL_CALL 
OReportDefinition::getUndoManager(  )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
-    return m_pImpl->m_pUndoManager.get();
+    return m_pImpl->m_pUndoManager;
 }
 
 }// namespace reportdesign
diff --git a/reportdesign/source/core/api/Shape.cxx 
b/reportdesign/source/core/api/Shape.cxx
index 8acb43d89b15..5c7287b87d84 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -296,7 +296,7 @@ uno::Reference< util::XCloneable > SAL_CALL 
OShape::createClone(  )
     {
         DBG_UNHANDLED_EXCEPTION("reportdesign");
     }
-    return xSet.get();
+    return xSet;
 }
 
 // XChild
diff --git a/reportdesign/source/core/api/Tools.cxx 
b/reportdesign/source/core/api/Tools.cxx
index 070ece65f51b..5d21217cc450 100644
--- a/reportdesign/source/core/api/Tools.cxx
+++ b/reportdesign/source/core/api/Tools.cxx
@@ -56,8 +56,8 @@ uno::Reference< util::XCloneable > cloneObject(const 
uno::Reference< report::XRe
 {
     OSL_ENSURE(_xReportComponent.is() && _xFactory.is() ,"reportcomponent is 
null -> GPF");
     uno::Reference< report::XReportComponent> 
xClone(_xFactory->createInstance(_sServiceName),uno::UNO_QUERY_THROW);
-    ::comphelper::copyProperties(_xReportComponent.get(),xClone.get());
-    return xClone.get();
+    ::comphelper::copyProperties(_xReportComponent, xClone);
+    return xClone;
 }
 
 
diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index 21395b7c5da7..fa079f3f72c4 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -598,7 +598,7 @@ OUnoObject::OUnoObject(
     Reference<XPropertySet> 
xSource(const_cast<OUnoObject&>(rSource).getUnoShape(), uno::UNO_QUERY);
     Reference<XPropertySet> xDest(getUnoShape(), uno::UNO_QUERY);
     if ( xSource.is() && xDest.is() )
-        comphelper::copyProperties(xSource.get(), xDest.get());
+        comphelper::copyProperties(xSource, xDest);
 }
 
 OUnoObject::OUnoObject(
@@ -873,7 +873,7 @@ void OUnoObject::CreateMediator(bool _bReverse)
         if(xControlModel.is())
         {
             m_xMediator = new OPropertyMediator(
-                m_xReportComponent.get(),
+                m_xReportComponent,
                 xControlModel,
                 getPropertyNameMap(GetObjIdentifier()),
                 _bReverse);
@@ -943,14 +943,14 @@ OOle2Obj::OOle2Obj(SdrModel& rSdrModel, OOle2Obj const & 
rSource)
 
     OReportModel& rRptModel(static_cast< OReportModel& 
>(getSdrModelFromSdrObject()));
     svt::EmbeddedObjectRef::TryRunningState( GetObjRef() );
-    impl_createDataProvider_nothrow(rRptModel.getReportDefinition().get());
+    impl_createDataProvider_nothrow(rRptModel.getReportDefinition());
 
     uno::Reference< chart2::data::XDatabaseDataProvider > xSource( 
lcl_getDataProvider(rSource.GetObjRef()) );
     uno::Reference< chart2::data::XDatabaseDataProvider > xDest( 
lcl_getDataProvider(GetObjRef()) );
     if ( xSource.is() && xDest.is() )
-        comphelper::copyProperties(xSource.get(),xDest.get());
+        comphelper::copyProperties(xSource, xDest);
 
-    initializeChart(rRptModel.getReportDefinition().get());
+    initializeChart(rRptModel.getReportDefinition());
 }
 
 OOle2Obj::~OOle2Obj()
@@ -1133,7 +1133,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const 
uno::Reference< frame::XMod
         {
             uno::Reference< lang::XMultiServiceFactory> 
xFac(_xModel,uno::UNO_QUERY);
             uno::Reference< chart2::data::XDatabaseDataProvider > 
xDataProvider( 
xFac->createInstance("com.sun.star.chart2.data.DataProvider"),uno::UNO_QUERY);
-            xReceiver->attachDataProvider( xDataProvider.get() );
+            xReceiver->attachDataProvider( xDataProvider );
         }
     }
     catch(const uno::Exception &)
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx 
b/reportdesign/source/core/sdr/UndoActions.cxx
index 02585c420eaa..8616ee612d4d 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -383,7 +383,7 @@ 
OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction(
 
 Reference< XPropertySet> OUndoPropertyGroupSectionAction::getObject()
 {
-    return m_pMemberFunction(&m_aGroupHelper).get();
+    return m_pMemberFunction(&m_aGroupHelper);
 }
 
 OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction(
@@ -398,7 +398,7 @@ 
OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction(
 
 Reference< XPropertySet> OUndoPropertyReportSectionAction::getObject()
 {
-    return m_pMemberFunction(&m_aReportHelper).get();
+    return m_pMemberFunction(&m_aReportHelper);
 }
 
 } // rptui
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx 
b/reportdesign/source/core/sdr/UndoEnv.cxx
index c76d36556fd4..4f7168e4f2e7 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -368,7 +368,7 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const 
ContainerEvent& evt)
         {
             Reference< report::XSection > 
xContainer(evt.Source,uno::UNO_QUERY);
 
-            ::std::vector< uno::Reference< container::XChild> 
>::const_iterator aFind = getSection(xContainer.get());
+            ::std::vector< uno::Reference< container::XChild> 
>::const_iterator aFind = getSection(xContainer);
 
             if ( aFind != m_pImpl->m_aSections.end() )
             {
@@ -436,7 +436,7 @@ void SAL_CALL OXUndoEnvironment::elementRemoved(const 
ContainerEvent& evt)
     if ( !IsLocked() )
     {
         Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
-        ::std::vector< uno::Reference< container::XChild> >::const_iterator 
aFind = getSection(xContainer.get());
+        ::std::vector< uno::Reference< container::XChild> >::const_iterator 
aFind = getSection(xContainer);
 
         Reference< report::XReportComponent >  xReportComponent( xIface, 
UNO_QUERY );
         if ( aFind != m_pImpl->m_aSections.end() && xReportComponent.is() )
@@ -483,7 +483,7 @@ void OXUndoEnvironment::AddSection(const Reference< 
report::XSection > & _xSecti
     OUndoEnvLock aLock(*this);
     try
     {
-        uno::Reference<container::XChild> xChild = _xSection.get();
+        uno::Reference<container::XChild> xChild = _xSection;
         m_pImpl->m_aSections.push_back(xChild);
         Reference< XInterface >  xInt(_xSection);
         AddElement(xInt);
@@ -500,7 +500,7 @@ void OXUndoEnvironment::RemoveSection(const Reference< 
report::XSection > & _xSe
     OUndoEnvLock aLock(*this);
     try
     {
-        uno::Reference<container::XChild> xChild(_xSection.get());
+        uno::Reference<container::XChild> xChild(_xSection);
         
m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
             xChild), m_pImpl->m_aSections.end());
         Reference< XInterface >  xInt(_xSection);
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx 
b/reportdesign/source/filter/xml/xmlCell.cxx
index adfac9d59cc6..431b02ea6da0 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -114,9 +114,9 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLCell::createFastCh
                 Reference< report::XFormattedField > 
xControl(xInt,uno::UNO_QUERY);
 
                 OSL_ENSURE(xControl.is(),"Could not create FormattedField!");
-                setComponent(xControl.get());
+                setComponent(xControl);
                 if ( xControl.is() )
-                    xContext = new OXMLFormattedField( 
rImport,xAttrList,xControl.get(),m_pContainer, false);
+                    xContext = new OXMLFormattedField( 
rImport,xAttrList,xControl,m_pContainer, false);
             }
             break;
         case XML_ELEMENT(REPORT, XML_IMAGE):
@@ -125,9 +125,9 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLCell::createFastCh
                 Reference< XImageControl > 
xControl(xFactor->createInstance(SERVICE_IMAGECONTROL),uno::UNO_QUERY);
 
                 OSL_ENSURE(xControl.is(),"Could not create ImageControl!");
-                setComponent(xControl.get());
+                setComponent(xControl);
                 if ( xControl.is() )
-                    xContext = new OXMLImage( 
rImport,xAttrList,xControl.get(),m_pContainer);
+                    xContext = new OXMLImage( 
rImport,xAttrList,xControl,m_pContainer);
             }
             break;
         case XML_ELEMENT(REPORT, XML_SUB_DOCUMENT):
@@ -137,7 +137,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLCell::createFastCh
                     m_nCurrentCount = m_pContainer->getSection()->getCount();
                 uno::Reference< uno::XInterface> xInt = 
xFactor->createInstance(SERVICE_FORMATTEDFIELD);
                 Reference< report::XFormattedField > 
xControl(xInt,uno::UNO_QUERY);
-                xContext = new OXMLSubDocument( 
rImport,xControl.get(),m_pContainer, this /* give the current cell as parent*/ 
);
+                xContext = new OXMLSubDocument( rImport,xControl,m_pContainer, 
this /* give the current cell as parent*/ );
             }
             break;
 
@@ -150,7 +150,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLCell::createFastCh
             {
                 if ( !m_bContainsShape )
                     m_nCurrentCount = m_pContainer->getSection()->getCount();
-                uno::Reference< drawing::XShapes > xShapes = 
m_pContainer->getSection().get();
+                uno::Reference< drawing::XShapes > xShapes = 
m_pContainer->getSection();
                 xContext = 
XMLShapeImportHelper::CreateGroupChildContext(rImport,nElement,xAttrList,xShapes);
                 m_bContainsShape = true;
             }
@@ -175,7 +175,7 @@ void OXMLCell::endFastElement(sal_Int32)
         {
             uno::Reference<report::XShape> 
xShape(m_pContainer->getSection()->getByIndex(i),uno::UNO_QUERY);
             if ( xShape.is() )
-                m_pContainer->addCell(xShape.get());
+                m_pContainer->addCell(xShape);
         }
     }
     if ( m_pCell != this && !m_sText.isEmpty() )
@@ -187,9 +187,9 @@ void OXMLCell::endFastElement(sal_Int32)
         xControl->setDataField("rpt:" + m_sText);
 
         OSL_ENSURE(xControl.is(),"Could not create FormattedField!");
-        setComponent(xControl.get());
+        setComponent(xControl);
         m_xComponent = xControl.get();
-        m_pContainer->getSection()->add(m_xComponent.get());
+        m_pContainer->getSection()->add(m_xComponent);
         m_pContainer->addCell(m_xComponent);
     }
     // check if we have a FixedLine
@@ -199,7 +199,7 @@ void OXMLCell::endFastElement(sal_Int32)
         Reference<XMultiServiceFactory> 
xFactor(rImport.GetModel(),uno::UNO_QUERY);
         Reference<XFixedLine> 
xFixedLine(xFactor->createInstance(SERVICE_FIXEDLINE),uno::UNO_QUERY);
         m_xComponent = xFixedLine.get();
-        m_pContainer->getSection()->add(m_xComponent.get());
+        m_pContainer->getSection()->add(m_xComponent);
         m_pContainer->addCell(m_xComponent);
         XMLPropStyleContext* pAutoStyle = 
const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* 
>(GetImport().GetAutoStyles()->FindStyleChildContext(XmlStyleFamily::TABLE_CELL,m_sStyleName)));
         if ( pAutoStyle )
@@ -222,7 +222,7 @@ void OXMLCell::endFastElement(sal_Int32)
         }
     }
     else
-        
OXMLHelper::copyStyleElements(GetOwnImport().isOldFormat(),m_sStyleName,GetImport().GetAutoStyles(),m_xComponent.get());
+        
OXMLHelper::copyStyleElements(GetOwnImport().isOldFormat(),m_sStyleName,GetImport().GetAutoStyles(),m_xComponent);
 }
 
 ORptFilter& OXMLCell::GetOwnImport()
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index a830c173b74d..790afe812df1 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -333,7 +333,7 @@ void ORptExport::exportReport(const 
Reference<XReportDefinition>& _xReportDefini
     if ( !_xReportDefinition.is() )
         return;
 
-    exportFunctions(_xReportDefinition->getFunctions().get());
+    exportFunctions(_xReportDefinition->getFunctions());
     exportGroupsExpressionAsFunction(_xReportDefinition->getGroups());
 
     if ( _xReportDefinition->getReportHeaderOn() )
@@ -432,7 +432,7 @@ void ORptExport::exportReportElement(const 
Reference<XReportControlModel>& _xRep
     // only export when parent exists
     uno::Reference< report::XSection> 
xParent(_xReportElement->getParent(),uno::UNO_QUERY);
     if ( xParent.is() )
-        exportComponent(_xReportElement.get());
+        exportComponent(_xReportElement);
 }
 
 static void lcl_calculate(const ::std::vector<sal_Int32>& _aPosX,const 
::std::vector<sal_Int32>& _aPosY,ORptExport::TGrid& _rColumns)
@@ -657,9 +657,9 @@ void ORptExport::exportReportComponentAutoStyles(const 
Reference<XSection>& _xPr
         if ( xShape.is() )
         {
             rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport();
-            xShapeExport->seekShapes(_xProp.get());
+            xShapeExport->seekShapes(_xProp);
             SolarMutexGuard aGuard;
-            xShapeExport->collectShapeAutoStyles(xShape.get());
+            xShapeExport->collectShapeAutoStyles(xShape);
         }
         else
         {
@@ -727,7 +727,7 @@ void ORptExport::exportSection(const Reference<XSection>& 
_xSection,bool bHeader
 void ORptExport::exportTableColumns(const Reference< XSection>& _xSection)
 {
     SvXMLElementExport aColumns(*this,XML_NAMESPACE_TABLE, XML_TABLE_COLUMNS, 
true, true);
-    TGridStyleMap::const_iterator aColFind = 
m_aColumnStyleNames.find(_xSection.get());
+    TGridStyleMap::const_iterator aColFind = 
m_aColumnStyleNames.find(_xSection);
     OSL_ENSURE(aColFind != 
m_aColumnStyleNames.end(),"ORptExport::exportTableColumns: Section not found in 
m_aColumnStyleNames!");
     if ( aColFind == m_aColumnStyleNames.end() )
         return;
@@ -745,14 +745,14 @@ void ORptExport::exportContainer(const Reference< 
XSection>& _xSection)
 
     exportTableColumns(_xSection);
 
-    TSectionsGrid::const_iterator aFind = 
m_aSectionsGrid.find(_xSection.get());
+    TSectionsGrid::const_iterator aFind = m_aSectionsGrid.find(_xSection);
     OSL_ENSURE(aFind != m_aSectionsGrid.end(),"ORptExport::exportContainer: 
Section not found in grid!");
     if ( aFind == m_aSectionsGrid.end() )
         return;
     TGrid::const_iterator aRowIter = aFind->second.begin();
     TGrid::const_iterator aRowEnd = aFind->second.end();
 
-    TGridStyleMap::const_iterator aRowFind = 
m_aRowStyleNames.find(_xSection.get());
+    TGridStyleMap::const_iterator aRowFind = m_aRowStyleNames.find(_xSection);
     auto aHeightIter = aRowFind->second.cbegin();
     OSL_ENSURE(aRowFind->second.size() == aFind->second.size(),"Different 
count for rows");
 
@@ -1061,7 +1061,7 @@ void ORptExport::exportGroup(const 
Reference<XReportDefinition>& _xReportDefinit
                 AddAttribute(XML_NAMESPACE_REPORT, 
XML_KEEP_TOGETHER,sValue.makeStringAndClear());
 
             SvXMLElementExport aGroup(*this,XML_NAMESPACE_REPORT, XML_GROUP, 
true, true);
-            exportFunctions(xGroup->getFunctions().get());
+            exportFunctions(xGroup->getFunctions());
             if ( xGroup->getHeaderOn() )
             {
                 Reference<XSection> xSection = xGroup->getHeader();
@@ -1219,7 +1219,7 @@ void ORptExport::exportAutoStyle(XPropertySet* 
_xProp,const Reference<XFormatted
 
 void ORptExport::exportAutoStyle(const Reference<XSection>& _xProp)
 {
-    ::std::vector< XMLPropertyState > aPropertyStates( 
m_xTableStylesExportPropertySetMapper->Filter(_xProp.get()) );
+    ::std::vector< XMLPropertyState > aPropertyStates( 
m_xTableStylesExportPropertySetMapper->Filter(_xProp) );
     if ( !aPropertyStates.empty() )
         m_aAutoStyleNames.emplace( _xProp.get(),GetAutoStylePool()->Add( 
XmlStyleFamily::TABLE_TABLE, aPropertyStates ));
 }
@@ -1409,7 +1409,7 @@ XMLShapeExport* ORptExport::CreateShapeExport()
 void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool 
_bAddParagraph)
 {
     rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport();
-    xShapeExport->seekShapes(_xSection.get());
+    xShapeExport->seekShapes(_xSection);
     const sal_Int32 nCount = _xSection->getCount();
     ::std::unique_ptr<SvXMLElementExport> pParagraphContent;
     if ( _bAddParagraph )
@@ -1427,12 +1427,12 @@ void ORptExport::exportShapes(const Reference< 
XSection>& _xSection,bool _bAddPa
             if ( xModel.is() ) // special handling for chart object
             {
                 pSubDocument.reset(new 
SvXMLElementExport(*this,XML_NAMESPACE_REPORT, XML_SUB_DOCUMENT, false, false));
-                exportMasterDetailFields(xShape.get());
-                exportReportElement(xShape.get());
+                exportMasterDetailFields(xShape);
+                exportReportElement(xShape);
             }
 
             AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_TYPE, XML_PARAGRAPH );
-            xShapeExport->exportShape(xShape.get(), 
SEF_DEFAULT|XMLShapeExportFlags::NO_WS,&aRefPoint);
+            xShapeExport->exportShape(xShape, 
SEF_DEFAULT|XMLShapeExportFlags::NO_WS,&aRefPoint);
         }
     }
 }
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index b461787b08ae..7bd9e8d1bbe3 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -286,7 +286,7 @@ void SAL_CALL ExportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
         throw uno::Exception("no active connection", nullptr);
 
     uno::Reference< reflection::XProxyFactory > xProxyFactory = 
reflection::ProxyFactory::create( m_xContext );
-    m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get());
+    m_xProxy = xProxyFactory->createProxy(m_xDelegatee);
     ::comphelper::query_aggregation(m_xProxy,m_xDelegatee);
     m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY);
     m_xServiceInfo.set(m_xDelegatee,uno::UNO_QUERY);
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx 
b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 63aae9301105..2e90c98e2dc2 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -76,7 +76,7 @@ OXMLFormatCondition::~OXMLFormatCondition()
 
 void OXMLFormatCondition::endFastElement(sal_Int32 )
 {
-    
OXMLHelper::copyStyleElements(m_rImport.isOldFormat(),m_sStyleName,GetImport().GetAutoStyles(),m_xComponent.get());
+    
OXMLHelper::copyStyleElements(m_rImport.isOldFormat(),m_sStyleName,GetImport().GetAutoStyles(),m_xComponent);
 }
 
 } // namespace rptxml
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx 
b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index b453dbc4da79..ad84810e8cdb 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -35,7 +35,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport
                 ,const uno::Reference< XFormattedField > & _xComponent
                 ,OXMLTable* _pContainer
                 ,bool _bPageCount) :
-    OXMLReportElementBase( rImport,_xComponent.get(),_pContainer)
+    OXMLReportElementBase( rImport,_xComponent,_pContainer)
 {
     OSL_ENSURE(m_xReportComponent.is(),"Component is NULL!");
 
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx 
b/reportdesign/source/filter/xml/xmlGroup.cxx
index e4b6c4d23bd1..1c8681494217 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -186,7 +186,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLGroup::createFastC
         case XML_ELEMENT(REPORT, XML_FUNCTION):
             {
                 rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-                xContext = new OXMLFunction( rImport,xAttrList,m_xGroup.get());
+                xContext = new OXMLFunction( rImport,xAttrList,m_xGroup);
             }
             break;
         case XML_ELEMENT(REPORT, XML_GROUP_HEADER):
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx 
b/reportdesign/source/filter/xml/xmlImage.cxx
index c9e1aeea5e8f..c4310d3a8a52 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -40,7 +40,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
                 const Reference< XFastAttributeList > & _xAttrList
                 ,const Reference< XImageControl > & _xComponent
                 ,OXMLTable* _pContainer) :
-    OXMLReportElementBase( rImport,_xComponent.get(),_pContainer)
+    OXMLReportElementBase( rImport,_xComponent,_pContainer)
 {
 
     OSL_ENSURE(m_xReportComponent.is(),"Component is NULL!");
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index d9e761c2466c..89e43259f929 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -139,7 +139,7 @@ void SAL_CALL ImportDocumentHandler::endDocument()
         aArgs.put( "ColumnDescriptions", uno::makeAny( aColumnNames ) );
     }
 
-    xReceiver->attachDataProvider( m_xDatabaseDataProvider.get() );
+    xReceiver->attachDataProvider( m_xDatabaseDataProvider );
     xReceiver->setArguments( aArgs.getPropertyValues() );
 }
 
@@ -346,13 +346,13 @@ void SAL_CALL ImportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
         m_xDatabaseDataProvider->setRowLimit(10);
 
         uno::Reference< chart2::data::XDataReceiver > 
xReceiver(m_xModel,uno::UNO_QUERY_THROW);
-        xReceiver->attachDataProvider(m_xDatabaseDataProvider.get());
+        xReceiver->attachDataProvider(m_xDatabaseDataProvider);
     }
 
     m_aArguments = m_xDatabaseDataProvider->detectArguments(nullptr);
 
     uno::Reference< reflection::XProxyFactory > xProxyFactory = 
reflection::ProxyFactory::create( m_xContext );
-    m_xProxy = xProxyFactory->createProxy(m_xDelegatee.get());
+    m_xProxy = xProxyFactory->createProxy(m_xDelegatee);
     ::comphelper::query_aggregation(m_xProxy,m_xDelegatee);
     m_xTypeProvider.set(m_xDelegatee,uno::UNO_QUERY);
     m_xServiceInfo.set(m_xDelegatee,uno::UNO_QUERY);
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx 
b/reportdesign/source/filter/xml/xmlReport.cxx
index 86347b1ef2b9..148b56b02e87 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -42,7 +42,7 @@ namespace rptxml
 OXMLReport::OXMLReport( ORptFilter& rImport,
                 const Reference< css::xml::sax::XFastAttributeList > & 
_xAttrList
                 ,const uno::Reference< report::XReportDefinition >& 
_xComponent) :
-    OXMLReportElementBase( rImport, _xComponent.get(),nullptr)
+    OXMLReportElementBase( rImport, _xComponent,nullptr)
     ,m_xReportDefinition(_xComponent)
 {
     OSL_ENSURE(m_xReportDefinition.is(),"No Report definition!");
@@ -131,7 +131,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLReport::createFast
         case XML_ELEMENT(REPORT, XML_FUNCTION):
             {
                 m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP 
);
-                xContext = new OXMLFunction( 
m_rImport,xAttrList,m_xReportDefinition.get(),true);
+                xContext = new OXMLFunction( 
m_rImport,xAttrList,m_xReportDefinition,true);
             }
             break;
         case XML_ELEMENT(REPORT, XML_MASTER_DETAIL_FIELDS):
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx 
b/reportdesign/source/filter/xml/xmlReportElement.cxx
index e488fb50a41c..ea1871d7f655 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -85,11 +85,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLReportElement::cre
     {
         case XML_ELEMENT(REPORT, XML_REPORT_COMPONENT):
             rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-            xContext = new OXMLComponent( 
rImport,xAttrList,m_xComponent.get());
+            xContext = new OXMLComponent( rImport,xAttrList,m_xComponent);
             break;
         case XML_ELEMENT(REPORT, XML_CONDITIONAL_PRINT_EXPRESSION):
             rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-            xContext = new OXMLCondPrtExpr( 
rImport,xAttrList,m_xComponent.get());
+            xContext = new OXMLCondPrtExpr( rImport,xAttrList,m_xComponent);
             break;
         case XML_ELEMENT(REPORT, XML_FORMAT_CONDITION):
             {
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx 
b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index 590af5a2f687..ff5e17d0b6eb 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -69,7 +69,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLReportElementBase:
             break;
         case XML_ELEMENT(FORM, XML_PROPERTIES):
             m_rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
-            xContext = new OXMLControlProperty( 
m_rImport,xAttrList,m_xReportComponent.get());
+            xContext = new OXMLControlProperty( 
m_rImport,xAttrList,m_xReportComponent);
             break;
         default:
             break;
@@ -83,7 +83,7 @@ void OXMLReportElementBase::endFastElement(sal_Int32 )
     try
     {
         if ( m_pContainer && m_pContainer->getSection().is() && 
m_xReportComponent.is() )
-            m_pContainer->getSection()->add(m_xReportComponent.get());
+            m_pContainer->getSection()->add(m_xReportComponent);
     }
     catch(Exception&)
     {
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx 
b/reportdesign/source/filter/xml/xmlSubDocument.cxx
index f77f1392aad9..ab99212f9697 100644
--- a/reportdesign/source/filter/xml/xmlSubDocument.cxx
+++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx
@@ -41,7 +41,7 @@ OXMLSubDocument::OXMLSubDocument( ORptFilter& rImport
                 ,const Reference< XReportComponent > & _xComponent
                 ,OXMLTable* _pContainer
                 ,OXMLCell* _pCellParent) :
-    OXMLReportElementBase( rImport,_xComponent.get(),_pContainer)
+    OXMLReportElementBase( rImport,_xComponent,_pContainer)
 ,m_xFake(_xComponent)
 ,m_pCellParent(_pCellParent)
 ,m_nCurrentCount(0)
@@ -81,7 +81,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLSubDocument::creat
             {
                 if ( !m_bContainsShape )
                     m_nCurrentCount = m_pContainer->getSection()->getCount();
-                uno::Reference< drawing::XShapes > xShapes = 
m_pContainer->getSection().get();
+                uno::Reference< drawing::XShapes > xShapes = 
m_pContainer->getSection();
                 xContext = 
XMLShapeImportHelper::CreateGroupChildContext(GetImport(),nElement,xAttrList,xShapes);
                 m_bContainsShape = true;
                 if (m_pCellParent)
@@ -128,7 +128,7 @@ void OXMLSubDocument::endFastElement(sal_Int32 )
         {
             uno::Reference< report::XFormatCondition > 
xCond(xFakeModel->getByIndex(i),uno::UNO_QUERY);
             uno::Reference< report::XFormatCondition > xNewCond = 
xComponentModel->createFormatCondition();
-            ::comphelper::copyProperties(xCond.get(),xNewCond.get());
+            ::comphelper::copyProperties(xCond, xNewCond);
             
xComponentModel->insertByIndex(xComponentModel->getCount(),uno::makeAny(xNewCond));
         }
     }
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx 
b/reportdesign/source/filter/xml/xmlTable.cxx
index 719b169f310b..130b5d6b7394 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -135,7 +135,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
OXMLTable::createFastC
             xContext = new OXMLRowColumn( rImport,xAttrList,this);
             break;
         case XML_ELEMENT(REPORT, XML_CONDITIONAL_PRINT_EXPRESSION):
-            xContext = new OXMLCondPrtExpr( 
rImport,xAttrList,m_xSection.get());
+            xContext = new OXMLCondPrtExpr( rImport,xAttrList,m_xSection);
             break;
         default:
                 break;
@@ -163,7 +163,7 @@ void OXMLTable::endFastElement(sal_Int32 )
                     XMLPropStyleContext* pAutoStyle = 
const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext 
*>(pAutoStyles->FindStyleChildContext(XmlStyleFamily::TABLE_TABLE,m_sStyleName)));
                     if ( pAutoStyle )
                     {
-                        pAutoStyle->FillPropertySet(m_xSection.get());
+                        pAutoStyle->FillPropertySet(m_xSection);
                     }
                 }
             }
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx 
b/reportdesign/source/filter/xml/xmlfilter.cxx
index 8406723095be..c8b1d764a1ea 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -594,7 +594,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
RptXMLDocumentBodyCont
             XMLPropStyleContext* pAutoStyle = 
const_cast<XMLPropStyleContext*>(dynamic_cast<const XMLPropStyleContext 
*>(pAutoStyles->FindStyleChildContext(XmlStyleFamily::PAGE_MASTER, "pm1")));
             if (pAutoStyle)
             {
-                
pAutoStyle->FillPropertySet(rImport.getReportDefinition().get());
+                pAutoStyle->FillPropertySet(rImport.getReportDefinition());
             }
         }
         return new OXMLReport(rImport, xAttrList, 
rImport.getReportDefinition());
diff --git a/reportdesign/source/ui/dlg/AddField.cxx 
b/reportdesign/source/ui/dlg/AddField.cxx
index 790c0d700316..e7e8e1b38c18 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -73,7 +73,7 @@ OAddFieldWindow::OAddFieldWindow(weld::Window* pParent, const 
uno::Reference< be
     m_xListBox->set_help_id(HID_RPT_FIELD_SEL);
     m_xListBox->set_selection_mode(SelectionMode::Multiple);
     m_xHelper.set(new svx::OMultiColumnTransferable);
-    rtl::Reference<TransferDataContainer> xHelper(m_xHelper.get());
+    rtl::Reference<TransferDataContainer> xHelper(m_xHelper);
     m_xListBox->enable_drag_source(xHelper, DND_ACTION_COPYMOVE | 
DND_ACTION_LINK);
     m_xListBox->connect_drag_begin(LINK(this, OAddFieldWindow, DragBeginHdl));
 
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx 
b/reportdesign/source/ui/dlg/CondFormat.cxx
index f869ca0f50a7..eb827368b3fe 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -143,7 +143,7 @@ namespace rptui
                 throw IllegalArgumentException();
 
             Reference< XFormatCondition > xCond = 
m_xCopy->createFormatCondition();
-            ::comphelper::copyProperties(m_xCopy.get(),xCond.get());
+            ::comphelper::copyProperties(m_xCopy, xCond);
             m_xCopy->insertByIndex( _nNewCondIndex, makeAny( xCond ) );
             auto xCon = 
std::make_unique<Condition>(m_xConditionPlayground.get(), m_xDialog.get(), 
*this, m_rController);
             xCon->setCondition(xCond);
@@ -286,7 +286,7 @@ namespace rptui
                 Reference< XFormatCondition > xCond( m_xCopy->getByIndex(i), 
UNO_QUERY );
                 m_xConditionPlayground->reorder_child(xCon->get_widget(), i);
                 xCon->setCondition(xCond);
-                xCon->updateToolbar(xCond.get());
+                xCon->updateToolbar(xCond);
                 m_aConditions.push_back(std::move(xCon));
             }
         }
@@ -388,13 +388,13 @@ namespace rptui
                         xNewCond.set( m_xFormatConditions->getByIndex(j), 
UNO_QUERY );
                     ++j;
 
-                    ::comphelper::copyProperties(xCond.get(),xNewCond.get());
+                    ::comphelper::copyProperties(xCond, xNewCond);
                 }
 
                 for ( sal_Int32 k = m_xFormatConditions->getCount()-1; k >= j; 
--k )
                     m_xFormatConditions->removeByIndex(k);
 
-                ::comphelper::copyProperties( m_xCopy.get(), 
m_xFormatConditions.get() );
+                ::comphelper::copyProperties( m_xCopy, m_xFormatConditions );
             }
             catch ( const Exception& )
             {
diff --git a/reportdesign/source/ui/dlg/Condition.cxx 
b/reportdesign/source/ui/dlg/Condition.cxx
index 3f440f3494be..1b51d1998ac5 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -298,7 +298,7 @@ void Condition::setCondition( const uno::Reference< 
report::XFormatCondition >&
         DBG_UNHANDLED_EXCEPTION("reportdesign");
     }
     impl_setCondition( sConditionFormula );
-    updateToolbar( _rxCondition.get() );
+    updateToolbar( _rxCondition );
 }
 
 
diff --git a/reportdesign/source/ui/dlg/Formula.cxx 
b/reportdesign/source/ui/dlg/Formula.cxx
index 3bdcb2e5b5a0..f1b95f953c62 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -249,7 +249,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow& 
,_rAddFieldDlg, void)
 
 uno::Reference< sheet::XFormulaParser> FormulaDialog::getFormulaParser() const
 {
-    return m_xParser.get();
+    return m_xParser;
 }
 
 uno::Reference< sheet::XFormulaOpCodeMapper> 
FormulaDialog::getFormulaOpCodeMapper() const
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx 
b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 77adb2664252..4548072ccc74 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -204,7 +204,7 @@ OFieldExpressionControl::~OFieldExpressionControl()
 void OFieldExpressionControl::dispose()
 {
     uno::Reference< report::XGroups > xGroups = m_pParent->getGroups();
-    xGroups->removeContainerListener(aContainerListener.get());
+    xGroups->removeContainerListener(aContainerListener);
 
     // delete events from queue
     if( m_nDeleteEvent )
@@ -384,7 +384,7 @@ void OFieldExpressionControl::lateInit()
         if( m_pParent->isReadOnly() )
             nMode |= BrowserMode::HIDECURSOR;
         SetMode(nMode);
-        xGroups->addContainerListener(aContainerListener.get());
+        xGroups->addContainerListener(aContainerListener);
     }
     else
         // not the first call
@@ -820,7 +820,7 @@ OGroupsSortingDialog::OGroupsSortingDialog(weld::Window* 
pParent, bool bReadOnly
     for (size_t i = 0; i < SAL_N_ELEMENTS(pControlsLst) - 1; ++i)
         
dynamic_cast<weld::ComboBox&>(*pControlsLst[i]).connect_changed(LINK(this,OGroupsSortingDialog,LBChangeHdl));
 
-    m_pReportListener = new 
OPropertyChangeMultiplexer(this,m_pController->getReportDefinition().get());
+    m_pReportListener = new OPropertyChangeMultiplexer(this, 
m_pController->getReportDefinition());
     m_pReportListener->addProperty(PROPERTY_COMMAND);
     m_pReportListener->addProperty(PROPERTY_COMMANDTYPE);
 
@@ -869,7 +869,7 @@ void OGroupsSortingDialog::DisplayData( sal_Int32 _nRow )
     {
         uno::Reference< report::XGroup> xGroup = getGroup(nGroupPos);
 
-        m_pCurrentGroupListener = new 
OPropertyChangeMultiplexer(this,xGroup.get());
+        m_pCurrentGroupListener = new OPropertyChangeMultiplexer(this, xGroup);
         m_pCurrentGroupListener->addProperty(PROPERTY_HEADERON);
         m_pCurrentGroupListener->addProperty(PROPERTY_FOOTERON);
 
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx 
b/reportdesign/source/ui/dlg/Navigator.cxx
index d0a2a0670e81..ccda43cd6e6b 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -214,7 +214,7 @@ 
NavigatorTree::NavigatorTree(std::unique_ptr<weld::TreeView> xTreeView, OReportC
 {
     m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
25, m_xTreeView->get_height_rows(18));
 
-    m_pReportListener = new 
OPropertyChangeMultiplexer(this,m_rController.getReportDefinition().get());
+    m_pReportListener = new 
OPropertyChangeMultiplexer(this,m_rController.getReportDefinition());
     m_pReportListener->addProperty(PROPERTY_PAGEHEADERON);
     m_pReportListener->addProperty(PROPERTY_PAGEFOOTERON);
     m_pReportListener->addProperty(PROPERTY_REPORTHEADERON);
@@ -397,7 +397,7 @@ void NavigatorTree::traverseSection(const 
uno::Reference<report::XSection>& xSec
     for (sal_Int32 i = 0; i < nCount; ++i)
     {
         uno::Reference< report::XReportComponent> 
xElement(xSection->getByIndex(i), uno::UNO_QUERY_THROW);
-        insertEntry(lcl_getName(xElement.get()), xSectionIter.get(), 
lcl_getImageId(xElement), -1, new UserData(this, xElement), *xScratch);
+        insertEntry(lcl_getName(xElement), xSectionIter.get(), 
lcl_getImageId(xElement), -1, new UserData(this, xElement), *xScratch);
         uno::Reference< report::XReportDefinition> 
xSubReport(xElement,uno::UNO_QUERY);
         if ( xSubReport.is() )
         {
@@ -516,7 +516,7 @@ void NavigatorTree::traverseGroup(const uno::Reference< 
report::XGroup>& xGroup)
     if (!bGroups)
         xGroupsIter.reset();
     std::unique_ptr<weld::TreeIter> xScratch = m_xTreeView->make_iterator();
-    insertEntry(xGroup->getExpression(), xGroupsIter.get(), RID_SVXBMP_GROUP, 
rptui::getPositionInIndexAccess(xGroups.get(),xGroup), new 
UserData(this,xGroup), *xScratch);
+    insertEntry(xGroup->getExpression(), xGroupsIter.get(), RID_SVXBMP_GROUP, 
rptui::getPositionInIndexAccess(xGroups,xGroup), new UserData(this,xGroup), 
*xScratch);
 }
 
 void NavigatorTree::traverseGroupFunctions(const uno::Reference< 
report::XFunctions>& xFunctions)
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx 
b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 9f22c4e5ae35..bcc6be58ff29 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -132,7 +132,7 @@ void SAL_CALL DataProviderHandler::inspect(const 
uno::Reference< uno::XInterface
             aPropertyMediation.emplace( PROPERTY_MASTERFIELDS, 
TPropertyConverter(PROPERTY_MASTERFIELDS,aNoConverter) );
             aPropertyMediation.emplace( PROPERTY_DETAILFIELDS, 
TPropertyConverter(PROPERTY_DETAILFIELDS,aNoConverter) );
 
-            m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), 
m_xReportComponent.get(), aPropertyMediation,true );
+            m_xMasterDetails = new OPropertyMediator( m_xDataProvider, 
m_xReportComponent, aPropertyMediation,true );
         }
     }
     catch(const uno::Exception &)
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx 
b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 52a2d46320e4..9ac2957f356e 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -128,7 +128,7 @@ void lcl_collectFunctionNames(const uno::Reference< 
report::XSection>& _xSection
     sal_Int32 nPos = -1;
     uno::Reference< report::XGroup> xGroup = _xSection->getGroup();
     if ( xGroup.is() )
-        nPos = getPositionInIndexAccess(xGroups.get(),xGroup);
+        nPos = getPositionInIndexAccess(xGroups,xGroup);
     else if ( _xSection == xReportDefinition->getDetail() )
         nPos = xGroups->getCount()-1;
 
@@ -1703,7 +1703,7 @@ void 
GeometryHandler::impl_fillScopeList_nothrow(::std::vector< OUString >& _out
         sal_Int32 nPos = -1;
         uno::Reference< report::XGroup> xGroup = xSection->getGroup();
         if ( xGroup.is() )
-            nPos = getPositionInIndexAccess(xGroups.get(),xGroup);
+            nPos = getPositionInIndexAccess(xGroups,xGroup);
         else if ( xSection == xReportDefinition->getDetail() )
             nPos = xGroups->getCount()-1;
 
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx 
b/reportdesign/source/ui/misc/RptUndo.cxx
index be280a8368f2..c2a07a4d0f92 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -323,7 +323,7 @@ OGroupUndo::OGroupUndo(OReportModel& _rMod
 ,m_xReportDefinition(_xReportDefinition)
 ,m_eAction(_eAction)
 {
-    m_nLastPosition = 
getPositionInIndexAccess(m_xReportDefinition->getGroups().get(),m_xGroup);
+    m_nLastPosition = 
getPositionInIndexAccess(m_xReportDefinition->getGroups(),m_xGroup);
 }
 
 void OGroupUndo::implReInsert( )
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 10a7197582d5..3a96710a2a5b 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -695,7 +695,7 @@ bool openCharDialog( const 
uno::Reference<report::XReportControlFormat >& _rxRep
         new SvxEscapementItem(ITEMID_ESCAPEMENT),
         new SvxFontListItem(pFontList.get(),ITEMID_FONTLIST),
         new SvxAutoKernItem(false,ITEMID_AUTOKERN),
-        new SvxColorListItem(pColorList.get(),ITEMID_COLOR_TABLE),
+        new SvxColorListItem(pColorList,ITEMID_COLOR_TABLE),
         new SvxBlinkItem(false,ITEMID_BLINK),
         new SvxEmphasisMarkItem(FontEmphasisMark::NONE,ITEMID_EMPHASISMARK),
         new SvxTwoLinesItem(true,0,0,ITEMID_TWOLINES),
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx 
b/reportdesign/source/ui/report/FixedTextColor.cxx
index a73858fcf86a..4815dbbc412a 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -156,7 +156,7 @@ namespace rptui
         if ( xSection.is() )
         {
             OReportPage *pPage = pModel->getPage(xSection);
-            const size_t nIndex = pPage->getIndexOf(_xFixedText.get());
+            const size_t nIndex = pPage->getIndexOf(_xFixedText);
             if (nIndex < pPage->GetObjCount() )
             {
                 SdrObject *pObject = pPage->GetObj(nIndex);
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx 
b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index ba6a0f1dd43e..eacd4a83c305 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -91,7 +91,7 @@ namespace rptui
                         sDataField = aFormula.getEqualUndecoratedContent();
                 }
 
-                setPlaceholderText( getVclWindowPeer( xControlModel.get() ), 
sDataField );
+                setPlaceholderText( getVclWindowPeer( xControlModel ), 
sDataField );
             }
         }
         catch (const uno::Exception &)
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 40cc8421c5d8..46a23a3a4f9a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1161,7 +1161,7 @@ void OReportController::Execute(sal_uInt16 _nId, const 
Sequence< PropertyValue >
                 if ( xFunction.is() )
                 {
                     uno::Reference< report::XFunctions> 
xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW);
-                    sal_Int32 nIndex = 
getPositionInIndexAccess(xFunctions.get(),xFunction);
+                    sal_Int32 nIndex = getPositionInIndexAccess(xFunctions, 
xFunction);
                     const OUString sUndoAction = 
RptResId(RID_STR_UNDO_REMOVE_FUNCTION);
                     UndoContext aUndoContext( getUndoManager(), sUndoAction );
                     xFunctions->removeByIndex(nIndex);
@@ -1558,7 +1558,7 @@ void OReportController::Execute(sal_uInt16 _nId, const 
Sequence< PropertyValue >
                 uno::Reference< report::XFormattedField> 
xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY);
                 if ( xFormattedField.is() )
                 {
-                    ConditionalFormattingDialog aDlg(getFrameWeld(), 
xFormattedField.get(), *this);
+                    ConditionalFormattingDialog aDlg(getFrameWeld(), 
xFormattedField, *this);
                     aDlg.run();
                 }
             }
@@ -2560,7 +2560,7 @@ void OReportController::openSortingAndGroupingDialog()
 
 sal_Int32 OReportController::getGroupPosition(const uno::Reference< 
report::XGroup >& _xGroup)
 {
-    return 
rptui::getPositionInIndexAccess(m_xReportDefinition->getGroups().get(),_xGroup);
+    return 
rptui::getPositionInIndexAccess(m_xReportDefinition->getGroups(),_xGroup);
 }
 
 
@@ -2951,7 +2951,7 @@ uno::Reference<frame::XModel> 
OReportController::executeReport()
 
 uno::Reference< frame::XModel >  SAL_CALL OReportController::getModel()
 {
-    return m_xReportDefinition.get();
+    return m_xReportDefinition;
 }
 
 uno::Reference< sdbc::XRowSet > const & OReportController::getRowSet()
@@ -2978,7 +2978,7 @@ uno::Reference< sdbc::XRowSet > const & 
OReportController::getRowSet()
         aPropertyMediation.emplace( PROPERTY_ESCAPEPROCESSING, 
TPropertyConverter(PROPERTY_ESCAPEPROCESSING,aNoConverter) );
         aPropertyMediation.emplace( PROPERTY_FILTER, 
TPropertyConverter(PROPERTY_FILTER,aNoConverter) );
 
-        m_xRowSetMediator = new OPropertyMediator( m_xReportDefinition.get(), 
xRowSetProp, aPropertyMediation );
+        m_xRowSetMediator = new OPropertyMediator( m_xReportDefinition, 
xRowSetProp, aPropertyMediation );
         m_xRowSet = xRowSet;
     }
     catch(const uno::Exception&)
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx 
b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index 79afb9c042a1..51462438897f 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -166,7 +166,7 @@ void OXReportControllerObserver::AddSection(const 
uno::Reference< report::XSecti
     OEnvLock aLock(*this);
     try
     {
-        uno::Reference<container::XChild> xChild = _xSection.get();
+        uno::Reference<container::XChild> xChild = _xSection;
         m_pImpl->m_aSections.push_back(xChild);
         uno::Reference< uno::XInterface >  xInt(_xSection);
         AddElement(xInt);
@@ -183,7 +183,7 @@ void OXReportControllerObserver::RemoveSection(const 
uno::Reference< report::XSe
     OEnvLock aLock(*this);
     try
     {
-        uno::Reference<container::XChild> xChild(_xSection.get());
+        uno::Reference<container::XChild> xChild(_xSection);
         
m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
             xChild), m_pImpl->m_aSections.end());
         uno::Reference< uno::XInterface >  xInt(_xSection);
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 313969f191cb..690e40e93892 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -164,7 +164,7 @@ void OReportSection::fill()
     if ( !m_xSection.is() )
         return;
 
-    m_pMulti = new 
comphelper::OPropertyChangeMultiplexer(this,m_xSection.get());
+    m_pMulti = new comphelper::OPropertyChangeMultiplexer(this,m_xSection);
     m_pMulti->addProperty(PROPERTY_BACKCOLOR);
 
     m_pReportListener = 
addStyleListener(m_xSection->getReportDefinition(),this);
@@ -433,7 +433,7 @@ void OReportSection::Command( const CommandEvent& _rCEvt )
         return;
 
     rtl::Reference<VCLXPopupMenu> xPopupMenu(new VCLXPopupMenu);
-    xMenuController->setPopupMenu(xPopupMenu.get());
+    xMenuController->setPopupMenu(xPopupMenu);
 
     Point aPos = _rCEvt.GetMousePosPixel();
     m_pView->EndAction();
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx 
b/reportdesign/source/ui/report/SectionWindow.cxx
index 8d05c77f4c00..660971395694 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -73,7 +73,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const 
uno::Reference< rep
     m_aEndMarker->Show();
     Show();
 
-    m_pSectionMulti = new OPropertyChangeMultiplexer(this,_xSection.get());
+    m_pSectionMulti = new OPropertyChangeMultiplexer(this,_xSection);
     m_pSectionMulti->addProperty(PROPERTY_NAME);
     m_pSectionMulti->addProperty(PROPERTY_HEIGHT);
 
@@ -83,7 +83,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const 
uno::Reference< rep
     uno::Reference< report::XGroup > xGroup(_xSection->getGroup());
     if ( xGroup.is() )
     {
-        m_pGroupMulti = new OPropertyChangeMultiplexer(this,xGroup.get());
+        m_pGroupMulti = new OPropertyChangeMultiplexer(this,xGroup);
         m_pGroupMulti->addProperty(PROPERTY_EXPRESSION);
         aEvent.Source = xGroup;
         aEvent.PropertyName = PROPERTY_EXPRESSION;
@@ -281,7 +281,7 @@ void OSectionWindow::setCollapsed(bool _bCollapsed)
 
 void OSectionWindow::showProperties()
 {
-    m_pParent->getView()->showProperties( m_aReportSection->getSection().get() 
);
+    m_pParent->getView()->showProperties( m_aReportSection->getSection() );
 }
 
 void OSectionWindow::setMarked(bool _bMark)
diff --git a/reportdesign/source/ui/report/propbrw.cxx 
b/reportdesign/source/ui/report/propbrw.cxx
index 84656ded767f..3b0f4c869451 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -402,7 +402,7 @@ uno::Reference< uno::XInterface> 
PropBrw::CreateComponentPair(const uno::Referen
     xNameCont->insertByName("ReportComponent",uno::makeAny(_xReportComponent));
     xNameCont->insertByName("RowSet",uno::makeAny(uno::Reference< 
uno::XInterface>(m_pDesignView->getController().getRowSet())));
 
-    return xNameCont.get();
+    return xNameCont;
 }
 
 ::Size PropBrw::getMinimumSize() const
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to