Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsUnicodeFontMappingEntry Class Reference
Collaboration diagram for nsUnicodeFontMappingEntry:
Collaboration graph

List of all members.

Public Member Functions

 nsUnicodeFontMappingEntry (nsIUnicodeEncoder *aConverter, PRUint16 *aCCMap, short aFontNum, ScriptCode aScript)
PRBool Convert (const PRUnichar *aString, ByteCount aStringLength, char *aBuffer, ByteCount aBufferLength, ByteCount &oActualLength, ByteCount &oBytesRead, OptionBits opts)
PRUint16GetCCMap ()
short GetFontNum ()

Private Attributes

nsCOMPtr< nsIUnicodeEncodermConverter
short mFontNum
ScriptCode mScript

Detailed Description

Definition at line 92 of file nsUnicodeFontMappingMac.cpp.

Constructor & Destructor Documentation

nsUnicodeFontMappingEntry::nsUnicodeFontMappingEntry ( nsIUnicodeEncoder aConverter,
PRUint16 aCCMap,
short  aFontNum,
ScriptCode  aScript 
) [inline]

Definition at line 95 of file nsUnicodeFontMappingMac.cpp.

    : mConverter(aConverter),
        NS_ASSERTION(aConverter || aScript != BAD_SCRIPT, "internal error");

Member Function Documentation

PRBool nsUnicodeFontMappingEntry::Convert ( const PRUnichar aString,
ByteCount  aStringLength,
char *  aBuffer,
ByteCount  aBufferLength,
ByteCount &  oActualLength,
ByteCount &  oBytesRead,
OptionBits  opts 
) [inline]

Definition at line 108 of file nsUnicodeFontMappingMac.cpp.

            oActualLength = aBufferLength;
            if(NS_SUCCEEDED(mConverter->Convert(aString, (PRInt32*) &aStringLength, aBuffer, 
                (PRInt32*) &oActualLength)) && oActualLength)
                oBytesRead = 2 * aStringLength;
                return PR_TRUE;
            return PR_FALSE;

        UnicodeToTextInfo converter = GetConverterByScript(mScript);
            OSStatus err = ::ConvertFromUnicodeToText(converter, 2 * aStringLength,
                (ConstUniCharArrayPtr) aString,
                opts, 0, NULL, 0, NULL,
                aBufferLength, &oBytesRead, &oActualLength,
                (LogicalAddress) aBuffer);
            return (oActualLength > 0 ? PR_TRUE : PR_FALSE);
        return PR_FALSE;

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 143 of file nsUnicodeFontMappingMac.cpp.

        return mCCMap;

Here is the caller graph for this function:

Definition at line 148 of file nsUnicodeFontMappingMac.cpp.

        return mFontNum; 

Here is the caller graph for this function:

Member Data Documentation

Definition at line 155 of file nsUnicodeFontMappingMac.cpp.

Definition at line 154 of file nsUnicodeFontMappingMac.cpp.

Definition at line 156 of file nsUnicodeFontMappingMac.cpp.

ScriptCode nsUnicodeFontMappingEntry::mScript [private]

Definition at line 157 of file nsUnicodeFontMappingMac.cpp.

The documentation for this class was generated from the following file: