Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hello,

More changing macros names and removing some commented out code where
the soon to be removed macros were used.

Andy
From 4114208aff573fc0dfebc14e12177e87b4c13aed Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 20:05:07 +0000
Subject: [PATCH] Change unnamedspaced file.hxx macros

---
 filter/source/flash/swffilter.cxx                |    2 +-
 filter/source/placeware/exporter.cxx             |    2 +-
 filter/source/svg/test/svg2odf.cxx               |    4 ++--
 filter/source/xsltdialog/xmlfileview.cxx         |    2 +-
 filter/source/xsltdialog/xmlfilterjar.cxx        |    2 +-
 filter/source/xsltdialog/xmlfiltertabdialog.cxx  |    8 ++++----
 filter/source/xsltdialog/xmlfiltertestdialog.cxx |    6 +++---
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index c0e7b9c..3c6c87a 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -76,7 +76,7 @@ public:
     OslOutputStreamWrapper(const OUString& sFileName) : mrFile(sFileName) 
     { 
         osl_removeFile(sFileName.pData);
-        mrFile.open(OpenFlag_Create|OpenFlag_Write);
+        mrFile.open( osl_File_OpenFlag_Create|osl_File_OpenFlag_Write );
     }
 
     // stario::XOutputStream
diff --git a/filter/source/placeware/exporter.cxx b/filter/source/placeware/exporter.cxx
index 6971677..4fc25cc 100644
--- a/filter/source/placeware/exporter.cxx
+++ b/filter/source/placeware/exporter.cxx
@@ -276,7 +276,7 @@ static void createSlideFile( Reference< XComponent > xDoc, ZipFile& rZipFile, co
     osl::File::RC nRC;
     sal_uInt64 nTemp;
 
-    nRC = aInfoFile.open( OpenFlag_Write );
+    nRC = aInfoFile.open( osl_File_OpenFlag_Write );
     if( osl::File::E_None == nRC )
     {
         nRC = aInfoFile.write( aInfo.getStr(), aInfo.getLength(), nTemp );
diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx
index ffce4e1..c18440e 100644
--- a/filter/source/svg/test/svg2odf.cxx
+++ b/filter/source/svg/test/svg2odf.cxx
@@ -45,7 +45,7 @@ namespace
 
         explicit OutputWrap( const rtl::OUString& rURL ) : maFile(rURL)
         {
-            maFile.open(osl_File_OpenFlag_Create|OpenFlag_Write);
+            maFile.open( osl_File_OpenFlag_Create|osl_File_OpenFlag_Write );
         }
 
         virtual void SAL_CALL writeBytes( const com::sun::star::uno::Sequence< ::sal_Int8 >& aData 
) throw (com::sun::star::io::NotConnectedException,com::sun::star::io::BufferSizeExceededException, 
com::sun::star::io::IOException, com::sun::star::uno::RuntimeException)
@@ -111,7 +111,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     }
 
     osl::File aInputFile(aSrcURL);
-    if( osl::FileBase::E_None!=aInputFile.open(OpenFlag_Read) )
+    if( osl::FileBase::E_None!=aInputFile.open(osl_File_OpenFlag_Read) )
     {
         OSL_TRACE( "Cannot open input file" );
         return 1;
diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx
index b4f6523..a9ab5b7 100644
--- a/filter/source/xsltdialog/xmlfileview.cxx
+++ b/filter/source/xsltdialog/xmlfileview.cxx
@@ -622,7 +622,7 @@ void XMLSourceFileDialog::onValidate()
         if( xImporter.is() )
         {
             osl::File aInputFile( maFileURL );
-            /* osl::File::RC rc = */ aInputFile.open( OpenFlag_Read );
+            /* osl::File::RC rc = */ aInputFile.open( osl_File_OpenFlag_Read );
 
             Reference< XInputStream > xIS( new comphelper::OSLInputStreamWrapper( aInputFile ) );
             
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index a0c97bd..dac4448 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -240,7 +240,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt
 
             {
                 osl::File aOutputFile( aTempFileURL );
-                /* osl::File::RC rc = */ aOutputFile.open( OpenFlag_Write );
+                /* osl::File::RC rc = */ aOutputFile.open( osl_File_OpenFlag_Write );
                 Reference< XOutputStream > xOS( new OSLOutputStreamWrapper( aOutputFile ) );
 
                 TypeDetectionExporter aExporter( mxMSF );
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx 
b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index ab15348..64f855d 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -230,7 +230,7 @@ bool XMLFilterTabDialog::onOk()
         if( (mpNewInfo->maDTD != mpOldInfo->maDTD) && isFileURL( mpNewInfo->maDTD ) )
         {
             osl::File aFile( mpNewInfo->maDTD );
-            osl::File::RC aRC = aFile.open( OpenFlag_Read );
+            osl::File::RC aRC = aFile.open( osl_File_OpenFlag_Read );
             if( aRC != osl::File::E_None )
             {
                 nErrorId = STR_ERROR_DTD_NOT_FOUND;
@@ -246,7 +246,7 @@ bool XMLFilterTabDialog::onOk()
         if( (mpNewInfo->maExportXSLT != mpOldInfo->maExportXSLT) && isFileURL( 
mpNewInfo->maExportXSLT ) )
         {
             osl::File aFile( mpNewInfo->maExportXSLT );
-            osl::File::RC aRC = aFile.open( OpenFlag_Read );
+            osl::File::RC aRC = aFile.open( osl_File_OpenFlag_Read );
             if( aRC != osl::File::E_None )
             {
                 nErrorId = STR_ERROR_EXPORT_XSLT_NOT_FOUND;
@@ -262,7 +262,7 @@ bool XMLFilterTabDialog::onOk()
         if( (mpNewInfo->maImportXSLT != mpOldInfo->maImportXSLT) && isFileURL( 
mpNewInfo->maImportXSLT ) )
         {
             osl::File aFile( mpNewInfo->maImportXSLT );
-            osl::File::RC aRC = aFile.open( OpenFlag_Read );
+            osl::File::RC aRC = aFile.open( osl_File_OpenFlag_Read );
             if( aRC != osl::File::E_None )
             {
                 nErrorId = STR_ERROR_IMPORT_XSLT_NOT_FOUND;
@@ -286,7 +286,7 @@ bool XMLFilterTabDialog::onOk()
         if( (mpNewInfo->maImportTemplate != mpOldInfo->maImportTemplate) && isFileURL( 
mpNewInfo->maImportTemplate ) )
         {
             osl::File aFile( mpNewInfo->maImportTemplate );
-            osl::File::RC aRC = aFile.open( OpenFlag_Read );
+            osl::File::RC aRC = aFile.open( osl_File_OpenFlag_Read );
             if( aRC != osl::File::E_None )
             {
                 nErrorId = STR_ERROR_IMPORT_TEMPLATE_NOT_FOUND;
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx 
b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index b052030..69c2152 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -477,7 +477,7 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp )
             if( pAppInfo )
             {
                 File aOutputFile( aTempFileURL );
-                /* File::RC rc = */ aOutputFile.open( OpenFlag_Write );
+                /* File::RC rc = */ aOutputFile.open( osl_File_OpenFlag_Write );
 
                 // create xslt exporter
                 Reference< XOutputStream > xIS( new comphelper::OSLOutputStreamWrapper( 
aOutputFile ) );
@@ -652,7 +652,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
             if( xImporter.is() )
             {
                 osl::File aInputFile( rURL );
-                osl::File::RC rc = aInputFile.open( OpenFlag_Read );
+                osl::File::RC rc = aInputFile.open( osl_File_OpenFlag_Read );
 
                 Reference< XInputStream > xIS( new comphelper::OSLInputStreamWrapper( aInputFile ) 
);
                 
@@ -677,7 +677,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
                 Reference< XDocumentHandler > xWriter( mxMSF->createInstance( OUString( 
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), UNO_QUERY );
                 
                 File aOutputFile( aTempFileURL );
-                rc = aOutputFile.open( OpenFlag_Write );
+                rc = aOutputFile.open( osl_File_OpenFlag_Write );
 
                 Reference< XOutputStream > xOS( new OSLOutputStreamWrapper( aOutputFile ) );
                 Reference< XActiveDataSource > xDocSrc( xWriter, UNO_QUERY );
-- 
1.7.3.2

From 80a9ea431494ebcf799585f2609ceab22c2d0a68 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 19:43:44 +0000
Subject: [PATCH 1/2] Change unnamedspaced file.hxx macros

---
 jvmfwk/source/elements.cxx             |    2 +-
 sal/qa/osl/file/osl_File.cxx           |   94 ++++++++++++++++----------------
 sal/qa/osl/module/osl_Module.cxx       |    4 +-
 sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx |    4 +-
 sal/qa/rtl/logfile/rtl_logfile.cxx     |    4 +-
 sal/rtl/source/bootstrap.cxx           |    2 +-
 sal/workben/testfile.cxx               |   30 +++++-----
 7 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index a982964..1400b18 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -748,7 +748,7 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const
                         //delete file
 //                        File::RC rc_rem = File::remove(sURL);
                         File f(sURL);
-                        if (File::E_None == f.open(OpenFlag_Write | OpenFlag_Read)
+                        if (File::E_None == f.open(osl_File_OpenFlag_Write | 
osl_File_OpenFlag_Read)
                             && File::E_None == f.setPos(0, 0)
                             && File::E_None == f.setSize(0))
                                     ret = FILE_DOES_NOT_EXIST;
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 1e9ab2f..f7e42f4 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -385,7 +385,7 @@ inline void createTestFile( const ::rtl::OUString filename )
     //::std::auto_ptr<File> pFile( new File( aPathURL ) );
     File aFile(aPathURL);
     //nError = pFile->open( OpenFlag_Read | OpenFlag_Write | OpenFlag_Create );
-    nError = aFile.open( OpenFlag_Read | OpenFlag_Write | OpenFlag_Create );
+    nError = aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | 
osl_File_OpenFlag_Create );
     //CPPUNIT_ASSERT_MESSAGE( "In createTestFile Function: creation ", ( ::osl::FileBase::E_None 
== nError ) || ( nError == ::osl::FileBase::E_EXIST ) );
     if ( ( ::osl::FileBase::E_None != nError ) && ( nError != ::osl::FileBase::E_EXIST ))
     {
@@ -528,7 +528,7 @@ inline sal_Bool checkFile( const ::rtl::OUString & str, oslCheckMode nCheckMode
     sal_Bool           bCheckResult;
 
     bCheckResult = sal_False;
-    nError1 = testFile.open ( OpenFlag_Read );
+    nError1 = testFile.open ( osl_File_OpenFlag_Read );
     if ( ( ::osl::FileBase::E_NOENT != nError1 ) && ( ::osl::FileBase::E_ACCES != nError1 ) ){
 
         switch ( nCheckMode ) {
@@ -583,7 +583,7 @@ inline sal_Bool ifFileExist( const ::rtl::OUString & str )
     ::rtl::OString aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
     // const char *path = aString.getStr( );
     ::osl::File        testFile( str );
-    bCheckResult = ( osl::FileBase::E_None == testFile.open( OpenFlag_Read ) );
+    bCheckResult = ( osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Read ) );
     //if (bCheckResult)
     //t_print("%s exist!\n", path);
     //else
@@ -607,10 +607,10 @@ inline sal_Bool ifFileCanWrite( const ::rtl::OUString & str )
     const char *path = aString.getStr( );
     if (( _access( path, 2 ) ) != -1 )
          bCheckResult = sal_True;
-     //on UNX, just test if open success with OpenFlag_Write
+     //on UNX, just test if open success with osl_File_OpenFlag_Write
 #else
     ::osl::File        testFile( str );
-    bCheckResult = (osl::FileBase::E_None == testFile.open( OpenFlag_Write ));
+    bCheckResult = (osl::FileBase::E_None == testFile.open( osl_File_OpenFlag_Write ));
 #endif
     return bCheckResult;
 }
@@ -1480,7 +1480,7 @@ namespace osl_FileBase
             nError1 = FileBase::createTempFile( pUStr_DirURL, pHandle, pUStr_FileURL );
             ::osl::File testFile( *pUStr_FileURL );
             //printFileName(*pUStr_FileURL);
-            nError2 = testFile.open( OpenFlag_Create );
+            nError2 = testFile.open( osl_File_OpenFlag_Create );
             if ( osl::FileBase::E_EXIST == nError2 )  {
                 osl_closeFile( *pHandle );
                 deleteTestFile( *pUStr_FileURL );
@@ -1495,7 +1495,7 @@ namespace osl_FileBase
             bOK = sal_False;
             nError1 = FileBase::createTempFile( pUStr_DirURL, pHandle, pUStr_FileURL );
             ::osl::File testFile( *pUStr_FileURL );
-            nError2 = testFile.open( OpenFlag_Create );
+            nError2 = testFile.open( osl_File_OpenFlag_Create );
 
             CPPUNIT_ASSERT_MESSAGE( "createTempFile function: create a temp file, but it does not 
exist",
                 ( osl::FileBase::E_None == nError1 ) && ( pHandle != NULL ) &&
@@ -1528,7 +1528,7 @@ namespace osl_FileBase
             nError1 = FileBase::createTempFile( pUStr_DirURL, 0, pUStr_FileURL );
             bOK = ( pUStr_FileURL != 0);
             ::osl::File testFile( *pUStr_FileURL );
-            nError2 = testFile.open( OpenFlag_Create );
+            nError2 = testFile.open( osl_File_OpenFlag_Create );
             deleteTestFile( *pUStr_FileURL );
             CPPUNIT_ASSERT_MESSAGE( "createTempFile function: create a temp file, but it does not 
exist",
                 ( osl::FileBase::E_None == nError1 ) && ( osl::FileBase::E_EXIST == nError2 ) &&( 
sal_True == bOK ) );
@@ -3191,7 +3191,7 @@ namespace osl_FileStatus
         void getFileSize_002( )
         {
             ::osl::File testfile( aTypeURL );
-            nError = testfile.open( OpenFlag_Write | OpenFlag_Read );
+            nError = testfile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Read );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError );
             nError = testfile.setSize( TEST_FILE_SIZE );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError );
@@ -3417,7 +3417,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName4 );
 
-            ::osl::FileBase::RC nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            ::osl::FileBase::RC nError1 = testFile.open( osl_File_OpenFlag_Read | 
osl_File_OpenFlag_Write );
             ::osl::FileBase::RC nError2 = testFile.close( );
             CPPUNIT_ASSERT_MESSAGE( "test for ctors function: initialize a File and test its open 
and close",
                                      ( ::osl::FileBase::E_None == nError1 ) && ( 
::osl::FileBase::E_None == nError2 ) );
@@ -3429,7 +3429,7 @@ namespace osl_File
             sal_Char buffer[30] = "Test for File constructor";
             sal_uInt64 nCount;
 
-                ::osl::FileBase::RC nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+                ::osl::FileBase::RC nError1 = testFile.open( osl_File_OpenFlag_Read | 
osl_File_OpenFlag_Write );
                 ::osl::FileBase::RC nError2 = testFile.write( buffer, 30, nCount );
             testFile.close( );
 
@@ -3472,7 +3472,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             nError2 = testFile.close( );
             CPPUNIT_ASSERT_MESSAGE("close error", ::osl::FileBase::E_None == nError2 );
 
@@ -3484,7 +3484,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName3 );
 
-            nError1 = testFile.open( OpenFlag_Read );
+            nError1 = testFile.open( osl_File_OpenFlag_Read );
 
             CPPUNIT_ASSERT_MESSAGE( "test for open function: open a directory",
                                      ( File::E_INVAL == nError1 ) || ( File::E_ACCES == nError1 ) 
);
@@ -3494,7 +3494,7 @@ namespace osl_File
         {
             ::osl::File testFile( aCanURL1 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
 
             CPPUNIT_ASSERT_MESSAGE( "test for open function: open a non-exist file",
                                      File::E_NOENT == nError1 );
@@ -3506,7 +3506,7 @@ namespace osl_File
             concatURL( aTestFile, aTmpName2 );
             ::osl::File testFile( aTestFile );
 
-            nError1 = testFile.open( OpenFlag_Create );
+            nError1 = testFile.open( osl_File_OpenFlag_Create );
             sal_Bool bOK = ( File::E_ACCES == nError1 );
 #if defined (WNT )
             bOK = sal_True;  /// in Windows, you can create file in c:/ any way.
@@ -3522,7 +3522,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Create );
+            nError1 = testFile.open( osl_File_OpenFlag_Create );
 
             CPPUNIT_ASSERT_MESSAGE( "test for open function: create an exist file",
                                      File::E_EXIST == nError1 );
@@ -3535,7 +3535,7 @@ namespace osl_File
             sal_Char buffer_read[30];
             sal_uInt64 nCount_write, nCount_read;
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write | OpenFlag_Create );
+            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 );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError4 );
@@ -3546,7 +3546,7 @@ namespace osl_File
             ::osl::FileBase::RC nError6 = testFile.remove( aCanURL1 );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError6 );
 
-            CPPUNIT_ASSERT_MESSAGE( "test for open function: test for OpenFlag_Read,OpenFlag_Write 
and OpenFlag_Create",
+            CPPUNIT_ASSERT_MESSAGE( "test for open function: test for osl_File_OpenFlag_Read, 
osl_File_OpenFlag_Write and osl_File_OpenFlag_Create",
                                     ( ::osl::FileBase::E_None == nError1 ) &&
                                     ( ::osl::FileBase::E_None == nError2 ) &&
                                     ( ::osl::FileBase::E_None == nError3 ) &&
@@ -3593,7 +3593,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             nError2 = testFile.close( );
@@ -3606,7 +3606,7 @@ namespace osl_File
         {
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             nError2 = testFile.close( );
@@ -3645,7 +3645,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3666,7 +3666,7 @@ namespace osl_File
             ::osl::File testFile( aTmpName4 );
             sal_Char buffer_read[2];
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
              nError1 = testFile.setPos( Pos_Absolut, 26 );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3684,7 +3684,7 @@ namespace osl_File
             ::osl::File testFile( aTmpName4 );
             sal_Char buffer_read[2];
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            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 );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3704,7 +3704,7 @@ namespace osl_File
             ::osl::File testFile( aTmpName4 );
             sal_Char buffer_read[2];
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             //the file size is smaller than 100
             nError1 = testFile.setPos( Pos_End,  -100 );
@@ -3748,7 +3748,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3772,7 +3772,7 @@ namespace osl_File
             nError1 = testFile.getPos( nFilePointer );
             CPPUNIT_ASSERT( ::osl::FileBase::E_INVAL == nError1 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
              nError1 = testFile.setPos( Pos_Absolut, 26 );
@@ -3813,7 +3813,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3836,7 +3836,7 @@ namespace osl_File
             sal_Bool      *pEOF = &bEOF;
 
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
              nError1 = testFile.setPos( Pos_End, 0 );
@@ -3858,7 +3858,7 @@ namespace osl_File
             sal_Bool      *pEOF = &bEOF;
             sal_uInt64    nFilePointer = 0;
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
              nError1 = testFile.setPos( Pos_Absolut, 0 );
@@ -3907,7 +3907,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -3931,7 +3931,7 @@ namespace osl_File
             sal_uInt64     nFilePointer;
 
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             //enlarge the file to size of 100;
@@ -3959,7 +3959,7 @@ namespace osl_File
             sal_uInt64     nFilePointer;
 
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             //enlarge the file to size of 100;
@@ -4034,7 +4034,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4057,7 +4057,7 @@ namespace osl_File
             sal_Char       buffer_read[10];
 
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             nError1 = testFile.read( buffer_read, 10, nCount_read );
@@ -4079,7 +4079,7 @@ namespace osl_File
             sal_Char       buffer_read[26];
 
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
              nError1 = testFile.setPos( Pos_Absolut, 26 );
@@ -4132,7 +4132,7 @@ namespace osl_File
             sal_uInt64     nFilePointer;
             sal_Char       buffer_read[10];
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             //write chars into the file.
@@ -4185,7 +4185,7 @@ namespace osl_File
                                         "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                       };
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
 
             for ( int nCount = 0; nCount < 3; nCount++ )
@@ -4209,7 +4209,7 @@ namespace osl_File
         {
              ::osl::File    testFile( aTmpName6 );
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.readLine( aSequence );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4225,7 +4225,7 @@ namespace osl_File
             sal_Bool bEOF  = sal_False;
             sal_Bool *pEOF = &bEOF;
 
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             for ( int nCount = 0; nCount < 3; nCount++ )
             {
@@ -4265,7 +4265,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4289,7 +4289,7 @@ namespace osl_File
             nError1 = ::osl::File::copy( aTmpName4, aTmpName6 );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             //check
-            nError1 = testFile.open( OpenFlag_Create );
+            nError1 = testFile.open( osl_File_OpenFlag_Create );
             deleteTestFile( aTmpName6 );
 
             CPPUNIT_ASSERT_MESSAGE( "test for copy function: copy file to upper directory",
@@ -4338,7 +4338,7 @@ namespace osl_File
       {
         createTestFile( aTmpName6 );
         File tmpFile( aTmpName6 );
-        FileBase::RC err = tmpFile.open( OpenFlag_Write | OpenFlag_Read );
+        FileBase::RC err = tmpFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Read );
         (void)err;
         tmpFile.setSize( 200 );
         tmpFile.close();
@@ -4348,7 +4348,7 @@ namespace osl_File
 
         //check if is the new file
         File newFile( aTmpName4 );
-        newFile.open( OpenFlag_Write | OpenFlag_Read );
+        newFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Read );
         newFile.setPos( Pos_End, 0 );
         //             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
         sal_uInt64     nFilePointer;
@@ -4399,7 +4399,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4422,7 +4422,7 @@ namespace osl_File
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             //check
              ::osl::File    testFile( aCanURL1 );
-            nError2 = testFile.open( OpenFlag_Create );
+            nError2 = testFile.open( osl_File_OpenFlag_Create );
             deleteTestFile( aCanURL1 );
 
             CPPUNIT_ASSERT_MESSAGE( "test for move function: rename file to another directory",
@@ -4561,7 +4561,7 @@ namespace osl_File
             //write chars into the file.
             ::osl::File testFile( aTmpName4 );
 
-            nError1 = testFile.open( OpenFlag_Write );
+            nError1 = testFile.open( osl_File_OpenFlag_Write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
             nError1 = testFile.write( pBuffer_Char, sizeof( pBuffer_Char ), nCount_write );
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
@@ -4583,7 +4583,7 @@ namespace osl_File
             nError1 = ::osl::File::remove( aTmpName4 );
             //check
              ::osl::File    testFile( aTmpName4 );
-            nError2 = testFile.open( OpenFlag_Create );
+            nError2 = testFile.open( osl_File_OpenFlag_Create );
 
             CPPUNIT_ASSERT_MESSAGE( "test for remove function: remove a file",
                                     ( ::osl::FileBase::E_None == nError1 ) &&
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index 3508cb2..def170c 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -138,7 +138,7 @@ inline sal_Bool ifFileExist( const ::rtl::OUString & str )
         return sal_False;
     
     ::osl::File strFile( aUStr );
-    ::osl::FileBase::RC        nError = strFile.open( OpenFlag_Read );
+    ::osl::FileBase::RC        nError = strFile.open( osl_File_OpenFlag_Read );
     if ( ::File::E_NOENT == nError ) 
         return sal_False;
     else{
@@ -319,7 +319,7 @@ namespace osl_Module
             //test if can create a normal file
             ::rtl::OUString aFileURL = aMyDirURL + 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/test_file"));
             ::osl::File testFile( aFileURL );                  
-            nError = testFile.open( OpenFlag_Create );
+            nError = testFile.open( osl_File_OpenFlag_Create );
             CPPUNIT_ASSERT_MESSAGE( "#create failed. please manually clean-up directory and file 
under /tmp", nError == ::osl::FileBase::E_None );                     
             CPPUNIT_ASSERT_MESSAGE( "#This file is not exist, create failed. please manually 
clean-up directory and file under /tmp", ifFileExist( aFileURL ) == sal_True );
             
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
index 02726d5..cbc7f76 100644
--- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
+++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
@@ -77,7 +77,7 @@ bool t_fileExist(rtl::OUString const& _sFilename)
 {
     ::osl::FileBase::RC   nError1;
     ::osl::File aTestFile( _sFilename );
-    nError1 = aTestFile.open ( OpenFlag_Read );
+    nError1 = aTestFile.open ( osl_File_OpenFlag_Read );
     if ( ( ::osl::FileBase::E_NOENT != nError1 ) && ( ::osl::FileBase::E_ACCES != nError1 ) )
     {
         aTestFile.close( );
@@ -897,7 +897,7 @@ static void removeAndCreateFile(rtl::OUString const& _suFileURL, rtl::OString co
     osl::File::remove(_suFileURL);
 
     ::std::auto_ptr<osl::File> pFile( new osl::File( _suFileURL ) );
-    ::osl::FileBase::RC nError = pFile->open( OpenFlag_Write | OpenFlag_Create );
+    ::osl::FileBase::RC nError = pFile->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     if ( ::osl::FileBase::E_None == nError || ::osl::FileBase::E_EXIST == nError )
     {
         t_print(T_VERBOSE, "%s\n" , OString(_suFileURL, _suFileURL.getLength(), 
RTL_TEXTENCODING_ASCII_US).getStr());
diff --git a/sal/qa/rtl/logfile/rtl_logfile.cxx b/sal/qa/rtl/logfile/rtl_logfile.cxx
index b6d3af3..70c55e7 100644
--- a/sal/qa/rtl/logfile/rtl_logfile.cxx
+++ b/sal/qa/rtl/logfile/rtl_logfile.cxx
@@ -84,7 +84,7 @@ bool t_fileExist(rtl::OUString const& _sFilename)
 {
     ::osl::FileBase::RC   nError1;
     ::osl::File aTestFile( _sFilename );
-    nError1 = aTestFile.open ( OpenFlag_Read );
+    nError1 = aTestFile.open ( osl_File_OpenFlag_Read );
     if ( ( ::osl::FileBase::E_NOENT != nError1 ) && ( ::osl::FileBase::E_ACCES != nError1 ) )
     {
         aTestFile.close( );
@@ -143,7 +143,7 @@ namespace rtl_logfile
                 ::osl::FileBase::RC   nError1;
                 ::osl::File aTestFile( suFilePath );
                 printUString( suFilePath );
-                nError1 = aTestFile.open ( OpenFlag_Read );
+                nError1 = aTestFile.open ( osl_File_OpenFlag_Read );
                 CPPUNIT_ASSERT_MESSAGE("create the log file: but the logfile does not exist",
                                        ( ::osl::FileBase::E_NOENT != nError1 ) &&
                                        ( ::osl::FileBase::E_ACCES != nError1 ) );
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 412826d..75ba74e 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -979,7 +979,7 @@ rtl::OUString expandMacros(
                         rtl::OUString line;
                         rtl::OUString url;
                         // Silently ignore any errors (is that good?):
-                        if (f.open(OpenFlag_Read) == osl::FileBase::E_None &&
+                        if (f.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None &&
                             f.readLine(seq) == osl::FileBase::E_None &&
                             rtl_convertStringToUString(
                                 &line.pData,
diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx
index a7535fe..aacff72 100644
--- a/sal/workben/testfile.cxx
+++ b/sal/workben/testfile.cxx
@@ -167,7 +167,7 @@ sal_Bool Initialize( void )
 
         // Open the ini-File
         pFile=new File( iniFileURL );
-        rc=pFile->open( OpenFlag_Read | OpenFlag_Write );      
+        rc=pFile->open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
         if ( rc!=FileBase::E_None )
         {
             rtl_uString_release(strExeFileURL);
@@ -257,21 +257,21 @@ sal_Bool Initialize( void )
         return sal_False;
 
     pFile=new File( file1 );
-    rc=pFile->open( OpenFlag_Write | OpenFlag_Create );        
+    rc=pFile->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     if ( rc!=FileBase::E_None )
         return sal_False;
     rc=pFile->close();
     delete pFile;
     
     pFile=new File( file2 );
-    rc=pFile->open( OpenFlag_Write | OpenFlag_Create );        
+    rc=pFile->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     if ( rc!=FileBase::E_None )
         return sal_False;      
     rc=pFile->close();
     delete pFile;
 
     pFile=new File( file_on_server );
-    rc=pFile->open( OpenFlag_Write | OpenFlag_Create );        
+    rc=pFile->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     if ( rc!=FileBase::E_None )
         return sal_False;
     rc=pFile->close();
@@ -688,7 +688,7 @@ static void FileOpenAndCloseTest( void )
     // open an existing file (Read)
     //--------------------------------------------------
 
-    rc=pFile->open( OpenFlag_Read );
+    rc=pFile->open( osl_File_OpenFlag_Read );
     print_error( rtl::OString( "Open File (Read)" ), rc );
 
     //--------------------------------------------------
@@ -704,7 +704,7 @@ static void FileOpenAndCloseTest( void )
     // open an existing file (Write)
     //--------------------------------------------------
 
-    rc=pFile->open( OpenFlag_Write );
+    rc=pFile->open( osl_File_OpenFlag_Write );
     print_error( rtl::OString( "Open File (Write)" ), rc ); 
 
     //--------------------------------------------------
@@ -750,7 +750,7 @@ void FileCreateAndRemoveTest()
     // open (create) a not existing file (Read and write)
     //----------------------------------------------------
 
-    rc = pFile->open( OpenFlag_Read | OpenFlag_Write | osl_File_OpenFlag_Create );
+    rc = pFile->open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create 
);
 
     print_error( rtl::OString( "Create and Open File (Read & Write)" ), rc ); 
 
@@ -780,7 +780,7 @@ void FileCreateAndRemoveTest()
     // remove an open file
     //----------------------------------------------------
     
-    pFile->open( OpenFlag_Read | OpenFlag_Write | osl_File_OpenFlag_Create );
+    pFile->open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
 
     rc=pFile->remove( file_not_exist );
     print_error( rtl::OString( "Remove an open File" ), rc );
@@ -823,7 +823,7 @@ void FileWriteAndReadTest( void )
     // open (create) a not existing file (Read and write)
     //----------------------------------------------------
 
-    rc = pFile->open( OpenFlag_Read | OpenFlag_Write | osl_File_OpenFlag_Create );
+    rc = pFile->open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create 
);
 
     print_error( rtl::OString( "Create and Open File (Read & Write)" ), rc ); 
 
@@ -921,7 +921,7 @@ void FileCopyAndMoveTest( void )
 
     pFile=new File( destPath );
 
-    rc=pFile->open( OpenFlag_Read );
+    rc=pFile->open( osl_File_OpenFlag_Read );
     if ( rc == FileBase::E_None)
     {
         printf( "Verify: OK!\n" );
@@ -987,7 +987,7 @@ void FileCopyAndMoveTest( void )
 
     pFile=new File( destPath );
 
-    rc=pFile->open( OpenFlag_Read );
+    rc=pFile->open( osl_File_OpenFlag_Read );
     if ( rc==FileBase::E_None )
     {
         pFile->close();
@@ -995,7 +995,7 @@ void FileCopyAndMoveTest( void )
         delete pFile;
         pFile=new File( file1 );
 
-        rc=pFile->open( OpenFlag_Read );
+        rc=pFile->open( osl_File_OpenFlag_Read );
 
         if ( rc!=FileBase::E_None )
         {
@@ -1084,7 +1084,7 @@ void FileSizeTest( void )
     printFileName( file_not_exist );
     printf( "\n\n");
 
-    rc = aFile.open( OpenFlag_Read | OpenFlag_Write | osl_File_OpenFlag_Create );
+    rc = aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     print_error( rtl::OString( "Create and Open File (Read & Write)" ), rc ); 
     printf( "\n" );
 
@@ -1172,7 +1172,7 @@ void FilePointerTest( void )
     printFileName( file_not_exist );
     printf( "\n\n");
 
-    rc = rFile.open( OpenFlag_Read | OpenFlag_Write | osl_File_OpenFlag_Create );
+    rc = rFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
     print_error( rtl::OString( "Create and Open File (Read & Write) "), rc ); 
     printf( "\n" );
 
@@ -1672,7 +1672,7 @@ void DirectoryItemTest( void )
 
     pFile=new File( file1 );
 
-    rc=pFile->open( OpenFlag_Read );
+    rc=pFile->open( osl_File_OpenFlag_Read );
     if ( rc==FileBase::E_None )
     {
         printf( "Get DirectoryItem from a File-Handle: ");
-- 
1.7.3.2

From c5107d28eff55ce9384456fa34adf4a26c5bef39 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 16:33:22 +0000
Subject: [PATCH] Change unnamespace file.hxx macro

---
 sdext/source/pdfimport/test/outputwrap.hxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sdext/source/pdfimport/test/outputwrap.hxx b/sdext/source/pdfimport/test/outputwrap.hxx
index 5da34d5..24eb74d 100644
--- a/sdext/source/pdfimport/test/outputwrap.hxx
+++ b/sdext/source/pdfimport/test/outputwrap.hxx
@@ -49,7 +49,7 @@ typedef ::cppu::WeakComponentImplHelper1<
 
         explicit OutputWrap( const rtl::OUString& rURL ) : OutputWrapBase(m_aMutex), maFile(rURL) 
         {
-            maFile.open(osl_File_OpenFlag_Create|OpenFlag_Write);
+            maFile.open(osl_File_OpenFlag_Create|osl_File_OpenFlag_Write);
         }
 
         virtual void SAL_CALL writeBytes( const com::sun::star::uno::Sequence< ::sal_Int8 >& aData 
) throw (com::sun::star::io::NotConnectedException,com::sun::star::io::BufferSizeExceededException, 
com::sun::star::io::IOException, com::sun::star::uno::RuntimeException)
-- 
1.7.3.2

From acfd93f00e1c7d29c1213e011f022013cfbe9a04 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 18:02:43 +0000
Subject: [PATCH 1/2] Change unnamespace file.hxx macros

---
 basic/source/runtime/iosys.cxx                     |   10 +++++-----
 desktop/source/app/lockfile.cxx                    |    4 ++--
 framework/source/services/license.cxx              |    2 +-
 sfx2/source/appl/shutdownicon.cxx                  |    2 +-
 shell/qa/recent_docs.cxx                           |    2 +-
 svx/source/dialog/docrecovery.cxx                  |    2 +-
 svx/source/unodraw/recoveryui.cxx                  |    2 +-
 ucb/source/ucp/file/filinpstr.cxx                  |    4 ++--
 ucb/source/ucp/file/filrec.cxx                     |    6 +++---
 ucb/source/ucp/file/filstr.cxx                     |    4 ++--
 ucb/source/ucp/file/shell.cxx                      |   12 ++++++------
 .../source/cxxhelp/inc/util/RandomAccessStream.hxx |    6 +++---
 xmlhelp/source/cxxhelp/provider/databases.cxx      |    4 ++--
 xmlhelp/source/cxxhelp/provider/inputstream.cxx    |    2 +-
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx   |    2 +-
 xmlhelp/source/treeview/tvread.cxx                 |    4 ++--
 16 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index b433925..36135ee 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -364,21 +364,21 @@ OslStream::OslStream( const String& rName, short nStrmMode )
 
     if( (nStrmMode & (STREAM_READ | STREAM_WRITE)) == (STREAM_READ | STREAM_WRITE) )
     {
-        nFlags = OpenFlag_Read | OpenFlag_Write;
+        nFlags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write;
     }
     else if( nStrmMode & STREAM_WRITE )
     {
-        nFlags = OpenFlag_Write;
+        nFlags = osl_File_OpenFlag_Write;
     }
     else //if( nStrmMode & STREAM_READ )
     {
-        nFlags = OpenFlag_Read;
+        nFlags = osl_File_OpenFlag_Read;
     }
 
     osl::FileBase::RC nRet = maFile.open( nFlags );
-    if( nRet == osl::FileBase::E_NOENT && nFlags != OpenFlag_Read )
+    if( nRet == osl::FileBase::E_NOENT && nFlags != osl_File_OpenFlag_Read )
     {
-        nFlags |= OpenFlag_Create;
+        nFlags |= osl_File_OpenFlag_Create;
         nRet = maFile.open( nFlags );
     }
 
diff --git a/desktop/source/app/lockfile.cxx b/desktop/source/app/lockfile.cxx
index 24c3b7e..79c8bca 100644
--- a/desktop/source/app/lockfile.cxx
+++ b/desktop/source/app/lockfile.cxx
@@ -121,7 +121,7 @@ namespace desktop {
 
         // try to create file
         File aFile(m_aLockname);
-        if (aFile.open( OpenFlag_Create ) == File::E_EXIST) {
+        if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) {
             m_bIsLocked = sal_True;
         } else {
             // new lock created
@@ -141,7 +141,7 @@ namespace desktop {
                 // remove file and create new
                 File::remove( m_aLockname );
                 File aFile(m_aLockname);
-                aFile.open( OpenFlag_Create );
+                aFile.open( osl_File_OpenFlag_Create );
                 aFile.close( );
                 syncToFile( );
                 m_bRemove = sal_True;
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index a091f93..03bc99b 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -451,7 +451,7 @@ LicenseDialog::LicenseDialog(const ::rtl::OUString & aLicensePath, ResMgr *pResM
 
     // load license text
     File aLicenseFile(aLicensePath);
-    if ( aLicenseFile.open(OpenFlag_Read) == FileBase::E_None)
+    if ( aLicenseFile.open(osl_File_OpenFlag_Read) == FileBase::E_None)
     {
         DirectoryItem d;
         DirectoryItem::get(aLicensePath, d);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 85e366f..47839f8 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -859,7 +859,7 @@ bool ShutdownIcon::GetAutostart( )
     OUString aShortcutUrl;
     osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
     osl::File f( aShortcutUrl );
-    osl::File::RC error = f.open( OpenFlag_Read );
+    osl::File::RC error = f.open( osl_File_OpenFlag_Read );
     if( error == osl::File::E_None )
     {
         f.close();
diff --git a/shell/qa/recent_docs.cxx b/shell/qa/recent_docs.cxx
index 5f3c34c..fa4181a 100644
--- a/shell/qa/recent_docs.cxx
+++ b/shell/qa/recent_docs.cxx
@@ -137,7 +137,7 @@ public:
     void read_recently_used(void* buffer, size_t size)
     {
         File ruf(get_recently_used_url());
-        FileBase::RC rc = ruf.open(OpenFlag_Read);
+        FileBase::RC rc = ruf.open(osl_File_OpenFlag_Read);
 
         CPPUNIT_ASSERT_MESSAGE("Cannot open ~/.recently-used", FileBase::E_None == rc);
 
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 987f902..876b4d6 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -2080,7 +2080,7 @@ void BrokenRecoveryDialog::impl_askForSavePath()
             ::osl::File aFile( rURL );
 
             printf( "Loading %s:", OString( rURL.getStr(), rURL.getLength(), 
osl_getThreadTextEncoding() ).getStr() );
-            if ( ::osl::FileBase::E_None == aFile.open( OpenFlag_Read ) )
+            if ( ::osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
             {
                 ::rtl::OString aContent;
                 ::osl::FileBase::RC    result;
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 4c3a460..e131ffc 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -231,7 +231,7 @@ static bool new_crash_pending()
     OUString   aUnsentURL = GetUnsentURL();
     File       aFile( aUnsentURL );
 
-    if ( FileBase::E_None == aFile.open( OpenFlag_Read ) )
+    if ( FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
     {
         aFile.close();
         return true;
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index 052cf13..368a129 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -48,9 +48,9 @@ XInputStream_impl::XInputStream_impl( shell* pMyShell,const rtl::OUString& aUncP
       m_nErrorCode( TASKHANDLER_NO_ERROR ),
       m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
 {
-    sal_uInt32 nFlags = OpenFlag_Read;
+    sal_uInt32 nFlags = osl_File_OpenFlag_Read;
     if ( !bLock )
-        nFlags |= OpenFlag_NoLock;
+        nFlags |= osl_File_OpenFlag_NoLock;
 
     osl::FileBase::RC err = m_aFile.open( nFlags );
     if( err != osl::FileBase::E_None )
diff --git a/ucb/source/ucp/file/filrec.cxx b/ucb/source/ucp/file/filrec.cxx
index b0debe0..a4a07b0 100644
--- a/ucb/source/ucp/file/filrec.cxx
+++ b/ucb/source/ucp/file/filrec.cxx
@@ -46,7 +46,7 @@ sal_Bool ReconnectingFile::reconnect()
     {
         disconnect();
         if ( m_aFile.open( m_nFlags ) == ::osl::FileBase::E_None
-          || m_aFile.open( OpenFlag_Read ) == ::osl::FileBase::E_None )
+          || m_aFile.open( osl_File_OpenFlag_Read ) == ::osl::FileBase::E_None )
         {
             m_bDisconnect = sal_False;
             bResult = sal_True;
@@ -61,8 +61,8 @@ sal_Bool ReconnectingFile::reconnect()
     ::osl::FileBase::RC nResult = m_aFile.open( uFlags );
     if ( nResult == ::osl::FileBase::E_None )
     {
-        if ( uFlags & OpenFlag_Create )
-            m_nFlags = (uFlags & ( ~OpenFlag_Create )) | OpenFlag_Write;
+        if ( uFlags & osl_File_OpenFlag_Create )
+            m_nFlags = (uFlags & ( ~osl_File_OpenFlag_Create )) | osl_File_OpenFlag_Write;
         else
             m_nFlags = uFlags;
     
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 640ec62..5a28a4c 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -110,9 +110,9 @@ XStream_impl::XStream_impl( shell* pMyShell,const rtl::OUString& aUncPath, sal_B
       m_nErrorCode( TASKHANDLER_NO_ERROR ),
       m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
 {
-    sal_uInt32 nFlags = ( OpenFlag_Read | OpenFlag_Write );
+    sal_uInt32 nFlags = ( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write );
     if ( !bLock )
-        nFlags |= OpenFlag_NoLock;
+        nFlags |= osl_File_OpenFlag_NoLock;
 
     osl::FileBase::RC err = m_aFile.open( nFlags );
     if(  err != osl::FileBase::E_None )
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 714588a..63cef17 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -594,7 +594,7 @@ void SAL_CALL shell::page( sal_Int32 CommandId,
 {
     uno::Reference< XContentProvider > xProvider( m_pProvider );
     osl::File aFile( aUnqPath );
-    osl::FileBase::RC err = aFile.open( OpenFlag_Read );
+    osl::FileBase::RC err = aFile.open( osl_File_OpenFlag_Read );
 
     if( err != osl::FileBase::E_None )
     {
@@ -905,7 +905,7 @@ shell::setv( const rtl::OUString& aUnqPath,
                 {   // valid value for the size
                     osl::File aFile(aUnqPath);
                     bool err =
-                        aFile.open(OpenFlag_Write) != osl::FileBase::E_None ||
+                        aFile.open(osl_File_OpenFlag_Write) != osl::FileBase::E_None ||
                         aFile.setSize(sal_uInt64(newSize)) != osl::FileBase::E_None ||
                         aFile.close() != osl::FileBase::E_None;
 
@@ -1800,12 +1800,12 @@ shell::write( sal_Int32 CommandId,
 
     if( OverWrite )
     {
-        err = aFile.open( OpenFlag_Write | OpenFlag_Create );
+        err = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
 
         if( err != osl::FileBase::E_None )
         {
             aFile.close();
-            err = aFile.open( OpenFlag_Write );
+            err = aFile.open( osl_File_OpenFlag_Write );
         }
 
         if( err != osl::FileBase::E_None )
@@ -1818,7 +1818,7 @@ shell::write( sal_Int32 CommandId,
     }
     else
     {
-        err = aFile.open( OpenFlag_Read | OpenFlag_NoLock );
+        err = aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock );
         if( err == osl::FileBase::E_None )  // The file exists and shall not be overwritten
         {
             installError( CommandId,
@@ -1831,7 +1831,7 @@ shell::write( sal_Int32 CommandId,
 
         // as a temporary solution the creation does not lock the file at all
         // in future it should be possible to create the file without lock explicitly
-        err = aFile.open( OpenFlag_Write | OpenFlag_Create | OpenFlag_NoLock );
+        err = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | 
osl_File_OpenFlag_NoLock );
 
         if( err != osl::FileBase::E_None )
         {
diff --git a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx 
b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
index bff2eef..c4ecca2 100644
--- a/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
+++ b/xmlhelp/source/cxxhelp/inc/util/RandomAccessStream.hxx
@@ -51,9 +51,9 @@ namespace xmlsearch {
       
         protected:
       
-            enum OPENFLAG { Read = OpenFlag_Read,
-                            Write = OpenFlag_Write,
-                            Create = OpenFlag_Create };
+            enum OPENFLAG { Read = osl_File_OpenFlag_Read,
+                            Write = osl_File_OpenFlag_Write,
+                            Create = osl_File_OpenFlag_Create };
       
         };
 
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx 
b/xmlhelp/source/cxxhelp/provider/databases.cxx
index c1d57c7..361fafa 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -494,7 +494,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
                            key +
                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".cfg" )) );
 
-        if( osl::FileBase::E_None != cfgFile.open( OpenFlag_Read ) )
+        if( osl::FileBase::E_None != cfgFile.open( osl_File_OpenFlag_Read ) )
             it->second = 0;
         else
         {
@@ -1329,7 +1329,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
             osl::FileStatus aStatus( FileStatusMask_FileSize );
 
             if( osl::FileBase::E_None == osl::DirectoryItem::get( fileURL,aDirItem ) &&
-                osl::FileBase::E_None == aFile.open( OpenFlag_Read )                 &&
+                osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read )        &&
                 osl::FileBase::E_None == aDirItem.getFileStatus( aStatus ) )
             {
                 sal_uInt64 nSize;
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx 
b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
index 52fbe60..b668a7d 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
@@ -42,7 +42,7 @@ XInputStream_impl::XInputStream_impl( const rtl::OUString& aUncPath )
     : m_bIsOpen( false ),
       m_aFile( aUncPath )
 {
-    m_bIsOpen = ( osl::FileBase::E_None == m_aFile.open( OpenFlag_Read ) );
+    m_bIsOpen = ( osl::FileBase::E_None == m_aFile.open( osl_File_OpenFlag_Read ) );
 }
 
 
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx 
b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 0d5aa3e..3b5b30b 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -761,7 +761,7 @@ helpMatch(const char * URI) {
 static void *
 fileOpen(const char *URI) {
     osl::File *pRet = new osl::File(rtl::OUString(URI, strlen(URI), RTL_TEXTENCODING_UTF8));
-    pRet->open(OpenFlag_Read);
+    pRet->open(osl_File_OpenFlag_Read);
     return pRet;
 }
 
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 502e8bd..f39461c 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -519,7 +519,7 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
         len = configData.vFileLen[--j];
         char* s = new char[ int(len) ];  // the buffer to hold the installed files
         osl::File aFile( configData.vFileURL[j] );
-        aFile.open( OpenFlag_Read );
+        aFile.open( osl_File_OpenFlag_Read );
         aFile.read( s,len,ret );
         aFile.close();
 
@@ -781,7 +781,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
                 if(! showBasic && baseName.compareToAscii("sbasic") == 0 )
                   continue;
                 osl::File aFile( aFileUrl );
-                if( osl::FileBase::E_None == aFile.open( OpenFlag_Read ) )
+                if( osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) )
                 {
                     sal_uInt64 nSize;
                     aFile.getSize( nSize );
-- 
1.7.3.2

From 4babb5ad65131994fd598d6bb08f261060da9795 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Fri, 10 Dec 2010 00:26:48 +0000
Subject: [PATCH] Change unnamespaced file.hxx macros

---
 soltools/testSHL/util/tlog.cxx  |    4 ++--
 soltools/testSHL/util/tutil.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/soltools/testSHL/util/tlog.cxx b/soltools/testSHL/util/tlog.cxx
index 7de581a..366e667 100644
--- a/soltools/testSHL/util/tlog.cxx
+++ b/soltools/testSHL/util/tlog.cxx
@@ -52,8 +52,8 @@ void tLog::initialize( const ::rtl::OString& name ) {
             ret = ::osl::File::remove( m_logname );
         }
 
-    if( m_logfile->open( OpenFlag_Write ) == ::osl::FileBase::E_NOENT ) {
-            ret = m_logfile->open( OpenFlag_Write | OpenFlag_Create );
+    if( m_logfile->open( osl_File_OpenFlag_Write ) == ::osl::FileBase::E_NOENT ) {
+            ret = m_logfile->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
         }
         else  {
             ret = m_logfile->setPos( Pos_End, 0 );
diff --git a/soltools/testSHL/util/tutil.cxx b/soltools/testSHL/util/tutil.cxx
index d1da786..0cf734f 100644
--- a/soltools/testSHL/util/tutil.cxx
+++ b/soltools/testSHL/util/tutil.cxx
@@ -75,7 +75,7 @@ sal_uInt32 getEntriesFromFile( sal_Char* fName,
                                             vector< sal_Char* >& entries ) {
 
     ::osl::File inFile( cnvrtPth( fName ) );
-    if ( inFile.open( OpenFlag_Read ) == ::osl::FileBase::E_None) {
+    if ( inFile.open( osl_File_OpenFlag_Read ) == ::osl::FileBase::E_None) {
         ::rtl::ByteSequence byteSeq;
         inFile.readLine( byteSeq );
         while ( byteSeq.getLength() ) {
-- 
1.7.3.2

From dc01d17961a25c97361c3fb330d6d0edf5cff491 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 18:23:20 +0000
Subject: [PATCH 2/2] Remove commented out code

This code uses the OpenFlag_* macros from file.hxx that I'm removing.  I cannot see a
reason to kept any of it
---
 ucb/source/ucp/ftp/test.cxx |  195 -------------------------------------------
 1 files changed, 0 insertions(+), 195 deletions(-)

diff --git a/ucb/source/ucp/ftp/test.cxx b/ucb/source/ucp/ftp/test.cxx
index 377d725..e3d89e4 100644
--- a/ucb/source/ucp/ftp/test.cxx
+++ b/ucb/source/ucp/ftp/test.cxx
@@ -40,122 +40,9 @@
 #include <unistd.h>
 
 
-//  using namespace test_ftp;
-//  using namespace rtl;
-//  using namespace com::sun::star::uno;
-//  using namespace com::sun::star::lang;
-//  using namespace com::sun::star::ucb;
-//  using namespace com::sun::star::beans;
-//  using namespace com::sun::star::io;
-
-
-
-//  class FTPThread
-//     : public osl::Thread
-//  {
-//  public:
-    
-//     FTPThread();
-    
-//      int number_of_errors() { return _number_of_errors; }
-    
-//  protected:
-    
-//     void SAL_CALL run();
-    
-    
-//  private:
-
-//      ftp::FTPContentProvider    *pProvider;
-//      Reference<XContentProvider> xProvider; 
-//      Reference<XMultiServiceFactory> xFac;
-
-//      int _number_of_errors;
-//  };
-
-
-//  Reference< XMultiServiceFactory > createApplicationServiceManager()
-//  {
-//     try
-//     {
-//             Reference<XComponentContext> xComponentContext = 
-//              ::cppu::defaultBootstrap_InitialComponentContext();
-//             Reference<XMultiServiceFactory> xMS(
-//              xComponentContext->getServiceManager(), 
-//              UNO_QUERY);
-        
-//             return xMS;
-//     }
-//     catch( ::com::sun::star::uno::Exception& )
-//     {
-//          return Reference< XMultiServiceFactory >();
-//     }
-//  }
-
-
-//  FTPThread::FTPThread()
-//      : _number_of_errors(0),
-//        xFac(createApplicationServiceManager())
-//  {
-//      pProvider = new ftp::FTPContentProvider(xFac);
-//      xProvider = Reference<XContentProvider>(pProvider);
-    
-//      if(!xProvider.is())
-//          ++_number_of_errors;
-//  }
-
-
-//  void FTPThread::run() {
-//      if(!xFac.is()) {
-//          ++_number_of_errors;
-//          exit(1);
-//      }
-    
-//      Reference<XContentIdentifier> xIdent(
-//          new ftp::FTPContentIdentifier(
-//              rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp://abi:psswd@abi-1/file";)),
-//              pProvider));
-        
-//      Reference<XContent> xContent = xProvider->queryContent(xIdent);
-//      if(!xContent.is())
-//      {
-//          err_msg("no content",OUString());
-//          exit(1);
-//      }
-
-        
-//      Reference<XActiveDataSink> xActDS(new Test_ActiveDataSink());
-//      OpenCommandArgument2 aOpenCommand(OpenMode::DOCUMENT,
-//                                        0,
-//                                        Reference<XInterface>(xActDS,UNO_QUERY),
-//                                        Sequence<Property>(0),
-//                                        Sequence<NumberedSortingInfo>(0));
-//      Any aAny; aAny <<= aOpenCommand;
-    
-//      Command aCommand(OUString(RTL_CONSTASCII_USTRINGPARAM("open")),
-//                       -1,
-//                       aAny);
-               
-//      Reference<XCommandProcessor> xCommandProcessor(xContent,UNO_QUERY);
-//      if(!xCommandProcessor.is())
-//      {
-//          err_msg("no command_processor",OUString());
-//          exit(1);
-//      }
-//      xCommandProcessor->execute(aCommand,
-//                                 0,Reference<XCommandEnvironment>(0));
-        
-//      Reference<XInputStream> xInputStream = xActDS->getInputStream();
-//      if(!xInputStream.is())
-//          ;
-//  }
-
 
 int main(int argc,char* argv[])
 {
-//      FTPThread aThread;    
-//      aThread.create();
-//      aThread.join();
     
     typedef int (*INT_FUNC)(void);
     INT_FUNC tests[] = { test_ftpurl,
@@ -188,86 +75,4 @@ int main(int argc,char* argv[])
     return err_level;
 }
 
-
-
-//      char *scefile = 0;
-//      if(strcmp(argv[1],"-sce") == 0)
-//          scefile = argv[2];
-    
-//      if(!scefile) {
-//          fprintf(stderr,"usage: ftptest -sce filename\n");
-//          return 1;
-//      }
-    
-//      rtl::OUString sceurl;
-//      osl::FileBase::RC err = 
-//          osl::FileBase::getFileURLFromSystemPath(
-//              rtl::OUString(scefile,
-//                            strlen(scefile),
-//                            RTL_TEXTENCODING_UTF8),
-//              sceurl);
-    
-//      osl::File aFile(sceurl);
-//      err = aFile.open(OpenFlag_Read);
-//      if(err != osl::FileBase::E_None) {
-//          fprintf(stderr,"could not open sce-file %s\n",scefile);
-//          return 1;
-//      }
-
-//      sal_uInt64 n;   
-//      char buffer[256];
-//      rtl::OUStringBuffer bff;
-//      do {
-//          err = aFile.read((void*)buffer,256,n);
-//          bff.appendAscii(buffer,sal_Int32(n));
-//      } while(err == osl::FileBase::E_None && n == 256);
-                     
-//      aFile.close();
-
-//      rtl::OUString sce = bff.makeStringAndClear();
-    
-//      fprintf(stderr,rtl::OString(sce.getStr(),
-//                                  sce.getLength(),
-//                                  RTL_TEXTENCODING_UTF8).getStr());
-    
-//      rtl::OUString lib,tmp,testlib;
-//      std::vector<rtl::OUString> tests;
-//      sal_Int32 TEST = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEST")));
-//      sal_Int32 WITH = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WITH")));
-//      sal_Int32 FROM = sce.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FROM")));
-//      lib = sce.copy(TEST+4,WITH-TEST-4).trim();
-    
-//      tmp = sce.copy(WITH+4,FROM-WITH-4).trim();
-//      sal_Int32 nIndex = 0;
-//      do
-//      {
-//          rtl::OUString token = tmp.getToken(0,';',nIndex).trim();
-//          if(token.getLength())
-//              tests.push_back(token);
-//      } while(nIndex >= 0);
-    
-//      testlib = sce.copy(FROM+4).trim();
-    
-//  //      fprintf(stderr,"%s\n",
-//  //              rtl::OString(token.getStr(),
-//  //                           token.getLength(),
-//  //                           RTL_TEXTENCODING_UTF8).getStr());        
-    
-//      osl::Module testLib;
-//      if(!testLib.load(testlib)) {
-//          fprintf(stderr,"library not found: %s\n",
-//                  rtl::OString(testlib.getStr(),
-//                               testlib.getLength(),
-//                               RTL_TEXTENCODING_UTF8).getStr());
-//          return 1;
-//      }
-
-//      osl::Module mathLib;
-//      mathLib.load(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libm.so")));
-//      typedef double (*DF)(double);
-//      DF func = (DF)mathLib.getSymbol(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cos")));
-//      fprintf(stderr,"-------double %f ----------\n",(*func)(2.0));
-   
-//      fprintf(stderr,"-------testing %s ----------\n",scefile);
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.3.2

From 1a87ee5662abb72b7a428b94c1529893d1355ff7 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@googlemail.com>
Date: Sat, 11 Dec 2010 19:54:14 +0000
Subject: [PATCH 2/2] Remove commented out code

Remove commented out code that uses the unnamedspaced macros in
osl/File.hxx that are going away
---
 sal/qa/osl/file/osl_File.cxx |   34 +---------------------------------
 1 files changed, 1 insertions(+), 33 deletions(-)

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index f7e42f4..488503d 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -382,9 +382,7 @@ inline void createTestFile( const ::rtl::OUString filename )
     if ( !isURL( filename ) )
         ::osl::FileBase::getFileURLFromSystemPath( filename, aPathURL ); //convert if not full 
qualified URL
 
-    //::std::auto_ptr<File> pFile( new File( aPathURL ) );
     File aFile(aPathURL);
-    //nError = pFile->open( OpenFlag_Read | OpenFlag_Write | OpenFlag_Create );
     nError = aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | 
osl_File_OpenFlag_Create );
     //CPPUNIT_ASSERT_MESSAGE( "In createTestFile Function: creation ", ( ::osl::FileBase::E_None 
== nError ) || ( nError == ::osl::FileBase::E_EXIST ) );
     if ( ( ::osl::FileBase::E_None != nError ) && ( nError != ::osl::FileBase::E_EXIST ))
@@ -543,10 +541,8 @@ inline sal_Bool checkFile( const ::rtl::OUString & str, oslCheckMode nCheckMode
                     bCheckResult = sal_True;
                 break;
             case osl_Check_Mode_WriteAccess:
-                /// check the file name and whether it can be write.
+                /// check the file name and whether it can be written.
                 /// write chars into the file.
-                //testFile.close( );
-                //testFile.open( OpenFlag_Write );
                 sal_uInt64 nCount_write;
                 nError2 = testFile.write( pBuffer_Char, 10, nCount_write );
                 if ( ::osl::FileBase::E_None == nError2 )
@@ -3978,34 +3974,6 @@ namespace osl_File
             CPPUNIT_ASSERT_MESSAGE( "test for setSize function: truncate the file ",
                                      10 == nFilePointer );
         }
-      /*               void setSize_003( )
-        {
-            ::osl::File   testFile( aTmpName4 );
-            // sal_Bool      bEOF  = sal_False;
-            // sal_Bool      *pEOF = &bEOF;
-            sal_uInt64     nFilePointer;
-
-
-            nError1 = testFile.open( OpenFlag_Read | OpenFlag_Write );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-
-            //enlarge the file to size of 100;
-             nError1 = testFile.setSize( 10 );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-
-            //get the file size;
-             nError1 = testFile.setPos( Pos_End, 0 );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-             nError1 = testFile.getPos( nFilePointer );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-
-            nError1 = testFile.close( );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-
-            CPPUNIT_ASSERT_MESSAGE( "test for setSize function: truncate the file ",
-                                     10 == nFilePointer );
-        }
-      */
 
         CPPUNIT_TEST_SUITE( setSize );
         CPPUNIT_TEST( setSize_001 );
-- 
1.7.3.2


Context


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.