editeng/source/accessibility/AccessibleEditableTextPara.cxx |    2 +-
 editeng/source/uno/unotext2.cxx                             |    4 ++--
 embeddedobj/source/general/docholder.cxx                    |    2 +-
 extensions/source/bibliography/bibload.cxx                  |    2 +-
 extensions/source/bibliography/framectr.cxx                 |    8 ++++----
 extensions/source/bibliography/general.cxx                  |    4 ++--
 extensions/source/dbpilots/gridwizard.cxx                   |    2 +-
 extensions/source/dbpilots/optiongrouplayouter.cxx          |    6 +++---
 extensions/source/propctrlr/browserlistbox.cxx              |    2 +-
 extensions/source/propctrlr/cellbindinghelper.cxx           |    6 +++---
 extensions/source/propctrlr/composeduiupdate.cxx            |    2 +-
 extensions/source/propctrlr/eventhandler.cxx                |    2 +-
 extensions/source/propctrlr/formcomponenthandler.cxx        |    2 +-
 extensions/source/propctrlr/formgeometryhandler.cxx         |    6 +++---
 extensions/source/propctrlr/handlerhelper.cxx               |    4 ++--
 extensions/source/update/feed/updatefeed.cxx                |    4 ++--
 filter/qa/cppunit/xslt-test.cxx                             |    4 ++--
 filter/source/config/cache/typedetection.cxx                |    4 ++--
 filter/source/pdf/pdfexport.cxx                             |    2 +-
 forms/source/component/Button.cxx                           |    4 ++--
 forms/source/component/FormattedFieldWrapper.cxx            |    9 ++++-----
 forms/source/component/clickableimage.hxx                   |    2 +-
 forms/source/richtext/richtextcontrol.cxx                   |    4 ++--
 forms/source/solar/component/navbarcontrol.cxx              |    4 ++--
 forms/source/xforms/datatyperepository.cxx                  |    2 +-
 forms/source/xforms/model.cxx                               |   10 +++++-----
 fpicker/source/office/fpsmartcontent.cxx                    |    2 +-
 framework/qa/cppunit/dispatchtest.cxx                       |    3 +--
 framework/source/fwe/dispatch/interaction.cxx               |    4 ++--
 framework/source/fwe/xml/menudocumenthandler.cxx            |    2 +-
 framework/source/fwe/xml/statusbardocumenthandler.cxx       |    2 +-
 framework/source/fwe/xml/toolboxdocumenthandler.cxx         |    2 +-
 framework/source/services/autorecovery.cxx                  |    8 ++++----
 framework/source/uielement/resourcemenucontroller.cxx       |    2 +-
 framework/source/xml/imagesdocumenthandler.cxx              |    2 +-
 35 files changed, 64 insertions(+), 66 deletions(-)

New commits:
commit 7767ff7b521b7d43a1ea2a4fd19a64bd171da5e0
Author:     Noel <noel.gran...@collabora.co.uk>
AuthorDate: Mon Feb 15 19:58:15 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 16 07:52:37 2021 +0100

    loplugin:referencecasting in editeng..framework
    
    Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index ac4bbe1ada4d..a12bfe7232de 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -694,7 +694,7 @@ namespace accessibility
             maImageBullet = aChild;
         }
 
-        return aChild.get();
+        return aChild;
     }
 
     uno::Reference< XAccessible > SAL_CALL 
AccessibleEditableTextPara::getAccessibleParent()
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 1e61337f5471..04d63ea6b839 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -107,7 +107,7 @@ uno::Any SvxUnoTextContentEnumeration::nextElement()
     if(!hasMoreElements())
         throw container::NoSuchElementException();
 
-    uno::Reference< text::XTextContent > xRef( 
maContents.at(mnNextParagraph).get() );
+    uno::Reference< text::XTextContent > xRef( maContents.at(mnNextParagraph) 
);
     mnNextParagraph++;
     return uno::makeAny( xRef );
 }
@@ -442,7 +442,7 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement()
     if( maPortions.empty() || mnNextPortion >= maPortions.size() )
         throw container::NoSuchElementException();
 
-    uno::Reference< text::XTextRange > xRange = 
maPortions.at(mnNextPortion).get();
+    uno::Reference< text::XTextRange > xRange = maPortions.at(mnNextPortion);
     mnNextPortion++;
     return uno::makeAny( xRange );
 }
