diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-16 15:23:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-17 08:25:47 +0200 |
commit | ccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch) | |
tree | 2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /sfx2 | |
parent | da5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff) |
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer
Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd
Reviewed-on: https://gerrit.libreoffice.org/61837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
7 files changed, 13 insertions, 17 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index a5abc61b5022..0dad602c85b1 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -269,7 +269,7 @@ namespace // previously for (std::unique_ptr<SfxFilterMatcher_Impl>& aImpl : aImplArr) if (aImpl->aName == aName) - return *aImpl.get(); + return *aImpl; // first Matcher created for this factory aImplArr.push_back(o3tl::make_unique<SfxFilterMatcher_Impl>(aName)); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index d85b1b38ff6f..26dcd99f3bc9 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2335,8 +2335,8 @@ FileDialogHelper::FileDialogHelper( aWildcard += aExtName; - OUString const aUIString = ::sfx2::addExtension( aFilterUIName, - aWildcard, (OPEN == lcl_OpenOrSave(mpImpl->m_nDialogType)), *mpImpl.get()); + OUString const aUIString = ::sfx2::addExtension( + aFilterUIName, aWildcard, (OPEN == lcl_OpenOrSave(mpImpl->m_nDialogType)), *mpImpl); AddFilter( aUIString, aWildcard ); } @@ -2401,11 +2401,7 @@ void FileDialogHelper::StartExecuteModal( const Link<FileDialogHelper*,void>& rE mpImpl->implStartExecute(); } - -short FileDialogHelper::GetDialogType() const -{ - return mpImpl.get() ? mpImpl->m_nDialogType : 0; -} +short FileDialogHelper::GetDialogType() const { return mpImpl ? mpImpl->m_nDialogType : 0; } bool FileDialogHelper::IsPasswordEnabled() const { @@ -2415,7 +2411,7 @@ bool FileDialogHelper::IsPasswordEnabled() const OUString FileDialogHelper::GetRealFilter() const { OUString sFilter; - if ( mpImpl.get() ) + if (mpImpl) mpImpl->getRealFilter( sFilter ); return sFilter; } diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 45a2ccc0bb00..d04d2166a686 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -418,16 +418,16 @@ SfxSecurityPage::SfxSecurityPage(TabPageParent pParent, const SfxItemSet& rItemS bool SfxSecurityPage::FillItemSet( SfxItemSet * /*rItemSet*/ ) { bool bModified = false; - DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" ); - if (m_pImpl.get() != nullptr) + DBG_ASSERT(m_pImpl, "implementation pointer is 0. Still in c-tor?"); + if (m_pImpl != nullptr) bModified = m_pImpl->FillItemSet_Impl(); return bModified; } void SfxSecurityPage::Reset( const SfxItemSet * /*rItemSet*/ ) { - DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" ); - if (m_pImpl.get() != nullptr) + DBG_ASSERT(m_pImpl, "implementation pointer is 0. Still in c-tor?"); + if (m_pImpl != nullptr) m_pImpl->Reset_Impl(); } diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index e15df3ed4c9c..80fef06c55b8 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -196,7 +196,7 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile const * pMetaFile GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); - if (rFilter.compressAsPNG(aResultBitmap, *pStream.get()) != ERRCODE_NONE) + if (rFilter.compressAsPNG(aResultBitmap, *pStream) != ERRCODE_NONE) return false; pStream->Flush(); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 554fb0100cf3..cb0c0be5e166 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3651,7 +3651,7 @@ bool SfxObjectShell::QueryAllowExoticFormat_Impl( const uno::Reference< task::XI rtl::Reference<ExoticFileLoadException> xException(new ExoticFileLoadException( rURL, rFilterUIName )); uno::Reference< task::XInteractionRequest > xReq( xException.get() ); xHandler->handle( xReq ); - return xException.get()->isApprove(); + return xException->isApprove(); } // No interaction handler, default is to continue to load return true; diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index a03e3b7ddd95..8c0e1643a0fc 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -575,7 +575,7 @@ bool SfxObjectShell::PrepareClose // Ask if to save short nRet = RET_YES; { - const Reference< XTitle > xTitle( *pImpl->pBaseModel.get(), UNO_QUERY_THROW ); + const Reference<XTitle> xTitle(*pImpl->pBaseModel, UNO_QUERY_THROW); const OUString sTitle = xTitle->getTitle (); nRet = ExecuteQuerySaveDocument(pFrame->GetWindow().GetFrameWeld(), sTitle); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index f38ee6396902..f8522be05d08 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1438,7 +1438,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC, bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey) { - if (!pImpl->m_xAccExec.get()) + if (!pImpl->m_xAccExec) { pImpl->m_xAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper(); pImpl->m_xAccExec->init(::comphelper::getProcessComponentContext(), |