diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-14 11:37:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-14 15:18:22 +0200 |
commit | ed617a7e6caf8a7f9f0f67bceb1280f61f5428c8 (patch) | |
tree | ade300688af3efc358bc56da55065822e6fd5bcb /sw | |
parent | 015dc88a595c1c92d2b724cd868aecb07199f995 (diff) |
loplugin:unusedmethods
Change-Id: I7787a8eedf500b0b16c04114935d3d3124d9ac3d
Reviewed-on: https://gerrit.libreoffice.org/74032
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-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 | 53 |
3 files changed, 0 insertions, 55 deletions
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index d4cfd8030c77..752bc0ad300d 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -58,7 +58,6 @@ public: virtual ~SwXMLTextBlocks() override; virtual ErrCode Delete( sal_uInt16 ) override; virtual ErrCode Rename( sal_uInt16, const OUString&, const OUString& ) override; - virtual ErrCode CopyBlock( SwImpBlocks& rImp, OUString& rShort, const OUString& rLong) override; virtual void ClearDoc() override; virtual ErrCode GetDoc( sal_uInt16 ) override; virtual ErrCode BeginPutDoc( const OUString&, const OUString& ) override; diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index 9043fb85a2c2..a51e7f5b0a95 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -108,7 +108,6 @@ public: virtual ErrCode Delete( sal_uInt16 ) = 0; virtual ErrCode Rename( sal_uInt16, const OUString&, const OUString& ) = 0; - virtual ErrCode CopyBlock( SwImpBlocks& rImp, OUString& rShort, const OUString& rLong) = 0; virtual ErrCode GetDoc( sal_uInt16 ) = 0; virtual ErrCode BeginPutDoc( const OUString&, const OUString& ) = 0; virtual ErrCode PutDoc() = 0; diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index b5aa656dc7c3..78ff47515f5f 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -234,59 +234,6 @@ ErrCode SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const OUString& rNewShort, con return ERRCODE_NONE; } -ErrCode SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, OUString& rShort, - const OUString& rLong) -{ - ErrCode nError = ERRCODE_NONE; - OpenFile(); - rDestImp.OpenFile(false); - const OUString aGroup( rShort ); - bool bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup ); - sal_uInt16 nIndex = GetIndex ( rShort ); - OUString sPackageName( GetPackageName (nIndex) ); - OUString sDestShortName( sPackageName ); - sal_uInt16 nIdx = 0; - - OSL_ENSURE( xBlkRoot.is(), "No storage set" ); - if(!xBlkRoot.is()) - return ERR_SWG_WRITE_ERROR; - - uno::Reference < container::XNameAccess > xAccess( static_cast<SwXMLTextBlocks&>(rDestImp).xBlkRoot, uno::UNO_QUERY ); - while ( xAccess->hasByName( sDestShortName ) ) - { - ++nIdx; - // If someone is that crazy ... - if(USHRT_MAX == nIdx) - { - CloseFile(); - rDestImp.CloseFile(); - return ERR_SWG_WRITE_ERROR; - } - sDestShortName = sPackageName + OUString::number( nIdx ); - } - - try - { - uno::Reference < embed::XStorage > rSourceRoot = xBlkRoot->openStorageElement( aGroup, embed::ElementModes::READ ); - uno::Reference < embed::XStorage > rDestRoot = static_cast<SwXMLTextBlocks&>(rDestImp).xBlkRoot->openStorageElement( sDestShortName, embed::ElementModes::READWRITE ); - rSourceRoot->copyToStorage( rDestRoot ); - } - catch (const uno::Exception&) - { - nError = ERR_SWG_WRITE_ERROR; - } - - if(!nError) - { - rShort = sDestShortName; - static_cast<SwXMLTextBlocks&>(rDestImp).AddName( rShort, rLong, bTextOnly ); - static_cast<SwXMLTextBlocks&>(rDestImp).MakeBlockList(); - } - CloseFile(); - rDestImp.CloseFile(); - return nError; -} - ErrCode SwXMLTextBlocks::StartPutBlock( const OUString& rShort, const OUString& rPackageName ) { OSL_ENSURE( xBlkRoot.is(), "No storage set" ); |