From 28e004aa7cf5ad45ff170a2d9372d8a370635643 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Mon, 20 May 2002 22:30:03 +0000 Subject: [PATCH] No bug - remove unused code git-svn-id: svn://10.0.0.236/trunk@121892 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/os2/nsDeviceContextOS2.cpp | 22 ---------------------- mozilla/gfx/src/os2/nsDeviceContextOS2.h | 4 ---- 2 files changed, 26 deletions(-) diff --git a/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp b/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp index aa69fe4886a..89e82fc6eb9 100644 --- a/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp +++ b/mozilla/gfx/src/os2/nsDeviceContextOS2.cpp @@ -27,7 +27,6 @@ #ifdef COLOR_256 #include "il_util.h" #endif -#include "nsIPref.h" #include "nsIServiceManager.h" #include "nsCOMPtr.h" #include "nsIScreenManager.h" @@ -43,13 +42,8 @@ #define NOT_SETUP 0x33 static PRBool gIsWarp4 = NOT_SETUP; -static NS_DEFINE_CID(kPrefCID, NS_PREF_CID); - -PRBool nsDeviceContextOS2::gRound = PR_FALSE; PRUint32 nsDeviceContextOS2::sNumberOfScreens = 0; -static char* nav4rounding = "font.size.nav4rounding"; - nsDeviceContextOS2 :: nsDeviceContextOS2() : DeviceContextImpl() { @@ -68,7 +62,6 @@ nsDeviceContextOS2 :: nsDeviceContextOS2() mCachedFullRect = PR_FALSE; mSupportsRasterFonts = PR_FALSE; mPrintingStarted = PR_FALSE; - mPelsPerMeter = 0; #ifdef XP_OS2 mPrintState = nsPrintState_ePreBeginDoc; #endif @@ -80,19 +73,6 @@ nsDeviceContextOS2 :: nsDeviceContextOS2() ulValues, sizeof(ulValues)); gIsWarp4 = (ulValues[0] >= 20) && (ulValues[1] >= 40); } - -#ifndef XP_OS2 - nsresult res = NS_ERROR_FAILURE; - nsCOMPtr prefs(do_GetService(kPrefCID, &res)); - if (NS_SUCCEEDED(res)) { - static PRBool roundingInitialized = PR_FALSE; - if (!roundingInitialized) { - roundingInitialized = PR_TRUE; - PrefChanged(nav4rounding, this); - } - prefs->RegisterCallback(nav4rounding, PrefChanged, this); - } -#endif } nsDeviceContextOS2::~nsDeviceContextOS2() @@ -182,8 +162,6 @@ void nsDeviceContextOS2 :: CommonInit(HDC aDC) mPixelsToTwips = 1.0f / mTwipsToPixels; - mPelsPerMeter = alArray[CAPS_VERTICAL_RESOLUTION]; - mDepth = alArray[CAPS_COLOR_BITCOUNT]; #ifdef COLOR_256 mPaletteInfo.isPaletteDevice = !!(alArray[CAPS_ADDITIONAL_GRAPHICS] & CAPS_PALETTE_MANAGER); diff --git a/mozilla/gfx/src/os2/nsDeviceContextOS2.h b/mozilla/gfx/src/os2/nsDeviceContextOS2.h index 227028c3be9..ba06bb9473e 100644 --- a/mozilla/gfx/src/os2/nsDeviceContextOS2.h +++ b/mozilla/gfx/src/os2/nsDeviceContextOS2.h @@ -120,7 +120,6 @@ protected: nsRect mClientRect; nsIDeviceContextSpec *mSpec; PRBool mSupportsRasterFonts; - PRUint32 mPelsPerMeter; nsCOMPtr mScreenManager; static PRUint32 sNumberOfScreens; @@ -129,9 +128,6 @@ public: HDC mPrintDC; HPS mPrintPS; - static PRBool gRound; - static int PrefChanged(const char* aPref, void* aClosure); - enum nsPrintState { nsPrintState_ePreBeginDoc,