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 & aFsIN Fileserver session.

~CMsgTextUtils()

~CMsgTextUtils()[virtual]

Destructor.

Since
3.1

Member Functions Documentation

CharconvIdToMibIdL(TUint)

IMPORT_C TUintCharconvIdToMibIdL(TUintaCharconvCharsetId)

CharconvIdToMibIdL Converts between id's.

Since
3.1

Parameters

TUint aCharconvCharsetIdIN charconv id

ConstructL()

voidConstructL()[protected]

ConstructL Symbian OS constructor

Since
3.1

ConvertLineBreaksL(CRichText &, TInt)

IMPORT_C voidConvertLineBreaksL(CRichText &aText,
TIntaMode
)[static]

Performs wanted linebreak converts.

Since
3.1

Parameters

CRichText & aText
TInt aModeFlag 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 & aTextText to convert

ConvertPtrToDesC16(const TDes8 &, TDes16 &)

IMPORT_C voidConvertPtrToDesC16(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 & aFromBuff8IN 8-bit descriptor
TDes16 & aToBuff16OUT 16-bit descriptor( memory allocated by caller)

ConvertToBuffer16LC(const TDesC &, TUint)

IMPORT_C HBufC *ConvertToBuffer16LC(const TDesC &aText,
TUintaCharacterSetIdentifier
)

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

Since
3.1

Parameters

const TDesC & aTextIN Text to be converted
TUint aCharacterSetIdentifierIN CharConv character set identifier

ConvertToBuffer8LC(const TDesC &, TUint)

IMPORT_C HBufC8 *ConvertToBuffer8LC(const TDesC &aText,
TUintaCharacterSetIdentifier
)

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

Since
3.1

Parameters

const TDesC & aTextIN Text to be converted
TUint aCharacterSetIdentifierIN CharConv character set identifier

ConvertToFileL(const TDesC &, RFile &, TUint)

IMPORT_C voidConvertToFileL(const TDesC &aText,
RFile &aFile,
TUintaCharacterSetIdentifier
)

ConvertToFileL Writes text to file with given character set encoding.

Since
3.1

Parameters

const TDesC & aTextIN Text to be converted
RFile & aFileIN Open file handle (writeable) Takes ownership!
TUint aCharacterSetIdentifierIN CharConv character set identifier

ConvertToUnicodeL(const TDesC8 &, TUint)

IMPORT_C HBufC16 *ConvertToUnicodeL(const TDesC8 &aText,
TUintaCharacterSetIdentifier
)

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

Since
5.0

Parameters

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

DoConvertCRLFL(CRichText &)

voidDoConvertCRLFL(CRichText &aText)[private, static]

Parameters

CRichText & aText

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

IMPORT_C voidGetFileNameFromBuffer(TFileName &aFileName,
const TDesC &aBuffer,
TIntaMaxLength,
const TDesC *aExt = NULL
)[static]

Generates a legal filename from given text buffer.

Parameters

TFileName & aFileNameOUT: generated filename.
const TDesC & aBuffertext buffer.
TInt aMaxLengthmaximum length for filename.
const TDesC * aExt = NULLoptional file extension.

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

IMPORT_C HBufC *GetSafeAttachmentNameLC(MMsvAttachmentManager &aManager,
const TDesC &aFileName,
TMsvAttachmentIdaAttachmentId,
TBoolaContentLocation
)[static]

Parameters

MMsvAttachmentManager & aManager
const TDesC & aFileName
TMsvAttachmentId aAttachmentId
TBool aContentLocation

MibIdToCharconvIdL(TUint)

IMPORT_C TUintMibIdToCharconvIdL(TUintaMibId)

MibIdToCharconvIdL Converts between id's.

Since
3.1

Parameters

TUint aMibIdIN MIB enumeration

NewL(RFs &)

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

Constructor.

Since
3.1

Parameters

RFs & aFsIN Fileserver session.

RecognizeCharSetL(RFs &, RFile &)

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

Tries to recognize character set for given text file.

Parameters

RFs & aFsIN File Server session.
RFile & aFileIN (Text) file to be recognized

TrimAndRemoveNonAlphaDigit(TDes &)

IMPORT_C voidTrimAndRemoveNonAlphaDigit(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 & aStringIN/OUT string to be modified

UTF8Size(TPtrC)

IMPORT_C TIntUTF8Size(TPtrCaText)[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]