diff --git a/embeddedobj/source/general/docholder.cxx 
b/embeddedobj/source/general/docholder.cxx
index 90a04d85e125..66a2290ab639 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -830,7 +830,7 @@ uno::Reference< frame::XFrame > const & 
DocumentHolder::GetDocFrame()
 
             m_xInterceptor = new Interceptor( this );
 
-            xInterception->registerDispatchProviderInterceptor( 
m_xInterceptor.get() );
+            xInterception->registerDispatchProviderInterceptor( m_xInterceptor 
);
 
             // register interceptor from outside
             if ( m_xOutplaceInterceptor.is() )
diff --git a/extensions/source/bibliography/bibload.cxx 
b/extensions/source/bibliography/bibload.cxx
index 312c47432f4a..2bacc3c31477 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -244,7 +244,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > 
& rFrame,
         pParentComponent->setVisible(true);
     }
 
-    Reference<XLoadable>(m_xDatMan.get())->load();
+    Reference<XLoadable>(m_xDatMan)->load();
     m_xDatMan->RegisterInterceptor(pBeamer);
 
     if ( rListener.is() )
diff --git a/extensions/source/bibliography/framectr.cxx 
b/extensions/source/bibliography/framectr.cxx
index 7f621eb72bea..2bb4246fe4c5 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -181,7 +181,7 @@ css::uno::Sequence< OUString > SAL_CALL 
BibFrameController_Impl::getSupportedSer
 void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & 
xArg )
 {
     xFrame = xArg;
-    xFrame->addFrameActionListener( mxImpl.get() );
+    xFrame->addFrameActionListener( mxImpl );
 }
 
 sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > 
& /*xModel*/ )
@@ -192,9 +192,9 @@ sal_Bool BibFrameController_Impl::attachModel( const 
uno::Reference< XModel > &
 sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend )
 {
     if ( bSuspend )
-        getFrame()->removeFrameActionListener( mxImpl.get() );
+        getFrame()->removeFrameActionListener( mxImpl );
     else
-        getFrame()->addFrameActionListener( mxImpl.get() );
+        getFrame()->addFrameActionListener( mxImpl );
     return true;
 }
 
