---
sal/inc/osl/file.hxx | 5 -----
sal/qa/osl/file/osl_File.cxx | 18 +++++++++---------
sal/workben/testfile.cxx | 4 ++--
3 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx
index 5ba8177..4be0d3d 100644
--- a/sal/inc/osl/file.hxx
+++ b/sal/inc/osl/file.hxx
@@ -1003,11 +1003,6 @@ public:
return (RC) Error;
}
-
- #define Pos_Absolut osl_Pos_Absolut
- #define Pos_Current osl_Pos_Current
- #define Pos_End osl_Pos_End
-
/** Set the internal position pointer of an open file.
@param uHow [in]
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index abd47ae..ede89cb 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -3457,7 +3457,7 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write |
osl_File_OpenFlag_Create );
nError2 = testFile.write( buffer_write, 30, nCount_write );
- ::osl::FileBase::RC nError4 = testFile.setPos( Pos_Absolut, 0 );
+ ::osl::FileBase::RC nError4 = testFile.setPos( osl_Pos_Absolut, 0 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError4 );
nError3 = testFile.read( buffer_read, 10, nCount_read );
@@ -3531,7 +3531,7 @@ namespace osl_File
nError2 = testFile.close( );
- nError3 = testFile.setPos( Pos_Absolut, 0 );
+ nError3 = testFile.setPos( osl_Pos_Absolut, 0 );
CPPUNIT_ASSERT_MESSAGE( "test for close function: manipulate a file after it has been
closed",
( ::osl::FileBase::E_None == nError2 ) &&
@@ -3588,14 +3588,14 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = testFile.setPos( Pos_Absolut, 26 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, 26 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.read( buffer_read, 1, nCount_read );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.close( );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- CPPUNIT_ASSERT_MESSAGE( "test for setPos function: test for Pos_Absolut, set the
position to 26, test if the 26th char in file is correct",
+ CPPUNIT_ASSERT_MESSAGE( "test for setPos function: test for osl_Pos_Absolut, set the
position to 26, test if the 26th char in file is correct",
buffer_read[0] == pBuffer_Char[26] );
}
@@ -3606,7 +3606,7 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = testFile.setPos( Pos_Absolut, sizeof( pBuffer_Char ) - 2 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, sizeof( pBuffer_Char ) - 2 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.setPos( Pos_Current, 0);
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3695,7 +3695,7 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = testFile.setPos( Pos_Absolut, 26 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, 26 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.getPos( nFilePointer );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3781,7 +3781,7 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = testFile.setPos( Pos_Absolut, 0 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, 0 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
*pEOF = sal_False;
while ( !( *pEOF ) )
@@ -3974,7 +3974,7 @@ namespace osl_File
nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = testFile.setPos( Pos_Absolut, 26 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, 26 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.read( buffer_read, 26, nCount_read );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4034,7 +4034,7 @@ namespace osl_File
nError1 = testFile.getPos( nFilePointer );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
//reset pointer to the begining;
- nError1 = testFile.setPos( Pos_Absolut, 0 );
+ nError1 = testFile.setPos( osl_Pos_Absolut, 0 );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
nError1 = testFile.read( buffer_read, 10, nCount_read );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx
index 8c57e15..309d669 100644
--- a/sal/workben/testfile.cxx
+++ b/sal/workben/testfile.cxx
@@ -193,7 +193,7 @@ sal_Bool Initialize( void )
uBytesRequested=aStatus.getFileSize();
// read ini-File
- rc=pFile->setPos( Pos_Absolut, 0 );
+ rc=pFile->setPos( osl_Pos_Absolut, 0 );
pBuffer=(sal_Char*) rtl_allocateMemory( (sal_uInt32) (uBytesRequested+1)*sizeof(sal_Char) );
rtl_zeroMemory( pBuffer, (sal_uInt32)(uBytesRequested+1)*sizeof(sal_Char) );
@@ -846,7 +846,7 @@ void FileWriteAndReadTest( void )
// move the filepointer to the beginning
//----------------------------------------------------
- rc=pFile->setPos( Pos_Absolut , 0 );
+ rc=pFile->setPos( osl_Pos_Absolut , 0 );
print_error( rtl::OString( "Set FilePointer to the beginning of the file" ), rc );
printf( "\n" );
--
1.7.1
Context
- [Libreoffice] [PATCH] Kill Pos_XXX in favour of osl_Pos_XXX · Michael Lefevre
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.