From 802765dbe5f79748453c985da08824fb9ddefe11 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Jan 2016 16:31:47 +0200 Subject: loplugin:unusedmethods unused return value in oox,package Change-Id: I63862c3ce32a1106b7de037f422e7e5480e8bfd6 --- package/inc/ByteGrabber.hxx | 2 +- package/inc/ZipFile.hxx | 2 +- package/source/xstor/xstorage.cxx | 4 +--- package/source/xstor/xstorage.hxx | 2 +- package/source/zipapi/ByteGrabber.cxx | 3 +-- package/source/zipapi/ZipFile.cxx | 6 ++---- 6 files changed, 7 insertions(+), 12 deletions(-) (limited to 'package') diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx index ffa112c871ab..195606539e96 100644 --- a/package/inc/ByteGrabber.hxx +++ b/package/inc/ByteGrabber.hxx @@ -51,7 +51,7 @@ public: sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException); // XSeekable - sal_Int64 SAL_CALL seek( sal_Int64 location ) + void SAL_CALL seek( sal_Int64 location ) throw(css::lang::IllegalArgumentException, css::io::IOException, css::uno::RuntimeException); sal_Int64 SAL_CALL getPosition( ) throw(css::io::IOException, css::uno::RuntimeException); diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index d49fcab233bc..624593f39075 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -180,7 +180,7 @@ protected: throw(css::io::IOException, css::packages::zip::ZipException, css::uno::RuntimeException); sal_Int32 findEND() throw(css::io::IOException, css::packages::zip::ZipException, css::uno::RuntimeException); - sal_Int32 recover() + void recover() throw(css::io::IOException, css::packages::zip::ZipException, css::uno::RuntimeException); }; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 669d8075d2cd..1e4d79f700f2 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1409,7 +1409,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr return pNewElement; } -SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const uno::Reference< io::XInputStream >& xInStream ) +void OStorage_Impl::InsertRawStream( const OUString& aName, const uno::Reference< io::XInputStream >& xInStream ) { // insert of raw stream means insert and commit SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" ); @@ -1447,8 +1447,6 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un m_aChildrenList.push_back( pNewElement ); m_bIsModified = true; m_bBroadcastModified = true; - - return pNewElement; } OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode ) diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index e5130e288eeb..c0e7e48fec15 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -234,7 +234,7 @@ struct OStorage_Impl SotElement_Impl* FindElement( const OUString& rName ); SotElement_Impl* InsertStream( const OUString& aName, bool bEncr ); - SotElement_Impl* InsertRawStream( const OUString& aName, const css::uno::Reference< css::io::XInputStream >& xInStream ); + void InsertRawStream( const OUString& aName, const css::uno::Reference< css::io::XInputStream >& xInStream ); OStorage_Impl* CreateNewStorageImpl( sal_Int32 nStorageMode ); SotElement_Impl* InsertStorage( const OUString& aName, sal_Int32 nStorageMode ); diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx index 4fb1f029e1b4..a6f23645cc60 100644 --- a/package/source/zipapi/ByteGrabber.cxx +++ b/package/source/zipapi/ByteGrabber.cxx @@ -62,7 +62,7 @@ sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, } // XSeekable chained... -sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) +void SAL_CALL ByteGrabber::seek( sal_Int64 location ) throw(lang::IllegalArgumentException, io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -74,7 +74,6 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) if (location > nLen ) location = nLen; xSeek->seek( location ); - return location; } else throw io::IOException(THROW_WHERE ); diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 236df7192364..670513b270a6 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -860,7 +860,7 @@ sal_Int32 ZipFile::readCEN() return nCenPos; } -sal_Int32 ZipFile::recover() +void ZipFile::recover() throw(IOException, ZipException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -872,7 +872,7 @@ sal_Int32 ZipFile::recover() { nLength = aGrabber.getLength(); if (nLength == 0 || nLength < ENDHDR) - return -1; + return; aGrabber.seek( 0 ); @@ -1021,8 +1021,6 @@ sal_Int32 ZipFile::recover() nGenPos += nPos; aGrabber.seek( nGenPos ); } - - return 0; } catch ( IllegalArgumentException& ) { -- cgit v1.2.3