@@ -810,7 +810,7 @@ void BibFrameController_Impl::ChangeDataSource(const 
uno::Sequence< beans::Prope
     }
     else
     {
-        Reference<css::form::XLoadable> xLoadable(m_xDatMan.get());
+        Reference<css::form::XLoadable> xLoadable(m_xDatMan);
         xLoadable->unload();
         m_xDatMan->setActiveDataTable(aDBTableName);
         m_xDatMan->updateGridModel();
diff --git a/extensions/source/bibliography/general.cxx 
b/extensions/source/bibliography/general.cxx
index 1d2f66517a10..479aa7be18b8 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -403,7 +403,7 @@ void BibGeneralPage::RemoveListeners()
     {
         if(aControl.is())
         {
-            aControl->removeFocusListener( mxBibGeneralPageFocusListener.get() 
);
+            aControl->removeFocusListener( mxBibGeneralPageFocusListener );
             aControl = nullptr;
         }
     }
@@ -494,7 +494,7 @@ bool  BibGeneralPage::AddXControl(
                     // Peer as Child to the FrameWindow
                     xCtrlContnr->addControl(rName, xControl);
                     uno::Reference< awt::XWindow >  xCtrWin(xControl, 
UNO_QUERY );
-                    xCtrWin->addFocusListener( 
mxBibGeneralPageFocusListener.get() );
+                    xCtrWin->addFocusListener( mxBibGeneralPageFocusListener );
                     rIndex = -1;    // -> implies, that not found
                     for(sal_uInt16 i = 0; i < FIELD_COUNT; i++)
                         if(!aControls[i].is())
diff --git a/extensions/source/dbpilots/gridwizard.cxx 
b/extensions/source/dbpilots/gridwizard.cxx
index 1c5f568795e0..0559858ca1ca 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -172,7 +172,7 @@ namespace dbp
 
         // now loop through the descriptions and create the (grid)columns out 
of th descriptors
         {
-            Reference< XNameAccess > xExistenceChecker(xColumnContainer.get());
+            Reference< XNameAccess > xExistenceChecker(xColumnContainer);
 
             std::vector< OUString >::const_iterator pColumnLabelPostfix = 
aColumnLabelPostfixes.begin();
             std::vector< OUString >::const_iterator pFormFieldName = 
aFormFieldNames.begin();
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx 
b/extensions/source/dbpilots/optiongrouplayouter.cxx
index 14a67ada98f7..23afd922cec4 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -90,7 +90,7 @@ namespace dbp
         // shape collection (for grouping the shapes)
         Reference< XShapes > xButtonCollection( 
ShapeCollection::create(mxContext) );
         // first member : the shape of the control
-        xButtonCollection->add(_rContext.xObjectShape.get());
+        xButtonCollection->add(_rContext.xObjectShape);
 
         sal_Int32 nTempHeight = (aControlShapeSize.Height - BUTTON_HEIGHT/4) / 
(nRadioButtons + 1);
 
@@ -158,9 +158,9 @@ namespace dbp
             //     xShapeProperties->setPropertyValue("Name", 
makeAny(sElementsName));
 
             // add to the page
-            xPageShapes->add(xRadioShape.get());
+            xPageShapes->add(xRadioShape);
             // add to the collection (for the later grouping)
-            xButtonCollection->add(xRadioShape.get());
+            xButtonCollection->add(xRadioShape);
 
             // set the GroupBox as "LabelControl" for the RadioButton
             // (_after_ having inserted the model into the page!)
diff --git a/extensions/source/propctrlr/browserlistbox.cxx 
b/extensions/source/propctrlr/browserlistbox.cxx
index b30f4f3eeee5..8f164a249802 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -736,7 +736,7 @@ namespace pcr
         xControl = rLine.pLine->getControl();
 
         if ( xControl.is() )
-            xControl->setControlContext( m_pControlContextImpl.get() );
+            xControl->setControlContext( m_pControlContextImpl );
 
         // the initial property value
         if ( rPropertyData.bUnknownValue )
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx 
b/extensions/source/propctrlr/cellbindinghelper.cxx
index 4b93d048ddaa..e27345e7fee7 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -477,19 +477,19 @@ namespace pcr
 
     bool CellBindingHelper::isCellBinding( const Reference< XValueBinding >& 
_rxBinding )
     {
-        return doesComponentSupport( _rxBinding.get(), 
SERVICE_SHEET_CELL_BINDING );
+        return doesComponentSupport( _rxBinding, SERVICE_SHEET_CELL_BINDING );
     }
 
 
     bool CellBindingHelper::isCellIntegerBinding( const Reference< 
XValueBinding >& _rxBinding )
     {
-        return doesComponentSupport( _rxBinding.get(), 
SERVICE_SHEET_CELL_INT_BINDING );
+        return doesComponentSupport( _rxBinding, 
SERVICE_SHEET_CELL_INT_BINDING );
     }
 
 
     bool CellBindingHelper::isCellRangeListSource( const Reference< 
XListEntrySource >& _rxSource )
     {
-        return doesComponentSupport( _rxSource.get(), 
SERVICE_SHEET_CELLRANGE_LISTSOURCE );
+        return doesComponentSupport( _rxSource, 
SERVICE_SHEET_CELLRANGE_LISTSOURCE );
     }
 
 
diff --git a/extensions/source/propctrlr/composeduiupdate.cxx 
b/extensions/source/propctrlr/composeduiupdate.cxx
index 61c207341abd..0e32ef19a9db 100644
--- a/extensions/source/propctrlr/composeduiupdate.cxx
+++ b/extensions/source/propctrlr/composeduiupdate.cxx
@@ -389,7 +389,7 @@ namespace pcr
         ::rtl::Reference< CachedInspectorUI >& rUI = 
m_pCollectedUIs->aHandlers[ _rxHandler ];
         if ( !rUI.is() )
             rUI = new CachedInspectorUI( *this, 
&ComposedPropertyUIUpdate::callback_inspectorUIChanged_throw );
-        return rUI.get();
+        return rUI;
     }
 
 
diff --git a/extensions/source/propctrlr/eventhandler.cxx 
b/extensions/source/propctrlr/eventhandler.cxx
index f20107448ccb..74a1ba13a94b 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -781,7 +781,7 @@ namespace pcr
             PropertyHandlerHelper::getDialogParentFrame( m_xContext ),
             impl_getContextFrame_nothrow(),
             m_bIsDialogElement,
-            pEventHolder.get(),
+            pEventHolder,
             nInitialSelection
         ) );
 
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index e63074053cf1..fd555b4867ad 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -3183,7 +3183,7 @@ namespace pcr
                 return false;
             }
 
