[Libreoffice-commits] core.git: sdext/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 18 08:14:39 UTC 2021


 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(-)

New commits:
commit 6cb2365511e23abd22f76cda76981222b81efdc4
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Wed Feb 17 18:23:31 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 18 09:13:48 2021 +0100

    loplugin:referencecasting in sdext
    
    Change-Id: I24514eefb96d04576eed45608c259b2f8dbeda7b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111078
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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<XAccessible> SAL_CALL
     if (nIndex<0 || nIndex>=sal_Int32(maChildren.size()))
         throw lang::IndexOutOfBoundsException("invalid child index", static_cast<uno::XWeak*>(this));
 
-    return Reference<XAccessible>(maChildren[nIndex].get());
+    return maChildren[nIndex];
 }
 
 Reference<XAccessible> SAL_CALL
@@ -1367,7 +1367,7 @@ Reference<XAccessibleRelationSet> SAL_CALL
         }
     }
 
-    return Reference<XAccessibleRelationSet>(pSet.get());
+    return pSet;
 }
 
 //----- XAccessibleText -------------------------------------------------------
@@ -1684,7 +1684,7 @@ rtl::Reference<PresenterAccessible::AccessibleObject> AccessibleNotes::Create (
     pObject->UpdateStateSet();
     pObject->SetWindow(rxContentWindow, rxBorderWindow);
 
-    return rtl::Reference<PresenterAccessible::AccessibleObject>(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<frame::XDispatch> PresenterProtocolHandler::Dispatch::Create (
 {
     ::rtl::Reference<Dispatch> pDispatch (new Dispatch (rsURLPath, rpPresenterController));
     if (pDispatch->mpCommand != nullptr)
-        return Reference<frame::XDispatch>(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<Button> pElement (new Button(rpToolBar));
     pElement->Initialize();
-    return ::rtl::Reference<Element>(pElement.get());
+    return pElement;
 }
 
 Button::Button (
@@ -1765,7 +1765,7 @@ void TimeLabel::ConnectToTimer()
 {
     ::rtl::Reference<TimeLabel> pElement(new CurrentTimeLabel(rpToolBar));
     pElement->ConnectToTimer();
-    return ::rtl::Reference<Element>(pElement.get());
+    return pElement;
 }
 
 CurrentTimeLabel::~CurrentTimeLabel()
@@ -1802,7 +1802,7 @@ void CurrentTimeLabel::SetModes (
 {
     ::rtl::Reference<TimeLabel> pElement(new PresentationTimeLabel(rpToolBar));
     pElement->ConnectToTimer();
-    return ::rtl::Reference<Element>(pElement.get());
+    return pElement;
 }
 
 PresentationTimeLabel::~PresentationTimeLabel()
diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx
index 6a59a32935d7..01b40d6e2ab8 100644
--- a/sdext/source/presenter/PresenterViewFactory.cxx
+++ b/sdext/source/presenter/PresenterViewFactory.cxx
@@ -355,7 +355,7 @@ Reference<XView> PresenterViewFactory::CreateSlideShowView(
                 Reference<frame::XController>(mxControllerWeak),
                 mpPresenterController));
         pShowView->LateInit();
-        xView.set(pShowView.get());
+        xView = pShowView;
     }
     catch (RuntimeException&)
     {


More information about the Libreoffice-commits mailing list