Revert "Fix typo in code"

This reverts commit 3ed9bba283a6a67864c0928186e277240be0d9ba.  osl_Pos_Absolut
(include/osl/file.h) is part of the stable URE interface; it must not be changed.

Change-Id: I1f49923a9351e4be5aee39b10720d38b424feb9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110435
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2021-02-05 11:10:34 +01:00
parent cb4ba42fbf
commit 0ce7c84cc7
21 changed files with 48 additions and 48 deletions

View File

@ -239,7 +239,7 @@ sal_uInt64 OslStream::SeekPos( sal_uInt64 nPos )
} }
else else
{ {
rc = maFile.setPos( osl_Pos_Absolute, nPos ); rc = maFile.setPos( osl_Pos_Absolut, nPos );
} }
OSL_VERIFY(rc == ::osl::FileBase::E_None); OSL_VERIFY(rc == ::osl::FileBase::E_None);
sal_uInt64 nRealPos(0); sal_uInt64 nRealPos(0);

View File

@ -70,7 +70,7 @@ namespace
// set offset in source file - should be zero due to crc32 should // set offset in source file - should be zero due to crc32 should
// only be needed to be created for new entries, gets loaded with old // only be needed to be created for new entries, gets loaded with old
// ones // ones
if (osl::File::E_None == rCandidate->setPos(osl_Pos_Absolute, sal_Int64(nOffset))) if (osl::File::E_None == rCandidate->setPos(osl_Pos_Absolut, sal_Int64(nOffset)))
{ {
while (nSize != 0) while (nSize != 0)
{ {
@ -815,7 +815,7 @@ namespace
sal_uInt64 nSize(getPackFileSize()); sal_uInt64 nSize(getPackFileSize());
// set offset in source file - when this is zero, a new file is to be added // set offset in source file - when this is zero, a new file is to be added
if (osl::File::E_None == maFile->setPos(osl_Pos_Absolute, sal_Int64(getOffset()))) if (osl::File::E_None == maFile->setPos(osl_Pos_Absolut, sal_Int64(getOffset())))
{ {
while (nSize != 0) while (nSize != 0)
{ {
@ -856,7 +856,7 @@ namespace
if (Z_OK == deflateInit(zstream.get(), Z_BEST_COMPRESSION)) if (Z_OK == deflateInit(zstream.get(), Z_BEST_COMPRESSION))
{ {
// set offset in source file - when this is zero, a new file is to be added // set offset in source file - when this is zero, a new file is to be added
if (osl::File::E_None == maFile->setPos(osl_Pos_Absolute, sal_Int64(getOffset()))) if (osl::File::E_None == maFile->setPos(osl_Pos_Absolut, sal_Int64(getOffset())))
{ {
bool bOkay(true); bool bOkay(true);
@ -939,7 +939,7 @@ namespace
if (Z_OK == inflateInit(zstream.get())) if (Z_OK == inflateInit(zstream.get()))
{ {
// set offset in source file - when this is zero, a new file is to be added // set offset in source file - when this is zero, a new file is to be added
if (osl::File::E_None == maFile->setPos(osl_Pos_Absolute, sal_Int64(getOffset()))) if (osl::File::E_None == maFile->setPos(osl_Pos_Absolut, sal_Int64(getOffset())))
{ {
bool bOkay(true); bool bOkay(true);
@ -1314,7 +1314,7 @@ namespace
if (bRetval) if (bRetval)
{ {
// seek back to header start (at position 8) // seek back to header start (at position 8)
if (osl_File_E_None != osl_setFilePos(aHandle, osl_Pos_Absolute, sal_Int64(8))) if (osl_File_E_None != osl_setFilePos(aHandle, osl_Pos_Absolut, sal_Int64(8)))
{ {
bRetval = false; bRetval = false;
} }

View File

@ -90,7 +90,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip)
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip; sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip;
eError = m_pFile->setPos(osl_Pos_Absolute, nNewPos); eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos);
if (eError != FileBase::E_None) if (eError != FileBase::E_None)
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
} }
@ -116,7 +116,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::available()
throw css::io::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this));
nAvailable = nAvailable - nPos; nAvailable = nAvailable - nPos;
eError = m_pFile->setPos(osl_Pos_Absolute, nPos); eError = m_pFile->setPos(osl_Pos_Absolut, nPos);
if (eError != FileBase::E_None) if (eError != FileBase::E_None)
throw css::io::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this)); throw css::io::NotConnectedException(OUString(),static_cast<css::uno::XWeak*>(this));
return std::min<sal_Int64>(nAvailable, SAL_MAX_INT32); return std::min<sal_Int64>(nAvailable, SAL_MAX_INT32);

View File

@ -160,7 +160,7 @@ void PersistentMap::readAll()
{ {
// prepare for re-reading the map-file // prepare for re-reading the map-file
m_entries.clear(); m_entries.clear();
const osl::FileBase::RC nRes = m_MapFile.setPos( osl_Pos_Absolute, 0); const osl::FileBase::RC nRes = m_MapFile.setPos( osl_Pos_Absolut, 0);
if (nRes != osl::FileBase::E_None) if (nRes != osl::FileBase::E_None)
{ {
SAL_WARN("desktop.deployment", "setPos failed with " << +nRes); SAL_WARN("desktop.deployment", "setPos failed with " << +nRes);
@ -223,7 +223,7 @@ void PersistentMap::flush()
return; return;
// write header magic // write header magic
const osl::FileBase::RC nRes = m_MapFile.setPos( osl_Pos_Absolute, 0); const osl::FileBase::RC nRes = m_MapFile.setPos( osl_Pos_Absolut, 0);
if (nRes != osl::FileBase::E_None) if (nRes != osl::FileBase::E_None)
{ {
SAL_WARN("desktop.deployment", "setPos failed with " << +nRes); SAL_WARN("desktop.deployment", "setPos failed with " << +nRes);

View File

@ -693,7 +693,7 @@ typedef void *oslFileHandle;
SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile( SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags ); rtl_uString *pustrFileURL, oslFileHandle *pHandle, sal_uInt32 uFlags );
#define osl_Pos_Absolute 1 #define osl_Pos_Absolut 1
#define osl_Pos_Current 2 #define osl_Pos_Current 2
#define osl_Pos_End 3 #define osl_Pos_End 3
@ -703,7 +703,7 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_openFile(
Handle to a file received by a previous call to osl_openFile(). Handle to a file received by a previous call to osl_openFile().
@param[in] uHow @param[in] uHow
How to calculate the offset - osl_Pos_Absolute means start at the How to calculate the offset - osl_Pos_Absolut means start at the
beginning of the file, osl_Pos_Current means offset from the current beginning of the file, osl_Pos_Current means offset from the current
seek position and osl_Pos_End means the offset will be negative and seek position and osl_Pos_End means the offset will be negative and
the position will be calculated backwards from the end of the file by the position will be calculated backwards from the end of the file by

View File

@ -1549,7 +1549,7 @@ oslFileError SAL_CALL osl_setFilePos(oslFileHandle Handle, sal_uInt32 uHow, sal_
FileHandle_Impl::Guard lock(&(pImpl->m_mutex)); FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
switch (uHow) switch (uHow)
{ {
case osl_Pos_Absolute: case osl_Pos_Absolut:
if (nOffset < 0) if (nOffset < 0)
return osl_File_E_INVAL; return osl_File_E_INVAL;
break; break;

View File

@ -976,7 +976,7 @@ oslFileError SAL_CALL osl_setFilePos(oslFileHandle Handle, sal_uInt32 uHow, sal_
FileHandle_Impl::Guard lock(&(pImpl->m_mutex)); FileHandle_Impl::Guard lock(&(pImpl->m_mutex));
switch (uHow) switch (uHow)
{ {
case osl_Pos_Absolute: case osl_Pos_Absolut:
if (nOffset < 0) if (nOffset < 0)
return osl_File_E_INVAL; return osl_File_E_INVAL;
break; break;

View File

@ -2254,7 +2254,7 @@ namespace osl_File
auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create); auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
auto nError2 = testFile.write(buffer_write, 30, nCount_write); auto nError2 = testFile.write(buffer_write, 30, nCount_write);
osl::FileBase::RC nError4 = testFile.setPos(osl_Pos_Absolute, 0); osl::FileBase::RC nError4 = testFile.setPos(osl_Pos_Absolut, 0);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError4); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError4);
auto nError3 = testFile.read(buffer_read, 10, nCount_read); auto nError3 = testFile.read(buffer_read, 10, nCount_read);
@ -2328,7 +2328,7 @@ namespace osl_File
auto nError2 = testFile.close(); auto nError2 = testFile.close();
auto nError3 = testFile.setPos(osl_Pos_Absolute, 0); auto nError3 = testFile.setPos(osl_Pos_Absolut, 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("test for close function: manipulate a file after it has been closed", CPPUNIT_ASSERT_EQUAL_MESSAGE("test for close function: manipulate a file after it has been closed",
osl::FileBase::E_None, nError2); osl::FileBase::E_None, nError2);
@ -2380,7 +2380,7 @@ namespace osl_File
auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Absolute, 26); nError1 = testFile.setPos(osl_Pos_Absolut, 26);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
sal_uInt64 nCount_read = 0; sal_uInt64 nCount_read = 0;
nError1 = testFile.read(buffer_read, 1, nCount_read); nError1 = testFile.read(buffer_read, 1, nCount_read);
@ -2388,7 +2388,7 @@ namespace osl_File
nError1 = testFile.close(); nError1 = testFile.close();
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("test for setPos function: test for osl_Pos_Absolute, set the position to 26, test if the 26th char in file is correct", CPPUNIT_ASSERT_EQUAL_MESSAGE("test for setPos function: test for osl_Pos_Absolut, set the position to 26, test if the 26th char in file is correct",
pBuffer_Char[26], buffer_read[0]); pBuffer_Char[26], buffer_read[0]);
} }
@ -2399,7 +2399,7 @@ namespace osl_File
auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Absolute, sizeof(pBuffer_Char) - 2); nError1 = testFile.setPos(osl_Pos_Absolut, sizeof(pBuffer_Char) - 2);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Current, 0); nError1 = testFile.setPos(osl_Pos_Current, 0);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
@ -2486,7 +2486,7 @@ namespace osl_File
nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Absolute, 26); nError1 = testFile.setPos(osl_Pos_Absolut, 26);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.getPos(nFilePointer); nError1 = testFile.getPos(nFilePointer);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
@ -2566,7 +2566,7 @@ namespace osl_File
auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Absolute, 0); nError1 = testFile.setPos(osl_Pos_Absolut, 0);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
*pEOF = false; *pEOF = false;
@ -2745,7 +2745,7 @@ namespace osl_File
auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write); auto nError1 = testFile.open(osl_File_OpenFlag_Read | osl_File_OpenFlag_Write);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.setPos(osl_Pos_Absolute, 26); nError1 = testFile.setPos(osl_Pos_Absolut, 26);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
sal_uInt64 nCount_read = 0; sal_uInt64 nCount_read = 0;
nError1 = testFile.read(buffer_read, 26, nCount_read); nError1 = testFile.read(buffer_read, 26, nCount_read);
@ -2806,7 +2806,7 @@ namespace osl_File
nError1 = testFile.getPos(nFilePointer); nError1 = testFile.getPos(nFilePointer);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
// reset pointer to the beginning; // reset pointer to the beginning;
nError1 = testFile.setPos(osl_Pos_Absolute, 0); nError1 = testFile.setPos(osl_Pos_Absolut, 0);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);
nError1 = testFile.read(buffer_read, 10, nCount_read); nError1 = testFile.read(buffer_read, 10, nCount_read);
CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, nError1);

View File

@ -142,7 +142,7 @@ bool FileEmitContext::copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen
if( nOrigOffset + nLen > m_nReadLen ) if( nOrigOffset + nLen > m_nReadLen )
return false; return false;
if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolute, nOrigOffset ) != osl_File_E_None ) if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolut, nOrigOffset ) != osl_File_E_None )
return false; return false;
uno::Sequence< sal_Int8 > aSeq( nLen ); uno::Sequence< sal_Int8 > aSeq( nLen );
@ -167,7 +167,7 @@ unsigned int FileEmitContext::readOrigBytes( unsigned int nOrigOffset, unsigned
return 0; return 0;
if( osl_setFilePos( m_aReadHandle, if( osl_setFilePos( m_aReadHandle,
osl_Pos_Absolute, osl_Pos_Absolut,
nOrigOffset ) != osl_File_E_None ) nOrigOffset ) != osl_File_E_None )
{ {
return 0; return 0;

View File

@ -181,7 +181,7 @@ bool FileEmitContext::copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen
if( nOrigOffset + nLen > m_nReadLen ) if( nOrigOffset + nLen > m_nReadLen )
return false; return false;
if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolute, nOrigOffset ) != osl_File_E_None ) if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolut, nOrigOffset ) != osl_File_E_None )
{ {
fprintf( stderr, "could not seek to offset %u\n", nOrigOffset ); fprintf( stderr, "could not seek to offset %u\n", nOrigOffset );
return false; return false;
@ -207,7 +207,7 @@ unsigned int FileEmitContext::readOrigBytes( unsigned int nOrigOffset, unsigned
if( nOrigOffset + nLen > m_nReadLen ) if( nOrigOffset + nLen > m_nReadLen )
return 0; return 0;
if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolute, nOrigOffset ) != osl_File_E_None ) if( osl_setFilePos( m_aReadHandle, osl_Pos_Absolut, nOrigOffset ) != osl_File_E_None )
{ {
fprintf( stderr, "could not seek to offset %u\n", nOrigOffset ); fprintf( stderr, "could not seek to offset %u\n", nOrigOffset );
return 0; return 0;

View File

@ -268,7 +268,7 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
oslFileError rc; oslFileError rc;
sal_uInt64 nNewPos; sal_uInt64 nNewPos;
if ( nPos != STREAM_SEEK_TO_END ) if ( nPos != STREAM_SEEK_TO_END )
rc = osl_setFilePos( pInstanceData->rHandle, osl_Pos_Absolute, nPos ); rc = osl_setFilePos( pInstanceData->rHandle, osl_Pos_Absolut, nPos );
else else
rc = osl_setFilePos( pInstanceData->rHandle, osl_Pos_End, 0 ); rc = osl_setFilePos( pInstanceData->rHandle, osl_Pos_End, 0 );

View File

@ -139,7 +139,7 @@ XInputStream_impl::seek( sal_Int64 location )
{ {
if( location < 0 ) if( location < 0 )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolute, sal_uInt64( location ) ) ) if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
throw io::IOException( THROW_WHERE ); throw io::IOException( THROW_WHERE );
} }

View File

@ -74,7 +74,7 @@ bool ReconnectingFile::reconnect()
{ {
::osl::FileBase::RC nRes = ::osl::FileBase::E_NETWORK; ::osl::FileBase::RC nRes = ::osl::FileBase::E_NETWORK;
if ( uHow == osl_Pos_Absolute && uPos > 0 ) if ( uHow == osl_Pos_Absolut && uPos > 0 )
{ {
if ( m_bDisconnect ) if ( m_bDisconnect )
{ {

View File

@ -111,7 +111,7 @@ void SAL_CALL XStream_impl::truncate()
if (osl::FileBase::E_None != m_aFile.setSize(0)) if (osl::FileBase::E_None != m_aFile.setSize(0))
throw io::IOException( THROW_WHERE ); throw io::IOException( THROW_WHERE );
if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolute,sal_uInt64(0))) if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0)))
throw io::IOException( THROW_WHERE ); throw io::IOException( THROW_WHERE );
} }
@ -232,7 +232,7 @@ XStream_impl::seek( sal_Int64 location )
{ {
if( location < 0 ) if( location < 0 )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolute, sal_uInt64( location ) ) ) if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
throw io::IOException( THROW_WHERE ); throw io::IOException( THROW_WHERE );
} }

View File

@ -411,7 +411,7 @@ oslFileHandle FTPURL::open()
if(err == CURLE_OK) if(err == CURLE_OK)
{ {
oslFileError rc = osl_setFilePos( res, osl_Pos_Absolute, 0 ); oslFileError rc = osl_setFilePos( res, osl_Pos_Absolut, 0 );
SAL_WARN_IF(rc != osl_File_E_None, "ucb.ucp.ftp", SAL_WARN_IF(rc != osl_File_E_None, "ucb.ucp.ftp",
"osl_setFilePos failed"); "osl_setFilePos failed");
} }

View File

@ -43,7 +43,7 @@ namespace ucbhelper
sal_uInt64 nFileSize = 0; sal_uInt64 nFileSize = 0;
if ( osl_getFilePos( m_tmpfl, &nFileSize ) == osl_File_E_None ) if ( osl_getFilePos( m_tmpfl, &nFileSize ) == osl_File_E_None )
m_nLength = nFileSize; m_nLength = nFileSize;
oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolute, 0 ); oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolut, 0 );
SAL_WARN_IF(rc != osl_File_E_None, "ucbhelper", "osl_setFilePos failed"); SAL_WARN_IF(rc != osl_File_E_None, "ucbhelper", "osl_setFilePos failed");
} }
} }
@ -119,7 +119,7 @@ namespace ucbhelper
if(!m_tmpfl) if(!m_tmpfl)
throw IOException(); throw IOException();
oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolute, location ); oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolut, location );
SAL_WARN_IF(rc != osl_File_E_None, "ucbhelper", "osl_setFilePos failed"); SAL_WARN_IF(rc != osl_File_E_None, "ucbhelper", "osl_setFilePos failed");
} }

