From d42b2587b21992d970e420a0e3b52c22a1e0424a Mon Sep 17 00:00:00 2001 From: "mozilla@weilbacher.org" Date: Sun, 9 Sep 2007 02:07:20 -0700 Subject: [PATCH] [OS/2] Bug 395491: Fix files copied over from gfx for compilation, step 1 to remove NS_GFX macros to fix build break. Tested as working by abwillis1 and daveryeo. --- widget/src/os2/nsOS2Uni.cpp | 4 ++-- widget/src/os2/nsOS2Uni.h | 18 ++++++++---------- widget/src/os2/nsPaletteOS2.h | 2 +- widget/src/os2/nsPrintOS2.cpp | 12 ++++++------ widget/src/os2/nsPrintOS2.h | 18 ++++++++---------- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/widget/src/os2/nsOS2Uni.cpp b/widget/src/os2/nsOS2Uni.cpp index b34d25d6977..0b14aacc993 100644 --- a/widget/src/os2/nsOS2Uni.cpp +++ b/widget/src/os2/nsOS2Uni.cpp @@ -135,7 +135,7 @@ void OS2Uni::FreeUconvObjects() /********************************************************** WideCharToMultiByte **********************************************************/ -NS_GFX_(nsresult) +nsresult WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc, PRInt32 aSrcLength, nsAutoCharBuffer& aResult, PRInt32& aResultLength) @@ -159,7 +159,7 @@ WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc, /********************************************************** MultiByteToWideChar **********************************************************/ -NS_GFX_(nsresult) +nsresult MultiByteToWideChar(int aCodePage, const char* aSrc, PRInt32 aSrcLength, nsAutoChar16Buffer& aResult, PRInt32& aResultLength) diff --git a/widget/src/os2/nsOS2Uni.h b/widget/src/os2/nsOS2Uni.h index 6d86fabf69e..65a8b2b0336 100644 --- a/widget/src/os2/nsOS2Uni.h +++ b/widget/src/os2/nsOS2Uni.h @@ -44,13 +44,12 @@ #include "nsICharsetConverterManager.h" #include "gfxCore.h" - enum ConverterRequest { eConv_Encoder, eConv_Decoder }; -class NS_GFX OS2Uni { +class OS2Uni { public: static nsISupports* GetUconvObject(int CodePage, ConverterRequest aReq); static void FreeUconvObjects(); @@ -58,16 +57,15 @@ private: static nsICharsetConverterManager* gCharsetManager; }; - #define CHAR_BUFFER_SIZE 1024 typedef nsAutoBuffer nsAutoCharBuffer; typedef nsAutoBuffer nsAutoChar16Buffer; -NS_GFX_(nsresult) WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc, - PRInt32 aSrcLength, nsAutoCharBuffer& aResult, - PRInt32& aResultLength); -NS_GFX_(nsresult) MultiByteToWideChar(int aCodePage, const char* aSrc, - PRInt32 aSrcLength, nsAutoChar16Buffer& aResult, - PRInt32& aResultLength); - +nsresult WideCharToMultiByte(int aCodePage, const PRUnichar* aSrc, + PRInt32 aSrcLength, nsAutoCharBuffer& aResult, + PRInt32& aResultLength); +nsresult MultiByteToWideChar(int aCodePage, const char* aSrc, + PRInt32 aSrcLength, nsAutoChar16Buffer& aResult, + PRInt32& aResultLength); + #endif diff --git a/widget/src/os2/nsPaletteOS2.h b/widget/src/os2/nsPaletteOS2.h index 4e7d26a4aa2..34e45368ab0 100644 --- a/widget/src/os2/nsPaletteOS2.h +++ b/widget/src/os2/nsPaletteOS2.h @@ -42,7 +42,7 @@ #include #include "gfxCore.h" -class NS_GFX nsPaletteOS2 { +class nsPaletteOS2 { public: static void FreeGlobalPalette(); static void InitializeGlobalPalette(); diff --git a/widget/src/os2/nsPrintOS2.cpp b/widget/src/os2/nsPrintOS2.cpp index b310e02dd07..0ce619d5de8 100644 --- a/widget/src/os2/nsPrintOS2.cpp +++ b/widget/src/os2/nsPrintOS2.cpp @@ -50,7 +50,7 @@ static HMODULE hmodRes; #define SHIFT_PTR(ptr,offset) ( *((LONG*)&ptr) += offset ) -class NS_GFX PRTQUEUE +class PRTQUEUE { public: PRTQUEUE (const PRQINFO3* pPQI3) { InitWithPQI3 (pPQI3); } @@ -354,7 +354,7 @@ BOOL PRINTDLG::ShowProperties(ULONG printerNdx) /* Job management */ /****************************************************************************/ -NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int destination, char *file ) +HDC PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int destination, char *file ) { HDC hdc = 0; PSZ pszLogAddress; @@ -405,7 +405,7 @@ NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pInfo, PSZ pszApplicationName, int copies, int } /* find the selected form */ -NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo) +BOOL PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo) { BOOL rc = FALSE; @@ -440,19 +440,19 @@ NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo) /* Library-level data and functions -Printing */ /****************************************************************************/ -NS_GFX_(BOOL) PrnInitialize( HMODULE hmodResources) +BOOL PrnInitialize( HMODULE hmodResources) { hmodRes = hmodResources; return TRUE; } -NS_GFX_(BOOL) PrnTerminate() +BOOL PrnTerminate() { /* nop for now, may do something eventually */ return TRUE; } -NS_GFX_(BOOL) PrnClosePrinter( PRTQUEUE *pPrintQueue) +BOOL PrnClosePrinter( PRTQUEUE *pPrintQueue) { BOOL rc = FALSE; diff --git a/widget/src/os2/nsPrintOS2.h b/widget/src/os2/nsPrintOS2.h index 62857db80a6..ff09ce5d4d8 100644 --- a/widget/src/os2/nsPrintOS2.h +++ b/widget/src/os2/nsPrintOS2.h @@ -54,15 +54,15 @@ // OS/2 Printing - was in libprint //--------------------------------------------------------------------------- // Library init and term; job properties per queue are cached during run. -NS_GFX_(BOOL) PrnInitialize(HMODULE hmodResources); -NS_GFX_(BOOL) PrnTerminate(void); +BOOL PrnInitialize(HMODULE hmodResources); +BOOL PrnTerminate(void); // opaque type to describe a print queue (printer) -class NS_GFX PRTQUEUE; +class PRTQUEUE; #define MAX_PRINT_QUEUES (128) -class NS_GFX PRINTDLG +class PRINTDLG { public: PRINTDLG(); @@ -84,17 +84,15 @@ private: // Release app. resources associated with a printer -NS_GFX_(BOOL) PrnClosePrinter( PRTQUEUE *pPrintQueue); +BOOL PrnClosePrinter( PRTQUEUE *pPrintQueue); // Get a DC for the selected printer. Must supply the application name. -NS_GFX_(HDC) PrnOpenDC( PRTQUEUE *pPrintQueue, PSZ pszApplicationName, int copies, int destination, char *file); +HDC PrnOpenDC( PRTQUEUE *pPrintQueue, PSZ pszApplicationName, int copies, int destination, char *file); // Get the hardcopy caps for the selected form -NS_GFX_(BOOL) PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo); +BOOL PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo); // Abort the current job started with PrnStartJob(). -NS_GFX_(BOOL) PrnAbortJob( HDC hdc); - - +BOOL PrnAbortJob( HDC hdc); #endif