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>
This commit is contained in:
Noel Grandin
2019-09-26 09:00:18 +02:00
parent e0218ed419
commit 352bcf4114
7 changed files with 3 additions and 29 deletions

View File

@@ -220,9 +220,6 @@ slideshow/source/inc/slide.hxx:118
svx/source/inc/docrecovery.hxx:162
void svx::DocRecovery::IRecoveryUpdateListener::start()
empty
sw/source/core/inc/swblocks.hxx:81
enum SwImpBlocks::FileType SwImpBlocks::GetFileType()const
3
vcl/inc/salframe.hxx:145
void SalFrame::SetRepresentedURL(const class rtl::OUString &,)
empty

View File

@@ -319,8 +319,6 @@ public:
OUString GetBaseURL() const;
void SetBaseURL( const OUString& rURL );
bool IsOld() const;
sal_uInt16 GetCount() const; // Get count text modules.
sal_uInt16 GetIndex( const OUString& ) const; // Get index of short names.
sal_uInt16 GetLongIndex( const OUString& ) const; // Get index of long names.

View File

@@ -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;

View File

@@ -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

View File

@@ -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));

View File

@@ -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;
}

View File

@@ -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