Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
CFormatOptionTab.cpp File Reference
#include "stdafx.h"
#include "mfcembed.h"
#include "CFormatOptionTab.h"

Go to the source code of this file.

Classes

struct  PaperSizes

Functions

static int GetIntFromStr (const TCHAR *aStr, int aMinVal=kMinScaleRange, int aMaxVal=100)

Variables

const int kMinScaleRange = 30
static const PaperSizes gPaperSize []
static const int gNumPaperSizes = 4

Class Documentation

struct PaperSizes

Definition at line 17 of file CFormatOptionTab.cpp.

Class Members
TCHAR * mDesc
double mHeight
BOOL mIsUserDefined
short mUnit
double mWidth

Function Documentation

static int GetIntFromStr ( const TCHAR aStr,
int  aMinVal = kMinScaleRange,
int  aMaxVal = 100 
) [static]

Definition at line 172 of file CFormatOptionTab.cpp.

{
    int val = aMinVal;
    _stscanf(aStr, _T("%d"), &val);
    if (val < aMinVal) 
    {
        return aMinVal;
    } 
    else if (val > aMaxVal) 
    {
        return aMaxVal;
    }
    return val;
}

Here is the caller graph for this function:


Variable Documentation

const int gNumPaperSizes = 4 [static]

Definition at line 31 of file CFormatOptionTab.cpp.

Initial value:
 {
  {_T("Letter (8.5 x 11.0)"), nsIPrintSettings::kPaperSizeInches, 8.5, 11.0, FALSE},
  {_T("Legal (8.5 x 14.0)"),  nsIPrintSettings::kPaperSizeInches, 8.5, 14.0, FALSE},
  {_T("A4 (210 x 297mm)"),    nsIPrintSettings::kPaperSizeMillimeters, 210.0, 297.0, FALSE},
  {_T("User Defined"),        nsIPrintSettings::kPaperSizeInches, 8.5, 11.0, TRUE}
}

Definition at line 25 of file CFormatOptionTab.cpp.

Definition at line 14 of file CFormatOptionTab.cpp.