View File

@ -915,7 +915,7 @@ SAL_IMPLEMENT_MAIN() {
<< +e << std::endl; << +e << std::endl;
std::exit(EXIT_FAILURE); std::exit(EXIT_FAILURE);
} }
e = f.setPos(osl_Pos_Absolute, 8); e = f.setPos(osl_Pos_Absolut, 8);
if (e != osl::FileBase::E_None) { if (e != osl::FileBase::E_None) {
std::cerr std::cerr
<< "Cannot rewind current position in <" << f.getURL() << "Cannot rewind current position in <" << f.getURL()

View File

@ -2711,7 +2711,7 @@ bool PDFWriterImpl::emitFonts()
sal_uInt64 nLength1; sal_uInt64 nLength1;
if ( osl::File::E_None != aFontFile.setPos(osl_Pos_End, 0) ) return false; if ( osl::File::E_None != aFontFile.setPos(osl_Pos_End, 0) ) return false;
if ( osl::File::E_None != aFontFile.getPos(nLength1) ) return false; if ( osl::File::E_None != aFontFile.getPos(nLength1) ) return false;
if ( osl::File::E_None != aFontFile.setPos(osl_Pos_Absolute, 0) ) return false; if ( osl::File::E_None != aFontFile.setPos(osl_Pos_Absolut, 0) ) return false;
if (g_bDebugDisableCompression) if (g_bDebugDisableCompression)
{ {
@ -2768,7 +2768,7 @@ bool PDFWriterImpl::emitFonts()
sal_uInt64 nBytesRead = 0; sal_uInt64 nBytesRead = 0;
if ( osl::File::E_None != aFontFile.read(xBuffer.get(), nLength1, nBytesRead) ) return false; if ( osl::File::E_None != aFontFile.read(xBuffer.get(), nLength1, nBytesRead) ) return false;
SAL_WARN_IF( nBytesRead!=nLength1, "vcl.pdfwriter", "PDF-FontSubset read incomplete!" ); SAL_WARN_IF( nBytesRead!=nLength1, "vcl.pdfwriter", "PDF-FontSubset read incomplete!" );
if ( osl::File::E_None != aFontFile.setPos(osl_Pos_Absolute, 0) ) return false; if ( osl::File::E_None != aFontFile.setPos(osl_Pos_Absolut, 0) ) return false;
// get the PFB-segment lengths // get the PFB-segment lengths
ThreeInts aSegmentLengths = {0,0,0}; ThreeInts aSegmentLengths = {0,0,0};
getPfbSegmentLengths(xBuffer.get(), static_cast<int>(nBytesRead), aSegmentLengths); getPfbSegmentLengths(xBuffer.get(), static_cast<int>(nBytesRead), aSegmentLengths);
@ -4920,19 +4920,19 @@ bool PDFWriterImpl::finalizeSignature()
// 2- overwrite the value to the m_nSignatureLastByteRangeNoOffset position // 2- overwrite the value to the m_nSignatureLastByteRangeNoOffset position
sal_uInt64 nWritten = 0; sal_uInt64 nWritten = 0;
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolute, m_nSignatureLastByteRangeNoOffset) ) ); CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, m_nSignatureLastByteRangeNoOffset) ) );
OString aByteRangeNo = OString::number( nLastByteRangeNo ) + " ]"; OString aByteRangeNo = OString::number( nLastByteRangeNo ) + " ]";
if (m_aFile.write(aByteRangeNo.getStr(), aByteRangeNo.getLength(), nWritten) != osl::File::E_None) if (m_aFile.write(aByteRangeNo.getStr(), aByteRangeNo.getLength(), nWritten) != osl::File::E_None)
{ {
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolute, nOffset)) ); CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, nOffset)) );
return false; return false;
} }
// 3- create the PKCS#7 object using NSS // 3- create the PKCS#7 object using NSS
// Prepare buffer and calculate PDF file digest // Prepare buffer and calculate PDF file digest
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolute, 0)) ); CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, 0)) );
std::unique_ptr<char[]> buffer1(new char[m_nSignatureContentOffset + 1]); std::unique_ptr<char[]> buffer1(new char[m_nSignatureContentOffset + 1]);
sal_uInt64 bytesRead1; sal_uInt64 bytesRead1;
@ -4948,7 +4948,7 @@ bool PDFWriterImpl::finalizeSignature()
std::unique_ptr<char[]> buffer2(new char[nLastByteRangeNo + 1]); std::unique_ptr<char[]> buffer2(new char[nLastByteRangeNo + 1]);
sal_uInt64 bytesRead2; sal_uInt64 bytesRead2;
if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolute, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) || if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) ||
osl::File::E_None != m_aFile.read(buffer2.get(), nLastByteRangeNo, bytesRead2) || osl::File::E_None != m_aFile.read(buffer2.get(), nLastByteRangeNo, bytesRead2) ||
bytesRead2 != static_cast<sal_uInt64>(nLastByteRangeNo)) bytesRead2 != static_cast<sal_uInt64>(nLastByteRangeNo))
{ {
@ -4972,10 +4972,10 @@ bool PDFWriterImpl::finalizeSignature()
// Set file pointer to the m_nSignatureContentOffset, we're ready to overwrite PKCS7 object // Set file pointer to the m_nSignatureContentOffset, we're ready to overwrite PKCS7 object
nWritten = 0; nWritten = 0;
CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolute, m_nSignatureContentOffset)) ); CHECK_RETURN( (osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, m_nSignatureContentOffset)) );
m_aFile.write(aCMSHexBuffer.getStr(), aCMSHexBuffer.getLength(), nWritten); m_aFile.write(aCMSHexBuffer.getStr(), aCMSHexBuffer.getLength(), nWritten);
return osl::File::E_None == m_aFile.setPos(osl_Pos_Absolute, nOffset); return osl::File::E_None == m_aFile.setPos(osl_Pos_Absolut, nOffset);
} }
#endif //HAVE_FEATURE_NSS #endif //HAVE_FEATURE_NSS

