Back to index

lightning-sunbird  0.9+nobinonly
Functions
CPageSetupPropSheet.cpp File Reference
#include "stdafx.h"
#include "resource.h"
#include "CPageSetupPropSheet.h"
#include "nsMemory.h"

Go to the source code of this file.

Functions

static float GetFloatFromStr (const TCHAR *aStr, float aMaxVal=1.0)
static PRUnicharGetUnicodeFromCString (const CString &aStr)

Function Documentation

static float GetFloatFromStr ( const TCHAR aStr,
float  aMaxVal = 1.0 
) [static]

Definition at line 86 of file CPageSetupPropSheet.cpp.

{
    float val;
    _stscanf(aStr, _T("%f"), &val);
    if (val <= aMaxVal) 
    {
        return val;
    } 
    else 
    {
        return 0.5;
    }
}

Here is the caller graph for this function:

static PRUnichar* GetUnicodeFromCString ( const CString &  aStr) [static]

Definition at line 101 of file CPageSetupPropSheet.cpp.

{
#ifdef _UNICODE
    nsEmbedString str(aStr);
#else
    nsEmbedString str;
    NS_CStringToUTF16(nsEmbedCString(aStr), NS_CSTRING_ENCODING_ASCII, str);
#endif
    return NS_StringCloneData(str);
}

Here is the call graph for this function:

Here is the caller graph for this function: