From 403c13487c36f4200adf0986c5d11398f719cd7a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Aug 2015 16:28:49 +0200 Subject: loplugin:unusedmethods Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba Reviewed-on: https://gerrit.libreoffice.org/17506 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sot/source/base/object.cxx | 9 --------- sot/source/sdstor/stgavl.cxx | 13 ------------- sot/source/sdstor/stgavl.hxx | 1 - sot/source/sdstor/stgdir.cxx | 23 ----------------------- sot/source/sdstor/stgdir.hxx | 1 - sot/source/sdstor/storage.cxx | 20 -------------------- 6 files changed, 67 deletions(-) (limited to 'sot') diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx index 1cb951b3fbfc..88e457e4bd8e 100644 --- a/sot/source/base/object.cxx +++ b/sot/source/base/object.cxx @@ -42,15 +42,6 @@ SotFactory * SotObject::ClassFactory() return *ppFactory; } -void * SotObject::CreateInstance( SotObject ** ppObj ) -{ - SotObject * p = new SotObject(); - if( ppObj ) - *ppObj = p; - return p; -} - - void * SotObject::Cast( const SotFactory * pFact ) { void * pRet = NULL; diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx index 0b6e20bb3e6a..be26ac00f909 100644 --- a/sot/source/sdstor/stgavl.cxx +++ b/sot/source/sdstor/stgavl.cxx @@ -365,20 +365,7 @@ bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, bool bDel ) // Move node to a different tree. Returns true is found and moved. This routine // may be called when the key has changed. -bool StgAvlNode::Move( StgAvlNode** pRoot1, StgAvlNode** pRoot2, StgAvlNode* pMove ) -{ - if ( !pRoot1 ) - return false; - // special case - empty tree - if( *pRoot1 == NULL ) - return false; - pMove = Rem( pRoot1, pMove, false ); - if( pMove ) - return Insert( pRoot2, pMove ); - else - return false; -} ////////////////////////// class AvlIterator diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx index c59d25af82a9..ad3d44d870ac 100644 --- a/sot/source/sdstor/stgavl.hxx +++ b/sot/source/sdstor/stgavl.hxx @@ -45,7 +45,6 @@ public: StgAvlNode* Find( StgAvlNode* ); static bool Insert( StgAvlNode**, StgAvlNode* ); static bool Remove( StgAvlNode**, StgAvlNode*, bool bDel = true ); - static bool Move( StgAvlNode**, StgAvlNode**, StgAvlNode* ); virtual short Compare( const StgAvlNode* ) const = 0; }; diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index cb88ca5def0f..8af41b05bd1b 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -985,27 +985,4 @@ StgDirEntry* StgDirStrm::Create( StgDirEntry& rStg, const OUString& rName, StgEn return pRes; } -// Rename the given entry. - -bool StgDirStrm::Rename( StgDirEntry& rStg, const OUString& rOld, const OUString& rNew ) -{ - StgDirEntry* p = Find( rStg, rOld ); - if( p ) - { - - if( !StgAvlNode::Remove( reinterpret_cast(&rStg.pDown), p, false ) ) - return false; - p->aEntry.SetName( rNew ); - if( !StgAvlNode::Insert( reinterpret_cast(&rStg.pDown), p ) ) - return false; - p->bRenamed = p->bDirty = true; - return true; - } - else - { - rIo.SetError( SVSTREAM_FILE_NOT_FOUND ); - return false; - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx index e8c3ec7acb90..d810b6d9397f 100644 --- a/sot/source/sdstor/stgdir.hxx +++ b/sot/source/sdstor/stgdir.hxx @@ -103,7 +103,6 @@ public: StgDirEntry* GetRoot() { return pRoot; } StgDirEntry* Find( StgDirEntry&, const OUString& ); StgDirEntry* Create( StgDirEntry&, const OUString&, StgEntryType ); - bool Rename( StgDirEntry&, const OUString&, const OUString& ); }; class StgIterator : public StgAvlIterator diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 70dd249b7a2d..00a4801d0778 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -64,16 +64,6 @@ SotFactory * SotStorageStream::ClassFactory() return *ppFactory; } -void * SotStorageStream::CreateInstance( SotObject ** ppObj ) -{ - SotStorageStream * p = new SotStorageStream(); - SotObject* pSuper1 = p; - SotObject* pBasicObj = pSuper1; - if( ppObj ) - *ppObj = pBasicObj; - return p; -} - void * SotStorageStream::Cast( const SotFactory * pFact ) { void * pRet = NULL; @@ -323,16 +313,6 @@ SotFactory * SotStorage::ClassFactory() return *ppFactory; } -void * SotStorage::CreateInstance( SotObject ** ppObj ) -{ - SotStorage * p = new SotStorage(); - SotObject* pSuper1 = p; - SotObject* pBasicObj = pSuper1; - if( ppObj ) - *ppObj = pBasicObj; - return p; -} - void * SotStorage::Cast( const SotFactory * pFact ) { void * pRet = NULL; -- cgit