-            m_xCommandDesigner.set( new SQLCommandDesigner( m_xContext, 
xCommandUI.get(), m_xRowSetConnection, LINK( this, 
FormComponentPropertyHandler, OnDesignerClosed ) ) );
+            m_xCommandDesigner.set( new SQLCommandDesigner( m_xContext, 
xCommandUI, m_xRowSetConnection, LINK( this, FormComponentPropertyHandler, 
OnDesignerClosed ) ) );
 
             DBG_ASSERT( _rxInspectorUI.is(), 
"FormComponentPropertyHandler::OnDesignerClosed: no access to the property 
browser ui!" );
             if ( m_xCommandDesigner->isActive() && _rxInspectorUI.is() )
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx 
b/extensions/source/propctrlr/formgeometryhandler.cxx
index 8f7c04677538..282ecc8a3128 100644
--- a/extensions/source/propctrlr/formgeometryhandler.cxx
+++ b/extensions/source/propctrlr/formgeometryhandler.cxx
@@ -317,7 +317,7 @@ namespace pcr
         }
 
         if ( m_xAssociatedShape.is() )
-            m_xChangeNotifier = new ShapeGeometryChangeNotifier( *this, 
m_aMutex, m_xAssociatedShape.get() );
+            m_xChangeNotifier = new ShapeGeometryChangeNotifier( *this, 
m_aMutex, m_xAssociatedShape );
     }
 
 
@@ -689,10 +689,10 @@ namespace pcr
                 css::awt::Point aRelativePosition( 
m_xAssociatedShape->getPosition() );
 
                 Reference< XTableColumns > xCols( xColsRows->getColumns(), 
UNO_SET_THROW );
-                sal_Int32 nNewAnchorCol = lcl_getLowerBoundRowOrColumn( 
xCols.get(), false, aRelativePosition );
+                sal_Int32 nNewAnchorCol = lcl_getLowerBoundRowOrColumn( xCols, 
false, aRelativePosition );
 
                 Reference< XTableRows > xRows( xColsRows->getRows(), 
UNO_SET_THROW );
-                sal_Int32 nNewAnchorRow = lcl_getLowerBoundRowOrColumn( 
xRows.get(), true, aRelativePosition );
+                sal_Int32 nNewAnchorRow = lcl_getLowerBoundRowOrColumn( xRows, 
true, aRelativePosition );
 
                 Any aNewAnchorCell( xSheet->getCellByPosition( nNewAnchorCol, 
nNewAnchorRow ) );
                 m_xShapeProperties->setPropertyValue( PROPERTY_ANCHOR, 
aNewAnchorCell );
diff --git a/extensions/source/propctrlr/handlerhelper.cxx 
b/extensions/source/propctrlr/handlerhelper.cxx
index eb2d5f627d47..b83773b6f00a 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -128,7 +128,7 @@ namespace pcr
 
             for (auto const& initialEntry : aInitialEntries)
                 xListControl->appendListEntry(initialEntry);
-            return xListControl.get();
+            return xListControl;
         }
     }
 
@@ -166,7 +166,7 @@ namespace pcr
         xNumericControl->setMinValue( _rMinValue );
         xNumericControl->setMaxValue( _rMaxValue );
 
-        return xNumericControl.get();
+        return xNumericControl;
     }
 
 
diff --git a/extensions/source/update/feed/updatefeed.cxx 
b/extensions/source/update/feed/updatefeed.cxx
index 153233bbb67c..142bd301cffa 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -524,7 +524,7 @@ UpdateInformationProvider::getDocumentRoot(const 
uno::Reference< xml::dom::XNode
                  * seems to evaluate expression always relative to the root 
node.
                  */
                 uno::Reference< xml::dom::XDocument > xUpdateXML = 
m_xDocumentBuilder->newDocument();
-                xUpdateXML->appendChild( 
xUpdateXML->importNode(xChildElement.get(), true ) );
+                xUpdateXML->appendChild( xUpdateXML->importNode(xChildElement, 
true ) );
                 return xUpdateXML->getDocumentElement();
             }
         }
