[Libreoffice-commits] core.git: stoc/source svl/source svtools/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 16 19:18:52 UTC 2021


 stoc/source/javavm/javavm.cxx                      |    2 +-
 svl/source/numbers/numfmuno.cxx                    |    2 +-
 svl/source/passwordcontainer/passwordcontainer.cxx |    2 +-
 svtools/source/control/ruler.cxx                   |    4 ++--
 svtools/source/control/valueacc.cxx                |    2 +-
 svtools/source/misc/embedhlp.cxx                   |   14 +++++++-------
 svtools/source/uno/unogridcolumnfacade.cxx         |    4 ++--
 svtools/source/uno/unoimap.cxx                     |    4 ++--
 8 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit dfe8ec631426bf317209723c956d373ac146058e
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Tue Feb 16 12:57:01 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Feb 16 20:18:01 2021 +0100

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

diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 1b7a86e712ec..19bce9f5f2cd 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -137,7 +137,7 @@ bool askForRetry(css::uno::Any const & rException)
         {
             rtl::Reference< stoc_javavm::InteractionRequest > xRequest(
                 new stoc_javavm::InteractionRequest(rException));
-            xHandler->handle(xRequest.get());
+            xHandler->handle(xRequest);
             return xRequest->retry();
         }
     }
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index ba3a9e0cbe0d..45e12f8fab31 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -137,7 +137,7 @@ void SAL_CALL SvNumberFormatterServiceObj::attachNumberFormatsSupplier( const un
 uno::Reference<util::XNumberFormatsSupplier> SAL_CALL SvNumberFormatterServiceObj::getNumberFormatsSupplier()
 {
     ::osl::MutexGuard aGuard( m_aMutex );
-    return xSupplier.get();
+    return xSupplier;
 }
 
 sal_Int32 SAL_CALL SvNumberFormatterServiceObj::detectNumberFormat( sal_Int32 nKey, const OUString& aString )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index c5ad78d65106..4a6d8abf4f32 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -782,7 +782,7 @@ OUString PasswordContainer::RequestPasswordFromUser( PasswordRequestMode aRMode,
     {
         ::rtl::Reference< MasterPasswordRequest_Impl > xRequest = new MasterPasswordRequest_Impl( aRMode );
 
-        xHandler->handle( xRequest.get() );
+        xHandler->handle( xRequest );
 
         ::rtl::Reference< ucbhelper::InteractionContinuation > xSelection = xRequest->getSelection();
 
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 170769684ba1..7b1aa9549e8b 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2764,8 +2764,8 @@ uno::Reference< XAccessible > Ruler::CreateAccessible()
             aStr = SvtResId(STR_SVT_ACC_RULER_VERT_NAME);
         }
         mxAccContext = new SvtRulerAccessible( xAccParent, *this, aStr );
-        SetAccessible(mxAccContext.get());
-        return mxAccContext.get();
+        SetAccessible(mxAccContext);
+        return mxAccContext;
     }
     else
         return uno::Reference< XAccessible >();
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 0973f9ff5a15..ff0e18959a9b 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -58,7 +58,7 @@ uno::Reference< accessibility::XAccessible > ValueSetItem::GetAccessible( bool b
     if( !mxAcc.is() )
         mxAcc = new ValueItemAcc( this, bIsTransientChildrenDisabled );
 
-    return mxAcc.get();
+    return mxAcc;
 }
 
 ValueItemAcc::ValueItemAcc( ValueSetItem* pParent, bool bIsTransientChildrenDisabled ) :
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 6536747f1b3a..8146c8fd956a 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -95,16 +95,16 @@ rtl::Reference<EmbedEventListener_Impl> EmbedEventListener_Impl::Create( Embedde
 
     if ( p->GetObject().is() )
     {
-        p->GetObject()->addStateChangeListener( pRet.get() );
+        p->GetObject()->addStateChangeListener( pRet );
 
         uno::Reference < util::XCloseable > xClose = p->GetObject();
         DBG_ASSERT( xClose.is(), "Object does not support XCloseable!" );
         if ( xClose.is() )
-            xClose->addCloseListener( pRet.get() );
+            xClose->addCloseListener( pRet );
 
         uno::Reference < document::XEventBroadcaster > xBrd = p->GetObject();
         if ( xBrd.is() )
-            xBrd->addEventListener( pRet.get() );
+            xBrd->addEventListener( pRet );
 
         pRet->nState = p->GetObject()->getCurrentState();
         if ( pRet->nState == embed::EmbedStates::RUNNING )
@@ -112,7 +112,7 @@ rtl::Reference<EmbedEventListener_Impl> EmbedEventListener_Impl::Create( Embedde
             uno::Reference < util::XModifiable > xMod( p->GetObject()->getComponent(), uno::UNO_QUERY );
             if ( xMod.is() )
                 // listen for changes in running state (update replacements in case of changes)
-                xMod->addModifyListener( pRet.get() );
+                xMod->addModifyListener( pRet );
         }
     }
 
@@ -322,10 +322,10 @@ void EmbeddedObjectRef::Clear()
 {
     if (mpImpl->mxObj.is() && mpImpl->mxListener.is())
     {
-        mpImpl->mxObj->removeStateChangeListener(mpImpl->mxListener.get());
+        mpImpl->mxObj->removeStateChangeListener(mpImpl->mxListener);
 
-        mpImpl->mxObj->removeCloseListener( mpImpl->mxListener.get() );
-        mpImpl->mxObj->removeEventListener( mpImpl->mxListener.get() );
+        mpImpl->mxObj->removeCloseListener( mpImpl->mxListener );
+        mpImpl->mxObj->removeEventListener( mpImpl->mxListener );
 
         if ( mpImpl->bIsLocked )
         {
diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx
index dfb291751e03..c41600ceee3b 100644
--- a/svtools/source/uno/unogridcolumnfacade.cxx
+++ b/svtools/source/uno/unogridcolumnfacade.cxx
@@ -168,7 +168,7 @@ namespace svt::table
         ,m_xGridColumn( i_gridColumn, css::uno::UNO_SET_THROW )
         ,m_pChangeMultiplexer( new ColumnChangeMultiplexer( *this ) )
     {
-        m_xGridColumn->addGridColumnListener( m_pChangeMultiplexer.get() );
+        m_xGridColumn->addGridColumnListener( m_pChangeMultiplexer );
         impl_updateDataColumnIndex_nothrow();
     }
 
@@ -183,7 +183,7 @@ namespace svt::table
         DBG_TESTSOLARMUTEX();
         ENSURE_OR_RETURN_VOID( m_pOwner != nullptr, "UnoGridColumnFacade::dispose: already disposed!" );
 
-        m_xGridColumn->removeGridColumnListener( m_pChangeMultiplexer.get() );
+        m_xGridColumn->removeGridColumnListener( m_pChangeMultiplexer );
         m_pChangeMultiplexer->dispose();
         m_pChangeMultiplexer.clear();
         m_xGridColumn.clear();
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 05863169a3bb..dbd2724e3661 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -497,7 +497,7 @@ void SvUnoImageMapObject::_getPropertyValues( const PropertyMapEntry** ppEntries
 
 Reference< XNameReplace > SAL_CALL SvUnoImageMapObject::getEvents()
 {
-    return mxEvents.get();
+    return mxEvents;
 }
 
 namespace {
@@ -637,7 +637,7 @@ Any SAL_CALL SvUnoImageMap::getByIndex( sal_Int32 nIndex )
     auto aIter = maObjectList.begin();
     std::advance(aIter, nIndex);
 
-    Reference< XPropertySet > xObj( aIter->get() );
+    Reference< XPropertySet > xObj( *aIter );
     return makeAny( xObj );
 }
 


More information about the Libreoffice-commits mailing list