CMsgTextUtils Class Reference
class CMsgTextUtils : public CBase
|
CMsgTextUtils
- Miscellaneous UI indenependent utilities.
UniDataUtils.lib
-
Since
-
3.1
Public Member Functions
|
|
~CMsgTextUtils
()
|
IMPORT_C
TUint
|
CharconvIdToMibIdL
(
TUint
)
|
IMPORT_C void
|
ConvertLineBreaksL
(
CRichText
&,
TInt
)
|
IMPORT_C
HBufC
*
|
ConvertParagraphSeparatorsLC
(const
TDesC
&)
|
IMPORT_C void
|
ConvertPtrToDesC16
(const
TDes8
&,
TDes16
&)
|
IMPORT_C
HBufC
*
|
ConvertToBuffer16LC
(const
TDesC
&,
TUint
)
|
IMPORT_C
HBufC8
*
|
ConvertToBuffer8LC
(const
TDesC
&,
TUint
)
|
IMPORT_C void
|
ConvertToFileL
(const
TDesC
&,
RFile
&,
TUint
)
|
IMPORT_C
HBufC16
*
|
ConvertToUnicodeL
(const
TDesC8
&,
TUint
)
|
IMPORT_C void
|
GetFileNameFromBuffer
(
TFileName
&, const
TDesC
&,
TInt
, const
TDesC
*)
|
IMPORT_C
HBufC
*
|
GetSafeAttachmentNameLC
(
MMsvAttachmentManager
&, const
TDesC
&,
TMsvAttachmentId
,
TBool
)
|
IMPORT_C
TUint
|
MibIdToCharconvIdL
(
TUint
)
|
IMPORT_C
CMsgTextUtils
*
|
NewL
(
RFs
&)
|
IMPORT_C
TUint
|
RecognizeCharSetL
(
RFs
&,
RFile
&)
|
IMPORT_C void
|
TrimAndRemoveNonAlphaDigit
(
TDes
&)
|
IMPORT_C
TInt
|
UTF8Size
(
TPtrC
)
|
Constructor & Destructor Documentation
CMsgTextUtils(RFs &)
CMsgTextUtils
|
(
|
RFs
&
|
aFs
|
)
|
[protected]
|
Parameters
RFs
& aFs
|
IN Fileserver session.
|
~CMsgTextUtils()
~CMsgTextUtils
|
(
|
)
|
[virtual]
|
Member Functions Documentation
CharconvIdToMibIdL(TUint)
IMPORT_C
TUint
|
CharconvIdToMibIdL
|
(
|
TUint
|
aCharconvCharsetId
|
)
|
|
CharconvIdToMibIdL Converts between id's.
Parameters
TUint
aCharconvCharsetId
|
IN charconv id
|
ConstructL()
void
|
ConstructL
|
(
|
)
|
[protected]
|
ConstructL Symbian OS constructor
ConvertLineBreaksL(CRichText &, TInt)
IMPORT_C void
|
ConvertLineBreaksL
|
(
|
CRichText
&
|
aText,
|
|
TInt
|
aMode
|
|
)
|
[static]
|
Performs wanted linebreak converts.
ConvertParagraphSeparatorsLC(const TDesC &)
IMPORT_C
HBufC
*
|
ConvertParagraphSeparatorsLC
|
(
|
const
TDesC
&
|
aText
|
)
|
[static]
|
ConvertParagraphSeparatorsLC Convert Unicode Paragraph separators (0x2029) to CRLF (0x000d 0x000a)
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).
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
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
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.
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
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]
|
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)
MibIdToCharconvIdL(TUint)
IMPORT_C
TUint
|
MibIdToCharconvIdL
|
(
|
TUint
|
aMibId
|
)
|
|
MibIdToCharconvIdL Converts between id's.
Parameters
TUint
aMibId
|
IN MIB enumeration
|
NewL(RFs &)
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 "_"
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
Member Enumerations Documentation
Enum TConversionModeFlags
Member Data Documentation
CCnvCharacterSetConverter * iCharConv
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.