From 705e5fe94769415cfca60c73eebb8232464645b2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 18 Nov 2011 08:56:49 +0000 Subject: callcatcher: remove some unused code --- comphelper/inc/comphelper/oslfile2streamwrap.hxx | 2 -- comphelper/source/streaming/oslfile2streamwrap.cxx | 27 +--------------------- 2 files changed, 1 insertion(+), 28 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/oslfile2streamwrap.hxx b/comphelper/inc/comphelper/oslfile2streamwrap.hxx index d62ca3db4108..e817be98d456 100644 --- a/comphelper/inc/comphelper/oslfile2streamwrap.hxx +++ b/comphelper/inc/comphelper/oslfile2streamwrap.hxx @@ -48,11 +48,9 @@ class COMPHELPER_DLLPUBLIC OSLInputStreamWrapper : public ::cppu::WeakImplHelper { ::osl::Mutex m_aMutex; ::osl::File* m_pFile; - sal_Bool m_bFileOwner : 1; public: OSLInputStreamWrapper(::osl::File& _rStream); - OSLInputStreamWrapper(::osl::File* pStream, sal_Bool bOwner=sal_False); virtual ~OSLInputStreamWrapper(); // stario::XInputStream diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index 68af33298336..81951b546c81 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -38,23 +38,13 @@ namespace comphelper //------------------------------------------------------------------ OSLInputStreamWrapper::OSLInputStreamWrapper( File& _rFile ) - :m_pFile(&_rFile) - ,m_bFileOwner(sal_False) -{ -} - -//------------------------------------------------------------------ -OSLInputStreamWrapper::OSLInputStreamWrapper( File* pStream, sal_Bool bOwner ) - :m_pFile( pStream ) - ,m_bFileOwner( bOwner ) + : m_pFile(&_rFile) { } //------------------------------------------------------------------ OSLInputStreamWrapper::~OSLInputStreamWrapper() { - if( m_bFileOwner ) - delete m_pFile; } //------------------------------------------------------------------------------ @@ -92,14 +82,6 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(staruno::Sequence< sal_I if (nMaxBytesToRead < 0) throw stario::BufferSizeExceededException(::rtl::OUString(),static_cast(this)); - /* - if (m_pFile->IsEof()) - { - aData.realloc(0); - return 0; - } - else - */ return readBytes(aData, nMaxBytesToRead); } @@ -119,11 +101,6 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw( st { throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); } - -#ifdef DBG_UTIL - m_pFile->getPos(nCurrentPos); -// volatile int dummy = 0; // to take a look at last changes ;-) -#endif } //------------------------------------------------------------------------------ @@ -163,8 +140,6 @@ void SAL_CALL OSLInputStreamWrapper::closeInput() throw( stario::NotConnectedExc throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); m_pFile->close(); - if (m_bFileOwner) - delete m_pFile; m_pFile = NULL; } -- cgit