From 6cb2365511e23abd22f76cda76981222b81efdc4 Mon Sep 17 00:00:00 2001 From: Noel Date: Wed, 17 Feb 2021 18:23:31 +0200 Subject: loplugin:referencecasting in sdext Change-Id: I24514eefb96d04576eed45608c259b2f8dbeda7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111078 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sdext/source/pdfimport/misc/pwdinteract.cxx | 2 +- sdext/source/presenter/PresenterAccessibility.cxx | 8 ++++---- sdext/source/presenter/PresenterProtocolHandler.cxx | 2 +- sdext/source/presenter/PresenterToolBar.cxx | 6 +++--- sdext/source/presenter/PresenterViewFactory.cxx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx index 4eb7e7d96281..4179795cc073 100644 --- a/sdext/source/pdfimport/misc/pwdinteract.cxx +++ b/sdext/source/pdfimport/misc/pwdinteract.cxx @@ -161,7 +161,7 @@ bool getPassword( const uno::Reference< task::XInteractionHandler >& xHandler, new PDFPasswordRequest( bFirstTry, rDocName ) ); try { - xHandler->handle( xReq.get() ); + xHandler->handle( xReq ); } catch( uno::Exception& ) { diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 936c75df35f7..768f4717a48d 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -617,7 +617,7 @@ void PresenterAccessible::UpdateAccessibilityHierarchy ( mxNotesContentWindow, mxNotesBorderWindow, rpNotesTextView); - mpAccessibleConsole->AddChild(mpAccessibleNotes.get()); + mpAccessibleConsole->AddChild(mpAccessibleNotes); } } @@ -809,7 +809,7 @@ Reference SAL_CALL if (nIndex<0 || nIndex>=sal_Int32(maChildren.size())) throw lang::IndexOutOfBoundsException("invalid child index", static_cast(this)); - return Reference(maChildren[nIndex].get()); + return maChildren[nIndex]; } Reference SAL_CALL @@ -1367,7 +1367,7 @@ Reference SAL_CALL } } - return Reference(pSet.get()); + return pSet; } //----- XAccessibleText ------------------------------------------------------- @@ -1684,7 +1684,7 @@ rtl::Reference AccessibleNotes::Create ( pObject->UpdateStateSet(); pObject->SetWindow(rxContentWindow, rxBorderWindow); - return rtl::Reference(pObject.get()); + return pObject; } void AccessibleNotes::SetTextView ( diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx index ff2cf4f251c5..0ee967ffe063 100644 --- a/sdext/source/presenter/PresenterProtocolHandler.cxx +++ b/sdext/source/presenter/PresenterProtocolHandler.cxx @@ -340,7 +340,7 @@ Reference PresenterProtocolHandler::Dispatch::Create ( { ::rtl::Reference pDispatch (new Dispatch (rsURLPath, rpPresenterController)); if (pDispatch->mpCommand != nullptr) - return Reference(pDispatch.get()); + return pDispatch; else return nullptr; } diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index db679d94d4ee..1c70661879df 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1403,7 +1403,7 @@ namespace { { ::rtl::Reference