diff --git a/configmgr/source/misc/oslstream.cxx b/configmgr/source/misc/oslstream.cxx index 8aaeb2051577..a2acee95e5d4 100644 --- a/configmgr/source/misc/oslstream.cxx +++ b/configmgr/source/misc/oslstream.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: oslstream.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -209,102 +209,6 @@ void SAL_CALL OSLOutputStreamWrapper::closeOutput() throw( stario::NotConnectedE rFile.close(); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -// ----------------------------- Buffered OSLStream ----------------------------- -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------ -/* -BufferedFileInputStream::BufferedFileInputStream( File& _rFile ) - :m_pFile(&_rFile) - ,m_bFileOwner(sal_False) -{ -} -*/ -//------------------------------------------------------------------ -BufferedFileInputStream::BufferedFileInputStream( rtl::OUString const & aFileURL) -: m_aFile( aFileURL ) -{ - osl::File::RC rc = m_aFile.open(osl_File_OpenFlag_Read); - if (rc != File::E_None) - raiseIOException(rc,NULL); -} - -//------------------------------------------------------------------ -BufferedFileInputStream::~BufferedFileInputStream() -{ -} - -//------------------------------------------------------------------------------ -sal_Int32 SAL_CALL BufferedFileInputStream::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) - throw( stario::NotConnectedException, stario::BufferSizeExceededException, - stario::IOException, staruno::RuntimeException ) -{ - if (nBytesToRead < 0) - raiseIOException(osl::File::E_INVAL, *this); - - aData.realloc(nBytesToRead); - - sal_uInt64 nSize = sal_uInt64(nBytesToRead); - sal_uInt64 nRead = 0; - - File::RC rc = m_aFile.read(aData.getArray(), nSize, nRead); - if (rc != File::E_None) - raiseIOException(rc,*this); - - OSL_ASSERT(nRead <= nSize); - return sal_Int32(nRead); -} - -//------------------------------------------------------------------------------ -sal_Int32 SAL_CALL BufferedFileInputStream::readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) - throw( stario::NotConnectedException, stario::BufferSizeExceededException, - stario::IOException, staruno::RuntimeException ) -{ - return readBytes(aData, nMaxBytesToRead); -} - -//------------------------------------------------------------------------------ -void SAL_CALL BufferedFileInputStream::skipBytes(sal_Int32 nBytesToSkip) - throw( stario::NotConnectedException, stario::BufferSizeExceededException, - stario::IOException, staruno::RuntimeException ) -{ - if (nBytesToSkip < 0) - raiseIOException(osl::File::E_INVAL, *this); - - sal_uInt64 nOffset = sal_uInt64(nBytesToSkip); - - File::RC rc = m_aFile.setPos(osl_Pos_Current, nOffset); - if (rc != File::E_None) - raiseIOException(rc,*this); -} - -//------------------------------------------------------------------------------ -sal_Int32 SAL_CALL BufferedFileInputStream::available() - throw( stario::NotConnectedException, stario::IOException, staruno::RuntimeException ) -{ - sal_uInt64 avail = 0; - File::RC rc = m_aFile.available(avail); - if (rc != File::E_None) - raiseIOException(rc,*this); - - sal_Int32 result = sal_Int32(avail); - if (result < 0 || sal_uInt64(result) < avail) - result = SAL_MAX_INT32; - - return result; -} - -//------------------------------------------------------------------------------ -void SAL_CALL BufferedFileInputStream::closeInput() - throw( stario::NotConnectedException, stario::IOException, staruno::RuntimeException ) -{ - File::RC rc = m_aFile.close(); - if (rc != File::E_None) - raiseIOException(rc,*this); -} - //------------------------------------------------------------------ //------------------------------------------------------------------ BufferedFileOutputStream::BufferedFileOutputStream( rtl::OUString const & aFileURL, bool bCreate, sal_uInt32 nBufferSizeHint) diff --git a/configmgr/source/misc/requestoptions.cxx b/configmgr/source/misc/requestoptions.cxx index 835087dabbf3..984f61e9b1f7 100644 --- a/configmgr/source/misc/requestoptions.cxx +++ b/configmgr/source/misc/requestoptions.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: requestoptions.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -38,33 +38,6 @@ namespace configmgr { -// --------------------------------------------------------------------------- - -#if 0 // not used any more - static sal_Int32 getNextCacheID() - { - static oslInterlockedCount nNextID = 0; - - oslInterlockedCount nNewID = osl_incrementInterlockedCount(&nNextID); - - if (nNewID == 0) - { - CFG_TRACE_WARNING("Cache ID overflow - restarting sequence !"); - OSL_ENSURE(false, "Cache ID overflow - restarting sequence !"); - } - - return static_cast(nNewID); - } -#endif -// --------------------------------------------------------------------------- - - RequestOptions RequestOptions::forAllLocales() - { - RequestOptions aResult; - aResult.setAllLocales(); - return aResult; - } - // --------------------------------------------------------------------------- RequestOptions::LocaleString RequestOptions::getIsoLocale() const @@ -105,12 +78,6 @@ namespace configmgr } // --------------------------------------------------------------------------- - sal_Int32 RequestOptions::hashCode() const - { - return hashRequestLocale(m_sLocale) ^ m_sEntity.hashCode(); - } -// --------------------------------------------------------------------------- - static inline sal_Int32 compareRequestLocale(RequestOptions::Locale const& lhs, RequestOptions::Locale const& rhs) {