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 /sw/source/filter/ww8 | |
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 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par4.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index ca6c7dc4db8f..6451b5c92377 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -4117,7 +4117,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) const NfKeywordTable & MSWordExportBase::GetNfKeywordTable() { - if (m_pKeyMap.get() == nullptr) + if (m_pKeyMap == nullptr) { m_pKeyMap.reset(new NfKeywordTable); NfKeywordTable & rKeywordTable = *m_pKeyMap; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3435ae2e7292..d06d1de741ed 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -302,17 +302,17 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell const * pDocS xTextMark.reset(new OUString(read_uInt32_lenPrefixed_uInt16s_ToOUString(rStrm))); } - if( !xLongName.get() && xShortName.get() ) + if (!xLongName && xShortName.get()) { xLongName.reset( new OUString ); *xLongName += *xShortName; } - else if( !xLongName.get() && xTextMark.get() ) + else if (!xLongName && xTextMark.get()) xLongName.reset( new OUString ); - if( xLongName.get() ) + if (xLongName) { - if( xTextMark.get() ) + if (xTextMark) { if (xLongName->isEmpty()) *xTextMark = xTextMark->replace('!', '.'); @@ -488,7 +488,7 @@ SdrObject* SwMSDffManager::ImportOLE( sal_uInt32 nOLEId, if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg )) { tools::SvRef<SotStorage> xSrc = xSrcStg->OpenSotStorage( sStorageName ); - OSL_ENSURE(rReader.m_xFormImpl.get(), "No Form Implementation!"); + OSL_ENSURE(rReader.m_xFormImpl, "No Form Implementation!"); css::uno::Reference< css::drawing::XShape > xShape; if ( (!(rReader.m_bIsHeader || rReader.m_bIsFooter)) && rReader.m_xFormImpl->ReadOCXStream(xSrc,&xShape,true)) @@ -6252,7 +6252,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportWW2(SvStream &rStream) ErrCode WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize ) { ErrCode nRet = ERR_SWG_READ_ERROR; - OSL_ENSURE( m_pStorage.get(), "Where is my Storage?" ); + OSL_ENSURE(m_pStorage, "Where is my Storage?"); rRef = m_pStorage->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL); if( rRef.is() ) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 29343e0d092f..87e3ee83c78c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -480,7 +480,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd, { if (!m_xTableDesc) { - OSL_ENSURE(m_xTableDesc.get(), "What!"); + OSL_ENSURE(m_xTableDesc, "What!"); bTestAllowed = false; } else @@ -3481,7 +3481,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) delete pTableWFlyPara; delete pTableSFlyPara; - return m_xTableDesc.get() != nullptr; + return m_xTableDesc != nullptr; } void SwWW8ImplReader::TabCellEnd() @@ -3522,7 +3522,7 @@ void SwWW8ImplReader::PopTableDesc() void SwWW8ImplReader::StopTable() { - OSL_ENSURE(m_xTableDesc.get(), "Panic, stop table with no table!"); + OSL_ENSURE(m_xTableDesc, "Panic, stop table with no table!"); if (!m_xTableDesc) return; @@ -3997,7 +3997,7 @@ void WW8RStyle::ScanStyles() // investigate style dependencies rSI.m_nFilePos = mpStStrm->Tell(); // remember FilePos sal_uInt16 nSkip; std::unique_ptr<WW8_STD> xStd(Read1Style(nSkip, nullptr)); // read STD - rSI.m_bValid = xStd.get() != nullptr; + rSI.m_bValid = xStd != nullptr; if (rSI.m_bValid) { rSI.m_nBase = xStd->istdBase; // remember Basis diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 4732c0c16081..8749367ac965 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -393,7 +393,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, { //Can't put them in headers/footers :-( uno::Reference< drawing::XShape > xRef; - OSL_ENSURE(m_xFormImpl.get(), "Impossible"); + OSL_ENSURE(m_xFormImpl, "Impossible"); if (m_xFormImpl && m_xFormImpl->ReadOCXStream(xSrc1, &xRef)) { pRet = GetSdrObjectFromXShape(xRef); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 0547fb105046..145daf9a60e7 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2531,7 +2531,7 @@ void SwWW8ImplReader::StopApo() { if (!m_xSFlyPara->xMainTextPos) { - OSL_ENSURE(m_xSFlyPara->xMainTextPos.get(), "StopApo: xMainTextPos is nullptr"); + OSL_ENSURE(m_xSFlyPara->xMainTextPos, "StopApo: xMainTextPos is nullptr"); return; } @@ -2573,7 +2573,7 @@ void SwWW8ImplReader::StopApo() if (rBrush.GetColor() != COL_AUTO) aBg = rBrush.GetColor(); - if (m_pLastAnchorPos.get()) + if (m_pLastAnchorPos) { //If the last anchor pos is here, then clear the anchor pos. //This "last anchor pos" is only used for fixing up the diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index b13d36bbe7b1..2487cbb0f9f9 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -643,7 +643,7 @@ bool Tcg::Read(SvStream &rS) bool Tcg::ImportCustomToolBar( SfxObjectShell& rDocSh ) { - if ( tcg.get() ) + if (tcg) return tcg->ImportCustomToolBar( rDocSh ); return false; } |