@@ -582,7 +582,7 @@ UpdateInformationProvider::getUpdateInformationEnumeration(
 
                     uno::Reference< xml::dom::XNodeList > xNodeList;
                     try {
-                        xNodeList = 
m_xXPathAPI->selectNodeList(xDocument.get(),
+                        xNodeList = m_xXPathAPI->selectNodeList(xDocument,
                             aXPathExpression);
                     } catch (const xml::xpath::XPathException &) {
                         // ignore
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index 1dcb2a7d5455..8ff8dbc6ef55 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -119,7 +119,7 @@ void XsltFilterTest::testXsltCopyNew()
     uno::Reference<xml::xslt::XXSLTTransformer> xXslt(
             xml::xslt::XSLTTransformer::create(getComponentContext(), args));
 
-    xXslt->addListener(uno::Reference<io::XStreamListener>(xListener.get()));
+    xXslt->addListener(xListener);
     xXslt->setInputStream(xIn);
     xXslt->setOutputStream(xOut);
 
@@ -178,7 +178,7 @@ void XsltFilterTest::testXsltCopyOld()
 
     uno::Reference<lang::XInitialization> xInit(xXslt, uno::UNO_QUERY_THROW);
     xInit->initialize(args);
-    xXslt->addListener(uno::Reference<io::XStreamListener>(xListener.get()));
+    xXslt->addListener(xListener);
     xXslt->setInputStream(xIn);
     xXslt->setOutputStream(xOut);
 
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index e9e149511cff..6679a5c8973d 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -53,7 +53,7 @@ TypeDetection::TypeDetection(const css::uno::Reference< 
css::uno::XComponentCont
    , m_xTerminateListener(new TerminateDetection(this))
    , m_bCancel(false)
 {
-    
css::frame::Desktop::create(m_xContext)->addTerminateListener(m_xTerminateListener.get());
+    
css::frame::Desktop::create(m_xContext)->addTerminateListener(m_xTerminateListener);
     BaseContainer::init(rxContext                                     ,
                         "com.sun.star.comp.filter.config.TypeDetection"   ,
                         { "com.sun.star.document.TypeDetection" },
@@ -63,7 +63,7 @@ TypeDetection::TypeDetection(const css::uno::Reference< 
css::uno::XComponentCont
 
 TypeDetection::~TypeDetection()
 {
-    
css::frame::Desktop::create(m_xContext)->removeTerminateListener(m_xTerminateListener.get());
+    
css::frame::Desktop::create(m_xContext)->removeTerminateListener(m_xTerminateListener);
 }
 
 
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index dc5a0c6bb7da..5af0c03775c8 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -869,7 +869,7 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
 
                 Sequence< PropertyValue > aRenderOptions( 8 );
                 aRenderOptions[ 0 ].Name = "RenderDevice";
-                aRenderOptions[ 0 ].Value <<= 
uno::Reference<awt::XDevice>(xDevice.get());
+                aRenderOptions[ 0 ].Value <<= 
uno::Reference<awt::XDevice>(xDevice);
                 aRenderOptions[ 1 ].Name = "ExportNotesPages";
                 aRenderOptions[ 1 ].Value <<= false;
                 Any& rExportNotesValue = aRenderOptions[ 1 ].Value;
diff --git a/forms/source/component/Button.cxx 
b/forms/source/component/Button.cxx
index 42592fa1f76e..a52a423398cf 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -142,7 +142,7 @@ void OButtonModel::write(const 
Reference<XObjectOutputStream>& _rxOutStream)
     _rxOutStream->writeShort(0x0003);   // Version
 
     {
-        OStreamSection aSection( _rxOutStream.get() );
+        OStreamSection aSection( _rxOutStream );
             // this will allow readers to skip unknown bytes in their dtor
 
         _rxOutStream->writeShort( static_cast<sal_uInt16>(m_eButtonType) );
@@ -184,7 +184,7 @@ void OButtonModel::read(const 
Reference<XObjectInputStream>& _rxInStream)
 
         case 0x0003:
         {
-            OStreamSection aSection( _rxInStream.get() );
+            OStreamSection aSection( _rxInStream );
             // this will skip any unknown bytes in its dtor
 
             // button type
diff --git a/forms/source/component/FormattedFieldWrapper.cxx 
b/forms/source/component/FormattedFieldWrapper.cxx
index 02aab9b1a245..d169ff4eaade 100644
--- a/forms/source/component/FormattedFieldWrapper.cxx
+++ b/forms/source/component/FormattedFieldWrapper.cxx
@@ -100,7 +100,7 @@ Reference< XCloneable > SAL_CALL 
OFormattedFieldWrapper::createClone()
         OSL_ENSURE(xRef->m_xAggregate.is(), "invalid aggregate cloned !");
 
         xRef->m_xFormattedPart.set(
-            Reference< XInterface >(xClone.get()), css::uno::UNO_QUERY);
+            Reference< XInterface >(xClone), css::uno::UNO_QUERY);
 
         if ( m_pEditPart.is() )
         {
@@ -116,7 +116,7 @@ Reference< XCloneable > SAL_CALL 
OFormattedFieldWrapper::createClone()
         xRef->m_xAggregate->setDelegator(static_cast< XWeak* >(xRef.get()));
     }
 
-    return xRef.get();
+    return xRef;
 }
 
 OFormattedFieldWrapper::~OFormattedFieldWrapper()
@@ -219,8 +219,7 @@ void SAL_CALL OFormattedFieldWrapper::write(const 
Reference<XObjectOutputStream>
 
     // for this we transfer the current props of the formatted part to the 
edit part
     Reference<XPropertySet>  xFormatProps(m_xFormattedPart, UNO_QUERY);
-    Reference<XPropertySet> xEditProps(
-        static_cast<XWeak*>(m_pEditPart.get()), css::uno::UNO_QUERY);
+    Reference<XPropertySet> xEditProps = m_pEditPart;
 
     Locale aAppLanguage = 
Application::GetSettings().GetUILanguageTag().getLocale();
     dbtools::TransferFormComponentProperties(xFormatProps, xEditProps, 
aAppLanguage);
@@ -285,7 +284,7 @@ void SAL_CALL OFormattedFieldWrapper::read(const 
Reference<XObjectInputStream>&
         if (!pBasicReader->lastReadWasFormattedFake())
         {
             // yes -> all fine
-            m_xAggregate.set( pBasicReader.get() );
+            m_xAggregate = pBasicReader;
         }
         else
         {   // no -> substitute it with a formatted model
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 329f2d5ab430..eea5ed827e7d 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -103,7 +103,7 @@ namespace frm
         virtual void SAL_CALL disposing() override;
 
         // css::form::XImageProducerSupplier
-        virtual css::uno::Reference< css::awt::XImageProducer> SAL_CALL 
getImageProducer() override { return m_xProducer.get(); }
+        virtual css::uno::Reference< css::awt::XImageProducer> SAL_CALL 
getImageProducer() override { return m_xProducer; }
 
         // OPropertySetHelper
         virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, 
sal_Int32 nHandle ) const override;
diff --git a/forms/source/richtext/richtextcontrol.cxx 
b/forms/source/richtext/richtextcontrol.cxx
index 88f62848063a..ad857d328685 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -190,7 +190,7 @@ namespace frm
         if ( pPeer )
         {
             // announce the peer to the base class
-            setPeer( pPeer.get() );
+            setPeer( pPeer );
 
             // initialize ourself (and thus the peer) with the model properties
             updateFromModel();
@@ -272,7 +272,7 @@ namespace frm
         VclPtrInstance<RichTextControl> pRichTextControl( pEngine, 
_pParentWindow, _nStyle, nullptr, pPeer.get() );
 
         // some knittings
-        pRichTextControl->SetComponentInterface( pPeer.get() );
+        pRichTextControl->SetComponentInterface( pPeer );
 
         // outta here
         return pPeer;
diff --git a/forms/source/solar/component/navbarcontrol.cxx 
b/forms/source/solar/component/navbarcontrol.cxx
index 1f27aebe2564..14e9c27ce74f 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -134,7 +134,7 @@ namespace frm
         assert(pPeer && "ONavigationBarControl::createPeer: invalid peer 
returned!");
 
         // announce the peer to the base class
-        setPeer( pPeer.get() );
+        setPeer( pPeer );
 
         // initialize ourself (and thus the peer) with the model properties
         updateFromModel();
@@ -216,7 +216,7 @@ namespace frm
 
         // some knittings
         pNavBar->setDispatcher( pPeer.get() );
-        pNavBar->SetComponentInterface( pPeer.get() );
+        pNavBar->SetComponentInterface( pPeer );
 
         // we want a faster repeating rate for the slots in this
         // toolbox
diff --git a/forms/source/xforms/datatyperepository.cxx 
b/forms/source/xforms/datatyperepository.cxx
index fdfbd138871a..bb0bf4a34135 100644
--- a/forms/source/xforms/datatyperepository.cxx
+++ b/forms/source/xforms/datatyperepository.cxx
@@ -154,7 +154,7 @@ namespace xforms
     Reference< XDataType > SAL_CALL ODataTypeRepository::getDataType( const 
OUString& typeName )
     {
         ::osl::MutexGuard aGuard( m_aMutex );
-        return implLocate( typeName )->second.get();
+        return implLocate( typeName )->second;
     }
 
 
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index 6eed4d7d06ed..994a415bb8f4 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -464,7 +464,7 @@ css::uno::Reference<css::xforms::XDataTypeRepository> 
SAL_CALL Model::getDataTyp
 
 css::uno::Reference<css::container::XSet> Model::getInstances()
 {
-    return mxInstances.get();
+    return mxInstances;
 }
 
 css::uno::Reference<css::xml::dom::XDocument> Model::getInstanceDocument( 
const OUString& rName )
@@ -514,7 +514,7 @@ css::uno::Reference<css::beans::XPropertySet> 
Model::getBinding( const OUString&
 css::uno::Reference<css::container::XSet> Model::getBindings()
 {
     DBG_INVARIANT();
-    return mxBindings.get();
+    return mxBindings;
 }
 
 
@@ -531,8 +531,8 @@ css::uno::Reference<css::xforms::XSubmission> 
Model::cloneSubmission(const css::
 {
     DBG_INVARIANT();
     css::uno::Reference<css::xforms::XSubmission> xNewSubmission = 
createSubmission();
-    XPropertySet_t xAsPropertySet( xNewSubmission.get() );
-    copy( xSubmission.get(), xAsPropertySet );
+    XPropertySet_t xAsPropertySet( xNewSubmission );
+    copy( xSubmission, xAsPropertySet );
     return xNewSubmission;
 }
 
@@ -548,7 +548,7 @@ css::uno::Reference<css::xforms::XSubmission> 
Model::getSubmission( const OUStri
 css::uno::Reference<css::container::XSet> Model::getSubmissions()
 {
     DBG_INVARIANT();
-    return mxSubmissions.get();
+    return mxSubmissions;
 }
 
 
diff --git a/fpicker/source/office/fpsmartcontent.cxx 
b/fpicker/source/office/fpsmartcontent.cxx
index 99600415f63c..d77fcda0edc1 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -84,7 +84,7 @@ namespace svt
         m_xOwnInteraction = new 
::svt::OFilePickerInteractionHandler(xGlobalInteractionHandler);
         m_xOwnInteraction->enableInterceptions(eInterceptions);
 
-        m_xCmdEnv = new ::ucbhelper::CommandEnvironment( 
m_xOwnInteraction.get(), Reference< XProgressHandler >() );
+        m_xCmdEnv = new ::ucbhelper::CommandEnvironment( m_xOwnInteraction, 
Reference< XProgressHandler >() );
     }
 
 
diff --git a/framework/qa/cppunit/dispatchtest.cxx 
b/framework/qa/cppunit/dispatchtest.cxx
index 0dd6b4cfc33d..5a1b79207046 100644
--- a/framework/qa/cppunit/dispatchtest.cxx
+++ b/framework/qa/cppunit/dispatchtest.cxx
@@ -190,8 +190,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception)
     CPPUNIT_ASSERT(xRegistration.is());
 
     rtl::Reference<MyInterceptor> pInterceptor(new MyInterceptor());
-    xRegistration->registerDispatchProviderInterceptor(
-        
uno::Reference<frame::XDispatchProviderInterceptor>(pInterceptor.get()));
+    xRegistration->registerDispatchProviderInterceptor(pInterceptor);
 
     dispatchCommand(mxComponent, ".uno:Bold", {});
     CPPUNIT_ASSERT_EQUAL(1, pInterceptor->getExpected());
diff --git a/framework/source/fwe/dispatch/interaction.cxx 
b/framework/source/fwe/dispatch/interaction.cxx
index 01411804fb8b..86f1b8d60f8b 100644
--- a/framework/source/fwe/dispatch/interaction.cxx
+++ b/framework/source/fwe/dispatch/interaction.cxx
@@ -151,7 +151,7 @@ css::uno::Any SAL_CALL 
RequestFilterSelect_Impl::getRequest()
 
 css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > 
> SAL_CALL RequestFilterSelect_Impl::getContinuations()
 {
-    return { m_xAbort.get(), m_xFilter.get() };
+    return { m_xAbort, m_xFilter };
 }
 
 RequestFilterSelect::RequestFilterSelect( const OUString& sURL )
@@ -181,7 +181,7 @@ OUString RequestFilterSelect::getFilter() const
 
 uno::Reference < task::XInteractionRequest > RequestFilterSelect::GetRequest()
 {
-    return mxImpl.get();
+    return mxImpl;
 }
 
 namespace {
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx 
b/framework/source/fwe/xml/menudocumenthandler.cxx
index dbc6f7a22444..d1fd63bc2b3b 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -754,7 +754,7 @@ void OWriteMenuDocumentHandler::WriteMenuDocument()
         aRootElement = ELEMENT_NS_MENUBAR;
     else
         aRootElement = ELEMENT_NS_MENUPOPUP;
-    m_xWriteDocumentHandler->startElement( aRootElement, pList.get() );
+    m_xWriteDocumentHandler->startElement( aRootElement, pList );
     m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
 
     WriteMenu( m_xMenuBarContainer );
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx 
b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 94dd1817872f..36cf5da27a48 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -511,7 +511,7 @@ void 
OWriteStatusBarDocumentHandler::WriteStatusBarDocument()
                          m_aAttributeType,
                          XMLNS_XLINK );
 
-    m_xWriteDocumentHandler->startElement( ELEMENT_NS_STATUSBAR, pList.get() );
+    m_xWriteDocumentHandler->startElement( ELEMENT_NS_STATUSBAR, pList );
     m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
 
     sal_Int32  nItemCount = m_aStatusBarItems->getCount();
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx 
b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 8d7b9835c3f4..386da1bc7f53 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -630,7 +630,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument()
                              m_aAttributeType,
                              aUIName );
 
-    m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList.get() );
+    m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList );
     m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
 
     sal_Int32  nItemCount = m_rItemAccess->getCount();
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index 76594a4ec5f3..bdc46b1d73d4 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3414,11 +3414,11 @@ void AutoRecovery::implts_openOneDoc(const OUString&    
           sURL       ,
             }
 
             // introduce model/view/controller to each other
-            xController->attachModel( xModel.get() );
-            xModel->connectController( xController.get() );
-            xTargetFrame->setComponent( xController->getComponentWindow(), 
xController.get() );
+            xController->attachModel( xModel );
+            xModel->connectController( xController );
+            xTargetFrame->setComponent( xController->getComponentWindow(), 
xController );
             xController->attachFrame( xTargetFrame );
-            xModel->setCurrentController( xController.get() );
+            xModel->setCurrentController( xController );
         }
 
         rInfo.Document = xModel.get();
diff --git a/framework/source/uielement/resourcemenucontroller.cxx 
b/framework/source/uielement/resourcemenucontroller.cxx
index 1094874bbcce..c56c91dc35e1 100644
--- a/framework/source/uielement/resourcemenucontroller.cxx
+++ b/framework/source/uielement/resourcemenucontroller.cxx
@@ -282,7 +282,7 @@ void ResourceMenuController::itemActivated( const 
css::awt::MenuEvent& /*rEvent*
         VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( 
m_xPopupMenu );
         m_xMenuBarManager.set( new framework::MenuBarManager(
             m_xContext, m_xFrame, m_xURLTransformer, m_xDispatchProvider, 
m_aModuleName, pAwtMenu->GetMenu(), false, !m_bContextMenu && !m_bInToolbar ) );
-        m_xFrame->addFrameActionListener( m_xMenuBarManager.get() );
+        m_xFrame->addFrameActionListener( m_xMenuBarManager );
     }
 }
 
diff --git a/framework/source/xml/imagesdocumenthandler.cxx 
b/framework/source/xml/imagesdocumenthandler.cxx
index 51352b0296d4..79e95eb87886 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -332,7 +332,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument()
                          m_aAttributeType,
                          XMLNS_XLINK );
 
-    m_xWriteDocumentHandler->startElement( ELEMENT_NS_IMAGESCONTAINER, 
pList.get() );
+    m_xWriteDocumentHandler->startElement( ELEMENT_NS_IMAGESCONTAINER, pList );
     m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
 
     WriteImageList( &m_rImageItemList );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to