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


Last two patches to remove these macros.


Andy
From d754de30bcc8ed04bfce96336be71b0e710a8765 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@gmail.com>
Date: Sun, 12 Dec 2010 14:51:41 +0000
Subject: [PATCH] Change unnamespaced file.hxx macros

---
 l10ntools/source/help/HelpLinker.cxx     |    2 +-
 toolkit/source/layout/core/byteseq.cxx   |    2 +-
 vcl/source/gdi/impimagetree.cxx          |    2 +-
 vcl/unx/source/printergfx/printerjob.cxx |    6 +++---
 vcl/unx/source/printergfx/text_gfx.cxx   |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index d6c8247..64b011a 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -1200,7 +1200,7 @@ HELPLINKER_DLLPUBLIC bool compileExtensionHelp
         sal_uInt64 ret, len = aFileStatus.getFileSize();
         char* s = new char[ int(len) ];  // the buffer to hold the installed files
         osl::File aFile( aTreeFileURL );
-        aFile.open( OpenFlag_Read );
+        aFile.open( osl_File_OpenFlag_Read );
         aFile.read( s, len, ret );
         aFile.close();
 
diff --git a/toolkit/source/layout/core/byteseq.cxx b/toolkit/source/layout/core/byteseq.cxx
index 4330754..29894be 100644
--- a/toolkit/source/layout/core/byteseq.cxx
+++ b/toolkit/source/layout/core/byteseq.cxx
@@ -44,7 +44,7 @@ uno::Reference< io::XInputStream > getFileAsStream( const rtl::OUString &rName )
         sFileURL = rName; // maybe it already was a file url
 
     File * blobFile = new File(sFileURL);
-    File::RC errorCode = blobFile->open(OpenFlag_Read);
+    File::RC errorCode = blobFile->open(osl_File_OpenFlag_Read);
 
     uno::Reference<io::XInputStream> xResult;
     switch (errorCode)
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 6ad214e..4c7048e 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -138,7 +138,7 @@ bool ImplImageTree::checkStyle(rtl::OUString const & style)
         // skip brand-specific icon themes; they are incomplete and thus not useful for this check
         if (nFromIndex < 0 || !aZipURL.match(sBrandURLSuffix, nFromIndex)) {
             osl::File aZip(aZipURL);
-            if (aZip.open(OpenFlag_Read) == ::osl::FileBase::E_None) {
+            if (aZip.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) {
                 aZip.close();
                 exists = true;
             }
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 5f61842..d5dd983 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -113,7 +113,7 @@ PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rE
     aFileURL = maSpoolDirName + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("/")) + aFileURL;
 
     pFile = new osl::File (aFileURL);
-    nError = pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create);
+    nError = pFile->open (osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | 
osl_File_OpenFlag_Create);
     if (nError != osl::File::E_None)
     {
         delete pFile;
@@ -579,7 +579,7 @@ PrinterJob::EndJob ()
     {
         if( *pPageHead )
         {
-            osl::File::RC nError = (*pPageHead)->open(OpenFlag_Read);
+            osl::File::RC nError = (*pPageHead)->open(osl_File_OpenFlag_Read);
             if (nError == osl::File::E_None)
             {
                 AppendPS (pDestFILE, *pPageHead, pBuffer);
@@ -590,7 +590,7 @@ PrinterJob::EndJob ()
             bSuccess = sal_False;
         if( *pPageBody )
         {
-            osl::File::RC nError = (*pPageBody)->open(OpenFlag_Read);
+            osl::File::RC nError = (*pPageBody)->open(osl_File_OpenFlag_Read);
             if (nError == osl::File::E_None)
             {
                 AppendPS (pDestFILE, *pPageBody, pBuffer);
diff --git a/vcl/unx/source/printergfx/text_gfx.cxx b/vcl/unx/source/printergfx/text_gfx.cxx
index 3490165..c81a49f 100644
--- a/vcl/unx/source/printergfx/text_gfx.cxx
+++ b/vcl/unx/source/printergfx/text_gfx.cxx
@@ -813,7 +813,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppli
         WritePS (pFile, aPostScriptName.getStr()); 
         WritePS (pFile, "\n");
 
-        osl::File::RC nError = aFontFile.open (OpenFlag_Read);
+        osl::File::RC nError = aFontFile.open(osl_File_OpenFlag_Read);
         if (nError == osl::File::E_None)
         {
             convertPfbToPfa (aFontFile, *pFile);
-- 
1.7.3.2

From d46160da88ce5727508fe0ebf6d642038a10eed4 Mon Sep 17 00:00:00 2001
From: Andy Holder <andy.m.holder@gmail.com>
Date: Sun, 12 Dec 2010 09:28:48 +0000
Subject: [PATCH] Remove unhelpful macros from file.hxx

---
 sal/inc/osl/file.hxx |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx
index 68e2780..ea36200 100644
--- a/sal/inc/osl/file.hxx
+++ b/sal/inc/osl/file.hxx
@@ -937,11 +937,6 @@ public:
         close();
     }
 
-    #define OpenFlag_Read   osl_File_OpenFlag_Read
-    #define OpenFlag_Write  osl_File_OpenFlag_Write
-    #define OpenFlag_Create osl_File_OpenFlag_Create
-    #define OpenFlag_NoLock osl_File_OpenFlag_NoLock
-
     /** Open a regular file.
 
         Open a file. Only regular files        can be openend.
-- 
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.