diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 09:00:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-26 16:57:49 +0200 |
commit | 352bcf4114e1c51d82eb78e6ed4101298b9a4e5b (patch) | |
tree | 2498a404841f6b3d9e558f39ece85c2df86f649d /sw/source | |
parent | e0218ed419378d3c31978bb6765f41e09371dc4f (diff) |
loplugin:virtualdead in sw(2)
Change-Id: Ib948148fa21d595faa8a4a86d4f47243755885ee
Reviewed-on: https://gerrit.libreoffice.org/79588
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/inc/SwXMLTextBlocks.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/inc/swblocks.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/swg/swblocks.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/gloshdl.cxx | 7 |
5 files changed, 3 insertions, 24 deletions
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index 752bc0ad300d..47589cc01d91 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -65,7 +65,6 @@ public: virtual ErrCode PutText( const OUString&, const OUString&, const OUString& ) override; virtual ErrCode MakeBlockList() override; - virtual FileType GetFileType() const override; virtual ErrCode OpenFile( bool bReadOnly = true ) override; virtual void CloseFile() override; diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index a51e7f5b0a95..97af78f8d439 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -78,7 +78,6 @@ protected: XML // XML Block List }; static FileType GetFileType( const OUString& ); - virtual FileType GetFileType() const = 0; virtual void ClearDoc(); // Delete Doc content std::unique_ptr<SwPaM> MakePaM(); // Span PaM over Doc diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 0ad5a1d4bd45..f00a7e58a909 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -461,11 +461,6 @@ bool SwXMLTextBlocks::IsFileUCBStorage( const OUString & rFileName) return bRet; } -SwImpBlocks::FileType SwXMLTextBlocks::GetFileType() const -{ - return FileType::XML; -} - OUString SwXMLTextBlocks::GeneratePackageName ( const OUString& rShort ) { OString sByte(OUStringToOString(rShort, RTL_TEXTENCODING_UTF7)); diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index eaffa5ebaca7..0d388a56d21c 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -260,17 +260,6 @@ void SwTextBlocks::SetName( const OUString& r ) pImp->SetName( r ); } -bool SwTextBlocks::IsOld() const -{ - if (pImp) - { - SwImpBlocks::FileType nType = pImp->GetFileType(); - if (SwImpBlocks::FileType::SW3 == nType) - return true; - } - return false; -} - sal_uInt16 SwTextBlocks::GetCount() const { return pImp ? pImp->GetCount() : 0; @@ -563,7 +552,7 @@ bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMac bool SwTextBlocks::StartPutMuchBlockEntries() { bool bRet = false; - if( !IsOld() && pImp ) + if( pImp ) bRet = pImp->PutMuchEntries( true ); return bRet; } diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index f6f44b872945..0e1d5c46dc6b 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -648,12 +648,9 @@ bool SwGlossaryHdl::IsReadOnly( const OUString* pGrpNm ) const bool SwGlossaryHdl::IsOld() const { - SwTextBlocks *pGlossary = pCurGrp ? pCurGrp.get() - : rStatGlossaries.GetGroupDoc(aCurGrp).release(); - bool bRet = pGlossary && pGlossary->IsOld(); if( !pCurGrp ) - delete pGlossary; - return bRet; + rStatGlossaries.GetGroupDoc(aCurGrp).reset(); + return false; } // find group without path index |