CMsgTextUtils Class Reference

class CMsgTextUtils : public CBase

CMsgTextUtils - Miscellaneous UI indenependent utilities.

UniDataUtils.lib
Since
3.1

Inherits from

Constructor & Destructor Documentation

CMsgTextUtils(RFs &)

CMsgTextUtils ( RFs & aFs ) [protected]

C++ constructor

Since
3.1

Parameters

RFs & aFs IN Fileserver session.

~CMsgTextUtils()

~CMsgTextUtils ( ) [virtual]

Destructor.

Since
3.1

Member Functions Documentation

CharconvIdToMibIdL(TUint)

IMPORT_C TUint CharconvIdToMibIdL ( TUint aCharconvCharsetId )

CharconvIdToMibIdL Converts between id's.

Since
3.1

Parameters

TUint aCharconvCharsetId IN charconv id

ConstructL()

void ConstructL ( ) [protected]

ConstructL Symbian OS constructor

Since
3.1

ConvertLineBreaksL(CRichText &, TInt)

IMPORT_C void ConvertLineBreaksL ( CRichText & aText,
TInt aMode
) [static]

Performs wanted linebreak converts.

Since
3.1

Parameters

CRichText & aText
TInt aMode Flag indicating to

ConvertParagraphSeparatorsLC(const TDesC &)

IMPORT_C HBufC * ConvertParagraphSeparatorsLC ( const TDesC & aText ) [static]

ConvertParagraphSeparatorsLC Convert Unicode Paragraph separators (0x2029) to CRLF (0x000d 0x000a)

Since
3.1

Parameters

const TDesC & aText Text to convert

ConvertPtrToDesC16(const TDes8 &, TDes16 &)

IMPORT_C void ConvertPtrToDesC16 ( const TDes8 & aFromBuff8,
TDes16 & aToBuff16
)

ConvertPtrToDesC16 Converts 8-bit data buffer to 16-bit data buffer. (similar to pointer typecast in C).

Since
5.0

Parameters

const TDes8 & aFromBuff8 IN 8-bit descriptor
TDes16 & aToBuff16 OUT 16-bit descriptor( memory allocated by caller)

ConvertToBuffer16LC(const TDesC &, TUint)

IMPORT_C HBufC * ConvertToBuffer16LC ( const TDesC & aText,
TUint aCharacterSetIdentifier
)

ConvertToBufferLC Converts text to given character set. Uses underscores ('_') as replacement characters

Since
3.1

Parameters

const TDesC & aText IN Text to be converted
TUint aCharacterSetIdentifier IN CharConv character set identifier

ConvertToBuffer8LC(const TDesC &, TUint)

IMPORT_C HBufC8 * ConvertToBuffer8LC ( const TDesC & aText,
TUint aCharacterSetIdentifier
)

ConvertToBufferLC Converts text to given character set. Uses underscores ('_') as replacement characters

Since
3.1

Parameters

const TDesC & aText IN Text to be converted
TUint aCharacterSetIdentifier IN CharConv character set identifier

ConvertToFileL(const TDesC &, RFile &, TUint)

IMPORT_C void ConvertToFileL ( const TDesC & aText,
RFile & aFile,
TUint aCharacterSetIdentifier
)

ConvertToFileL Writes text to file with given character set encoding.

Since
3.1

Parameters

const TDesC & aText IN Text to be converted
RFile & aFile IN Open file handle (writeable) Takes ownership!
TUint aCharacterSetIdentifier IN CharConv character set identifier

ConvertToUnicodeL(const TDesC8 &, TUint)

IMPORT_C HBufC16 * ConvertToUnicodeL ( const TDesC8 & aText,
TUint aCharacterSetIdentifier
)

ConvertToUnicodeL Converts 8-bit data buffer(in given character set) to unicode buffer. Uses underscores ('_') as replacement characters

Since
5.0

Parameters

const TDesC8 & aText IN Text(8-bit descriptor) to be converted
TUint aCharacterSetIdentifier IN CharConv character set identifier of input 8-bit descriptor

DoConvertCRLFL(CRichText &)

void DoConvertCRLFL ( CRichText & aText ) [private, static]

Parameters

CRichText & aText

GetFileNameFromBuffer(TFileName &, const TDesC &, TInt, const TDesC *)

IMPORT_C void GetFileNameFromBuffer ( TFileName & aFileName,
const TDesC & aBuffer,
TInt aMaxLength,
const TDesC * aExt = NULL
) [static]

Generates a legal filename from given text buffer.

Parameters

TFileName & aFileName OUT: generated filename.
const TDesC & aBuffer text buffer.
TInt aMaxLength maximum length for filename.
const TDesC * aExt = NULL optional file extension.

GetSafeAttachmentNameLC(MMsvAttachmentManager &, const TDesC &, TMsvAttachmentId, TBool)

IMPORT_C HBufC * GetSafeAttachmentNameLC ( MMsvAttachmentManager & aManager,
const TDesC & aFileName,
TMsvAttachmentId aAttachmentId,
TBool aContentLocation
) [static]

Parameters

MMsvAttachmentManager & aManager
const TDesC & aFileName
TMsvAttachmentId aAttachmentId
TBool aContentLocation

MibIdToCharconvIdL(TUint)

IMPORT_C TUint MibIdToCharconvIdL ( TUint aMibId )

MibIdToCharconvIdL Converts between id's.

Since
3.1

Parameters

TUint aMibId IN MIB enumeration

NewL(RFs &)

IMPORT_C CMsgTextUtils * NewL ( RFs & aFs ) [static]

Constructor.

Since
3.1

Parameters

RFs & aFs IN Fileserver session.

RecognizeCharSetL(RFs &, RFile &)

IMPORT_C TUint RecognizeCharSetL ( RFs & aFs,
RFile & aFile
) [static]

Tries to recognize character set for given text file.

Parameters

RFs & aFs IN File Server session.
RFile & aFile IN (Text) file to be recognized

TrimAndRemoveNonAlphaDigit(TDes &)

IMPORT_C void TrimAndRemoveNonAlphaDigit ( TDes & aString ) [static]

TrimAndRemoveNonAlphaDigit Removes spaces from start and end of the string. Replaces all non-alpha-digit characters with underscore "_". Replaces all non-ASCII characters with underscore "_"

Since
3.1

Parameters

TDes & aString IN/OUT string to be modified

UTF8Size(TPtrC)

IMPORT_C TInt UTF8Size ( TPtrC aText ) [static]

Gets byte-size of UTF8 formatted text

Since
3.1

Parameters

TPtrC aText

Member Enumerations Documentation

Enum TConversionModeFlags

Enumerators

ECRLFtoLF = 0x1

Member Data Documentation

CCnvCharacterSetConverter * iCharConv

CCnvCharacterSetConverter * iCharConv [protected]

RFs & iFs

RFs & iFs [protected]