Bug 417356 trivial follow-up patch: Convert inches to twips in SetUnwriteableMarginTop/Left/Bottom/Right functions. r+sr=vlad a=blocking1.9+
authordholbert@cs.stanford.edu
Wed, 19 Mar 2008 22:58:48 -0700
changeset 13366 074ebfba009c6fc45103074534181e4742a12d23
parent 13365 899c36aa508cb380bb878a240cfbd548c582d69b
child 13367 971b9a7deb6714f6a2a04670b562c429c6fb8c8a
push idunknown
push userunknown
push dateunknown
reviewersblocking1.9
bugs417356
milestone1.9b5pre
Bug 417356 trivial follow-up patch: Convert inches to twips in SetUnwriteableMarginTop/Left/Bottom/Right functions. r+sr=vlad a=blocking1.9+
widget/src/xpwidgets/nsPrintSettingsImpl.cpp
--- a/widget/src/xpwidgets/nsPrintSettingsImpl.cpp
+++ b/widget/src/xpwidgets/nsPrintSettingsImpl.cpp
@@ -504,63 +504,63 @@ NS_IMETHODIMP nsPrintSettings::SetEdgeRi
 NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginTop(double *aUnwriteableMarginTop)
 {
   NS_ENSURE_ARG_POINTER(aUnwriteableMarginTop);
   *aUnwriteableMarginTop = NS_TWIPS_TO_INCHES(mUnwriteableMargin.top);
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginTop(double aUnwriteableMarginTop)
 {
-  if (aUnwriteableMarginTop >= 0) {
-    mUnwriteableMargin.top = aUnwriteableMarginTop;
+  if (aUnwriteableMarginTop >= 0.0) {
+    mUnwriteableMargin.top = NS_INCHES_TO_TWIPS(aUnwriteableMarginTop);
   }
   return NS_OK;
 }
 
 /* attribute double unwriteableMarginLeft; */
 NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft)
 {
   NS_ENSURE_ARG_POINTER(aUnwriteableMarginLeft);
   *aUnwriteableMarginLeft = NS_TWIPS_TO_INCHES(mUnwriteableMargin.left);
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginLeft(double aUnwriteableMarginLeft)
 {
-  if (aUnwriteableMarginLeft >= 0) {
-    mUnwriteableMargin.left = aUnwriteableMarginLeft;
+  if (aUnwriteableMarginLeft >= 0.0) {
+    mUnwriteableMargin.left = NS_INCHES_TO_TWIPS(aUnwriteableMarginLeft);
   }
   return NS_OK;
 }
 
 /* attribute double unwriteableMarginBottom; */
 NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom)
 {
   NS_ENSURE_ARG_POINTER(aUnwriteableMarginBottom);
   *aUnwriteableMarginBottom = NS_TWIPS_TO_INCHES(mUnwriteableMargin.bottom);
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginBottom(double aUnwriteableMarginBottom)
 {
-  if (aUnwriteableMarginBottom >= 0) {
-    mUnwriteableMargin.bottom = aUnwriteableMarginBottom;
+  if (aUnwriteableMarginBottom >= 0.0) {
+    mUnwriteableMargin.bottom = NS_INCHES_TO_TWIPS(aUnwriteableMarginBottom);
   }
   return NS_OK;
 }
 
 /* attribute double unwriteableMarginRight; */
 NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginRight(double *aUnwriteableMarginRight)
 {
   NS_ENSURE_ARG_POINTER(aUnwriteableMarginRight);
   *aUnwriteableMarginRight = NS_TWIPS_TO_INCHES(mUnwriteableMargin.right);
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginRight(double aUnwriteableMarginRight)
 {
-  if (aUnwriteableMarginRight >= 0) {
-    mUnwriteableMargin.right = aUnwriteableMarginRight;
+  if (aUnwriteableMarginRight >= 0.0) {
+    mUnwriteableMargin.right = NS_INCHES_TO_TWIPS(aUnwriteableMarginRight);
   }
   return NS_OK;
 }
 
 /* attribute double scaling; */
 NS_IMETHODIMP nsPrintSettings::GetScaling(double *aScaling)
 {
   NS_ENSURE_ARG_POINTER(aScaling);