View File

@ -1140,7 +1140,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
{ {
oslFileHandle pFile = nullptr; oslFileHandle pFile = nullptr;
osl_openFile( aPDFFiles[i].maTmpURL.pData, &pFile, osl_File_OpenFlag_Read ); osl_openFile( aPDFFiles[i].maTmpURL.pData, &pFile, osl_File_OpenFlag_Read );
if (pFile && (osl_setFilePos(pFile, osl_Pos_Absolute, 0) == osl_File_E_None)) if (pFile && (osl_setFilePos(pFile, osl_Pos_Absolut, 0) == osl_File_E_None))
{ {
std::vector< char > buffer( 0x10000, 0 ); std::vector< char > buffer( 0x10000, 0 );
// update job data with current page size // update job data with current page size

View File

@ -56,7 +56,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer)
if ((pDst == nullptr) || (pSrc == nullptr)) if ((pDst == nullptr) || (pSrc == nullptr))
return false; return false;
if (pSrc->setPos(osl_Pos_Absolute, 0) != osl::FileBase::E_None) if (pSrc->setPos(osl_Pos_Absolut, 0) != osl::FileBase::E_None)
return false; return false;
sal_uInt64 nIn = 0; sal_uInt64 nIn = 0;

View File

@ -143,7 +143,7 @@ XInputStream_impl::seek( sal_Int64 location )
{ {
if( location < 0 ) if( location < 0 )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolute, sal_uInt64( location ) ) ) if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
throw io::IOException(); throw io::IOException();
} }
@ -175,7 +175,7 @@ XInputStream_impl::getLength()
if( err != osl::FileBase::E_None ) if( err != osl::FileBase::E_None )
throw io::IOException(); throw io::IOException();
err = m_aFile.setPos( osl_Pos_Absolute, uCurrentPos ); err = m_aFile.setPos( osl_Pos_Absolut, uCurrentPos );
if( err != osl::FileBase::E_None ) if( err != osl::FileBase::E_None )
throw io::IOException(); throw io::IOException();