CPlainText Class Reference

class CPlainText : public CEditableText

Stores and manipulates plain text.

Plain text cannot be displayed, so this class provides no support for formatting. It is purely an in-memory buffer for text, and provides services that act upon it. These services include the following: import from and export to streams, optionally translating between Unicode and other encodings; reading and writing of field data; extraction of text; finding word and paragraph boundaries.

The type and size of in-memory buffer can be specified upon object construction. However, if no specification is provided a buffer is provided with default settings. There are two types of storage buffer: segmented buffers and flat buffers. The default buffer for plain text is segmented (CBufSeg). This is most efficient when a large quantity of text is to be stored, or will have a large dynamic range. A flat buffer (CBufFlat) is most appropriate for storing small quantities of text of bounded length. For most uses, however, a segmented buffer is sufficient.

Inherits from

Public Member Functions
~CPlainText()
IMPORT_C TIntCharPosOfParagraph(TInt &, TInt)
IMPORT_C TEtextComponentInfoComponentInfo()
IMPORT_C voidConvertAllFieldsToText()
IMPORT_C TBoolConvertFieldToText(TInt)
IMPORT_C voidCopyToStoreL(CStreamStore &, CStreamDictionary &, TInt, TInt)
IMPORT_C TBoolDeleteL(TInt, TInt)
IMPORT_C TIntDocumentLength()
IMPORT_C voidExportAsTextL(const TDes &, TTextOrganisation, TInt)
IMPORT_C voidExportTextL(TInt, RWriteStream &, TTextOrganisation, TInt, TInt, TInt, TInt *, TInt *)
IMPORT_C voidExportTextL(TInt, RWriteStream &, const TImportExportParam &, TImportExportResult &)
IMPORT_C voidExtendedInterface(TAny *&, TUid)
IMPORT_C voidExternalizeFieldDataL(RWriteStream &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidExternalizePlainTextL(RWriteStream &)
IMPORT_C voidExternalizePlainTextNoLengthCountL(RWriteStream &)
IMPORT_C voidExtract(TDes &, TInt)
IMPORT_C voidExtract(TDes &, TInt, TInt)
IMPORT_C voidExtractSelectively(TDes &, TInt, TInt, TUint)
IMPORT_C TIntFieldCount()
IMPORT_C const MTextFieldFactory *FieldFactory()
IMPORT_C TBoolFindFields(TInt)
IMPORT_C TBoolFindFields(TFindFieldInfo &, TInt, TInt)
IMPORT_C voidGetWordInfo(TInt, TInt &, TInt &, TBool, TBool)
IMPORT_C TIntImportTextFileL(TInt, const TDes &, TTextOrganisation)
IMPORT_C voidImportTextL(TInt, RReadStream &, TTextOrganisation, TInt, TInt, TInt *, TInt *)
IMPORT_C voidImportTextL(TInt, RReadStream &, const TImportExportParam &, TImportExportResult &)
IMPORT_C voidInsertFieldL(TInt, CTextField *, TUid)
IMPORT_C voidInsertL(TInt, const TChar &)
IMPORT_C voidInsertL(TInt, const TDesC &)
IMPORT_C voidInternalizeFieldDataL(RReadStream &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C voidInternalizePlainTextL(RReadStream &)
IMPORT_C voidInternalizePlainTextL(RReadStream &, TInt)
IMPORT_C CPlainText *NewL(TDocumentStorage, TInt)
IMPORT_C CPlainText *NewL(const CStreamStore &, TStreamId, MTextFieldFactory *, TDocumentStorage)
IMPORT_C CTextField *NewTextFieldL(TUid)
IMPORT_C TIntPageContainingPos(TInt)
IMPORT_C TIntParagraphCount()
IMPORT_C TIntParagraphNumberForPos(TInt &)
IMPORT_C TIntPasteFromStoreL(const CStreamStore &, const CStreamDictionary &, TInt)
IMPORT_C TPtrCRead(TInt)
IMPORT_C TPtrCRead(TInt, TInt)
IMPORT_C TBoolRemoveField(TInt)
IMPORT_C voidReset()
IMPORT_C voidRestoreComponentsL(const CStreamStore &)
IMPORT_C voidRestoreFieldComponentsL(const CStreamStore &)
IMPORT_C TIntScanParas(TInt &, TUint &)
IMPORT_C TIntScanWords(TInt &, TUint &)
IMPORT_C voidSetFieldFactory(MTextFieldFactory *)
IMPORT_C voidSetPageTable(TPageTable *)
IMPORT_C voidStoreComponentsL(CStreamStore &, CStoreMap &)
IMPORT_C voidStoreFieldComponentsL(CStreamStore &, CStoreMap &)
IMPORT_C const CTextField *TextField(TInt)
IMPORT_C TIntToParagraphStart(TInt &)
IMPORT_C voidUpdateAllFieldsL()
IMPORT_C voidUpdateFieldL(TInt)
IMPORT_C TIntWordCount()
Protected Member Functions
CPlainText()
IMPORT_C voidConstructL(TDocumentStorage, TInt)
IMPORT_C voidConstructL(const CStreamStore &, TStreamId, MTextFieldFactory *, TDocumentStorage)
voidConsumeAdornmentL(RReadStream &)
voidCopyComponentsL(CStreamStore &, CStoreMap &, TInt, TInt)
voidCopyToStreamL(RWriteStream &, TInt, TInt)
TBool Delete(TInt, TInt)
IMPORT_C voidDoConstructL(TDocumentStorage, TInt, MTextFieldFactory *)
TStreamId DoCopyToStoreL(CStreamStore &, CStreamDictionary &, TInt, TInt)
IMPORT_C voidDoExternalizeFieldDataL(RWriteStream &)
IMPORT_C voidDoExternalizePlainTextL(RWriteStream &)
voidDoExtract(TDes &, TInt, TInt, TUint)
IMPORT_C voidDoInternalizeFieldDataL(RReadStream &)
IMPORT_C voidDoInternalizePlainTextL(RReadStream &)
TInt DoPasteFromStoreL(const CStreamStore &, TStreamId, TInt)
IMPORT_C TBoolDoPtDelete(TInt, TInt)
IMPORT_C voidDoPtInsertL(TInt, const TDesC &)
voidInsertL(TInt, const CPlainText *)
voidPasteComponentsL(const CStreamStore &, TInt)
IMPORT_C voidPtInsertL(TInt, const TDesC &)
TUid UidFromStreamL(RReadStream &)
Private Member Functions
CPlainText(const CPlainText &)
TInt CountUnits(TUnitOfText)
voidCreateFieldSetL(TInt)
TInt DoPasteFromStreamL(RReadStream &, TInt)
TBool FieldSetPresent()
TBool GetChar(SScanData &, TChar &)
voidInitScanControl(TInt &, TUint &, TUnitOfText, SScanData &)
voidInitScanData(TInt, SScanData &)
voidInsertEodL()
voidKillFieldSet()
TInt PasteFromStreamL(RReadStream &, TInt)
IMPORT_C voidReserved_2()
TInt ScanUnit(TInt &, TUnitOfText, SScanData &)
TBool TestForDelimiter(TUnitOfText, SScanData &)
voidUpdatePageTable(TInt, TInt)
CPlainText &operator=(const CPlainText &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CEditableText::CancelFepInlineEdit(TBool &,TInt &,TInt &,TInt &,TInt)
CEditableText::CommitFepInlineEditL(TBool &,TInt &,TInt &,TInt &,TInt)
CEditableText::GetLengthOfInlineText()const
CEditableText::GetPositionOfInlineTextInDocument()const
CEditableText::HasChanged()const
CEditableText::OverrideFormatOfInlineTextIfApplicable(TPtrC &,TCharFormat &,TInt)const
CEditableText::RestoreL(const CStreamStore &,TStreamId)
CEditableText::SetHasChanged(TBool)
CEditableText::StartFepInlineEditL(TBool &,TInt &,TInt &,TInt &,TInt,const TDesC &,TInt,TInt,MFepInlineTextFormatRetriever &)
CEditableText::StoreL(CStreamStore &)const
CEditableText::UpdateFepInlineTextL(TBool &,TInt &,TInt &,TInt &,TInt,const TDesC &)
CEditableText::~CEditableText()
Public Member Enumerations
enumanonymous {
EScanBackwards = 0x01, EScanStayIfBoundary = 0x02, EScanToUnitStart = 0x04, EScanToUnitEnd = 0x08, EScanJoinDelimiters = 0x10, EScanPictureIsDelimiter = 0x20, EScanPunctuationIsDelimiter = 0x40
}
enumanonymous { EExtractAll = 0, EExtractVisible = 1, EExcludeInlineEditedText = 2 }
enumTScanDataEnd { EScanEndOfData = -1 }
enumTTextOrganisation { EOrganiseByParagraph, EOrganiseByLine }
Protected Member Enumerations
enumanonymous { EImportBufSize = 512, EBiggestCharacterPaste = 0x100000 }
enumTUnitOfText { EUnitIsWord, EUnitIsParagraph }
Inherited Enumerations
CEditableText:@117
CEditableText:@118
CEditableText:TDocumentStorage
Protected Attributes
__DECLARE_TEST
CBufBase *iByteStore
MTextFieldFactory *iFieldFactory
TSwizzle< CTextFieldSet >iFieldSet
TPageTable *iPageTable
Private Attributes
void *iReserved_1
Inherited Attributes
CEditableText::iHasChanged

Constructor & Destructor Documentation

CPlainText()

IMPORT_CCPlainText()[protected]

CPlainText(const CPlainText &)

CPlainText(const CPlainText &aPlainTextDoc)[private]

Parameters

const CPlainText & aPlainTextDoc

~CPlainText()

IMPORT_C~CPlainText()[virtual]

Member Functions Documentation

CharPosOfParagraph(TInt &, TInt)

IMPORT_C TIntCharPosOfParagraph(TInt &aLength,
TIntaParaOffset
)const [virtual]

Parameters

TInt & aLength
TInt aParaOffset

ComponentInfo()

IMPORT_C TEtextComponentInfoComponentInfo()const [virtual]

ConstructL(TDocumentStorage, TInt)

IMPORT_C voidConstructL(TDocumentStorageaStorage = ESegmentedStorage,
TIntaDefaultTextGranularity = EDefaultTextGranularity
)[protected]

Parameters

TDocumentStorage aStorage = ESegmentedStorage
TInt aDefaultTextGranularity = EDefaultTextGranularity

ConstructL(const CStreamStore &, TStreamId, MTextFieldFactory *, TDocumentStorage)

IMPORT_C voidConstructL(const CStreamStore &aStore,
TStreamIdaStreamId,
MTextFieldFactory *aFieldFactory,
TDocumentStorageaStorage = ESegmentedStorage
)[protected]

Parameters

const CStreamStore & aStore
TStreamId aStreamId
MTextFieldFactory * aFieldFactory
TDocumentStorage aStorage = ESegmentedStorage

ConsumeAdornmentL(RReadStream &)

voidConsumeAdornmentL(RReadStream &aStream)[protected, static, inline]

Parameters

RReadStream & aStream

ConvertAllFieldsToText()

IMPORT_C voidConvertAllFieldsToText()

ConvertFieldToText(TInt)

IMPORT_C TBoolConvertFieldToText(TIntaPos)

Parameters

TInt aPos

CopyComponentsL(CStreamStore &, CStoreMap &, TInt, TInt)

voidCopyComponentsL(CStreamStore &aStore,
CStoreMap &aMap,
TIntaPos,
TIntaLength
)const [protected]

Parameters

CStreamStore & aStore
CStoreMap & aMap
TInt aPos
TInt aLength

CopyToStoreL(CStreamStore &, CStreamDictionary &, TInt, TInt)

IMPORT_C voidCopyToStoreL(CStreamStore &aStore,
CStreamDictionary &aDictionary,
TIntaPos,
TIntaLength
)const [virtual]

Copies a portion of the text to the clipboard.

Parameters

CStreamStore & aStoreThe clipboard's store (see class CClipboard).
CStreamDictionary & aDictionaryThe clipboard's stream dictionary (see class CClipboard).
TInt aPosA valid document position from which to begin copying.
TInt aLengthThe number of characters to copy.

CopyToStreamL(RWriteStream &, TInt, TInt)

voidCopyToStreamL(RWriteStream &aStream,
TIntaPos,
TIntaLength
)const [protected]

Parameters

RWriteStream & aStream
TInt aPos
TInt aLength

CountUnits(TUnitOfText)

TInt CountUnits(TUnitOfTextaContext)const [private]

Parameters

TUnitOfText aContext

CreateFieldSetL(TInt)

voidCreateFieldSetL(TIntaDocumentLength)[private]

Parameters

TInt aDocumentLength

Delete(TInt, TInt)

TBool Delete(TIntaPos,
TIntaLength
)[protected]

Parameters

TInt aPos
TInt aLength

DeleteL(TInt, TInt)

IMPORT_C TBoolDeleteL(TIntaPos,
TIntaLength
)[virtual]

Deletes one or more characters beginning at (and including) the character at the specified document position.

Indicates whether or not two paragraphs have been merged as a result of the delete, so that the resulting paragraph needs to be reformatted. This value is only relevant to rich text, so for plain and global text implementations, the function always returns EFalse.

Parameters

TInt aPosThe document position from which to delete.
TInt aLengthThe number of characters to delete.

DoConstructL(TDocumentStorage, TInt, MTextFieldFactory *)

IMPORT_C voidDoConstructL(TDocumentStorageaStorage,
TIntaDefaultTextGranularity,
MTextFieldFactory *aFieldFactory = NULL
)[protected]

Parameters

TDocumentStorage aStorage
TInt aDefaultTextGranularity
MTextFieldFactory * aFieldFactory = NULL

DoCopyToStoreL(CStreamStore &, CStreamDictionary &, TInt, TInt)

TStreamId DoCopyToStoreL(CStreamStore &aStore,
CStreamDictionary &aDictionary,
TIntaPos,
TIntaLength
)const [protected]

Parameters

CStreamStore & aStore
CStreamDictionary & aDictionary
TInt aPos
TInt aLength

DoExternalizeFieldDataL(RWriteStream &)

IMPORT_C voidDoExternalizeFieldDataL(RWriteStream &aStream)const [protected]

Parameters

RWriteStream & aStream

DoExternalizePlainTextL(RWriteStream &)

IMPORT_C voidDoExternalizePlainTextL(RWriteStream &aStream)const [protected]

Parameters

RWriteStream & aStream

DoExtract(TDes &, TInt, TInt, TUint)

voidDoExtract(TDes &aBuf,
TIntaPos,
TIntaLength,
TUintaFlags = 0
)const [protected]

Parameters

TDes & aBuf
TInt aPos
TInt aLength
TUint aFlags = 0

DoInternalizeFieldDataL(RReadStream &)

IMPORT_C voidDoInternalizeFieldDataL(RReadStream &aStream)[protected]

Parameters

RReadStream & aStream

DoInternalizePlainTextL(RReadStream &)

IMPORT_C voidDoInternalizePlainTextL(RReadStream &aStream)[protected]

Parameters

RReadStream & aStream

DoPasteFromStoreL(const CStreamStore &, TStreamId, TInt)

TInt DoPasteFromStoreL(const CStreamStore &aStore,
TStreamIdaStreamId,
TIntaPos
)[protected]

Parameters

const CStreamStore & aStore
TStreamId aStreamId
TInt aPos

DoPasteFromStreamL(RReadStream &, TInt)

TInt DoPasteFromStreamL(RReadStream &aStream,
TIntaPos
)[private]

Parameters

RReadStream & aStream
TInt aPos

DoPtDelete(TInt, TInt)

IMPORT_C TBoolDoPtDelete(TIntaPos,
TIntaLength
)[protected]

Parameters

TInt aPos
TInt aLength

DoPtInsertL(TInt, const TDesC &)

IMPORT_C voidDoPtInsertL(TIntaPos,
const TDesC &aBuf
)[protected]

Parameters

TInt aPos
const TDesC & aBuf

DocumentLength()

IMPORT_C TIntDocumentLength()const [virtual]

Returns a count of the number of characters in the document, excluding the end-of-text paragraph delimiter.

The number of characters in the document.

ExportAsTextL(const TDes &, TTextOrganisation, TInt)

IMPORT_C voidExportAsTextL(const TDes &aFileName,
TTextOrganisationaTextOrganisation,
TIntaMaxLineLength
)const [virtual]

Parameters

const TDes & aFileName
TTextOrganisation aTextOrganisation
TInt aMaxLineLength

ExportTextL(TInt, RWriteStream &, TTextOrganisation, TInt, TInt, TInt, TInt *, TInt *)

IMPORT_C voidExportTextL(TIntaPos,
RWriteStream &aOutput,
TTextOrganisationaTextOrganisation,
TIntaMaxOutputChars =  KMaxTInt ,
TIntaMaxInputChars =  KMaxTInt ,
TIntaMaxLineLength =  KMaxTInt ,
TInt *aOutputChars = NULL,
TInt *aInputChars = NULL
)const

Parameters

TInt aPos
RWriteStream & aOutput
TTextOrganisation aTextOrganisation
TInt aMaxOutputChars =  KMaxTInt
TInt aMaxInputChars =  KMaxTInt
TInt aMaxLineLength =  KMaxTInt
TInt * aOutputChars = NULL
TInt * aInputChars = NULL

ExportTextL(TInt, RWriteStream &, const TImportExportParam &, TImportExportResult &)

IMPORT_C voidExportTextL(TIntaPos,
RWriteStream &aOutput,
const TImportExportParam &aParam,
TImportExportResult &aResult
)const

Parameters

TInt aPos
RWriteStream & aOutput
const TImportExportParam & aParam
TImportExportResult & aResult

ExtendedInterface(TAny *&, TUid)

IMPORT_C voidExtendedInterface(TAny *&aInterface,
TUidaInterfaceId
)[virtual]

Parameters

TAny *& aInterface
TUid aInterfaceId

ExternalizeFieldDataL(RWriteStream &)

IMPORT_C voidExternalizeFieldDataL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const [virtual]

Parameters

RWriteStream & aStream

ExternalizePlainTextL(RWriteStream &)

IMPORT_C voidExternalizePlainTextL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

ExternalizePlainTextNoLengthCountL(RWriteStream &)

IMPORT_C voidExternalizePlainTextNoLengthCountL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

Extract(TDes &, TInt)

IMPORT_C voidExtract(TDes &aBuf,
TIntaPos = 0
)const [virtual]

Copies a portion of the text into a descriptor.

Starts at the position specified and continues to the end of the document. A length may optionally be specified.

Parameters

TDes & aBufBuffer which on return contains the extracted text.
TInt aPos = 0The document position from which to copy. Must be a valid position, or a panic occurs.

Extract(TDes &, TInt, TInt)

IMPORT_C voidExtract(TDes &aBuf,
TIntaPos,
TIntaLength
)const [virtual]

Copies a portion of the text into a descriptor. Starts at the position specified and continues to the end of the document. A length may optionally be specified.

Parameters

TDes & aBufBuffer which on return contains the extracted text.
TInt aPosThe document position from which to copy. Must be a valid position, or a panic occurs.
TInt aLengthIf specified, the number of characters to copy.

ExtractSelectively(TDes &, TInt, TInt, TUint)

IMPORT_C voidExtractSelectively(TDes &aBuf,
TIntaPos,
TIntaLength,
TUintaFlags
)

Parameters

TDes & aBuf
TInt aPos
TInt aLength
TUint aFlags

FieldCount()

IMPORT_C TIntFieldCount()const

FieldFactory()

IMPORT_C const MTextFieldFactory *FieldFactory()const

FieldSetPresent()

TBool FieldSetPresent()const [private, inline]

FindFields(TInt)

IMPORT_C TBoolFindFields(TIntaPos)const

Parameters

TInt aPos

FindFields(TFindFieldInfo &, TInt, TInt)

IMPORT_C TBoolFindFields(TFindFieldInfo &aInfo,
TIntaPos,
TIntaRange = 0
)const

Parameters

TFindFieldInfo & aInfo
TInt aPos
TInt aRange = 0

GetChar(SScanData &, TChar &)

TBool GetChar(SScanData &aScanData,
TChar &aChar
)const [private]

Parameters

SScanData & aScanData
TChar & aChar

GetWordInfo(TInt, TInt &, TInt &, TBool, TBool)

IMPORT_C voidGetWordInfo(TIntaCurrentPos,
TInt &aStartPos,
TInt &aLength,
TBoolaPictureIsDelimiter,
TBoolaPunctuationIsDelimiter
)const [virtual]

Returns the start position and length of the word that contains the specified document position.

Parameters

TInt aCurrentPosA valid document position.
TInt & aStartPosOn return, the document position of the first character in the word containing document position aCurrentPos.
TInt & aLengthOn return, the length of the word containing document position aCurrentPos. Does not include the trailing word delimiter character.
TBool aPictureIsDelimiterSpecifies whether picture characters should be considered to be word delimiters. For example, this value might be EFalse when navigating a document, but ETrue when carrying out spell checking.
TBool aPunctuationIsDelimiterSpecifies whether puncutation characters should be considered to be word delimiters.

ImportTextFileL(TInt, const TDes &, TTextOrganisation)

IMPORT_C TIntImportTextFileL(TIntaPos,
const TDes &aFileName,
TTextOrganisationaTextOrganisation
)[virtual]

Parameters

TInt aPos
const TDes & aFileName
TTextOrganisation aTextOrganisation

ImportTextL(TInt, RReadStream &, TTextOrganisation, TInt, TInt, TInt *, TInt *)

IMPORT_C voidImportTextL(TIntaPos,
RReadStream &aInput,
TTextOrganisationaTextOrganisation,
TIntaMaxOutputChars =  KMaxTInt ,
TIntaMaxInputChars =  KMaxTInt ,
TInt *aOutputChars = NULL,
TInt *aInputChars = NULL
)

Parameters

TInt aPos
RReadStream & aInput
TTextOrganisation aTextOrganisation
TInt aMaxOutputChars =  KMaxTInt
TInt aMaxInputChars =  KMaxTInt
TInt * aOutputChars = NULL
TInt * aInputChars = NULL

ImportTextL(TInt, RReadStream &, const TImportExportParam &, TImportExportResult &)

IMPORT_C voidImportTextL(TIntaPos,
RReadStream &aInput,
const TImportExportParam &aParam,
TImportExportResult &aResult
)

Parameters

TInt aPos
RReadStream & aInput
const TImportExportParam & aParam
TImportExportResult & aResult

InitScanControl(TInt &, TUint &, TUnitOfText, SScanData &)

voidInitScanControl(TInt &aPos,
TUint &aScanMask,
TUnitOfTextaContext,
SScanData &aScanData
)const [private]

Parameters

TInt & aPos
TUint & aScanMask
TUnitOfText aContext
SScanData & aScanData

InitScanData(TInt, SScanData &)

voidInitScanData(TIntaPos,
SScanData &aScanData
)const [private]

Parameters

TInt aPos
SScanData & aScanData

InsertEodL()

voidInsertEodL()[private]

InsertFieldL(TInt, CTextField *, TUid)

IMPORT_C voidInsertFieldL(TIntaPos,
CTextField *aField,
TUidaFieldType
)

Parameters

TInt aPos
CTextField * aField
TUid aFieldType

InsertL(TInt, const TChar &)

IMPORT_C voidInsertL(TIntaInsertPos,
const TChar &aChar
)[virtual]

Inserts a single character or a descriptor into the text object at a specified document position.

Parameters

TInt aInsertPosA valid document position at which to insert the character or descriptor.
const TChar & aCharThe character to insert.

InsertL(TInt, const TDesC &)

IMPORT_C voidInsertL(TIntaInsertPos,
const TDesC &aBuf
)[virtual]

Inserts a single character or a descriptor into the text object at a specified document position.

Parameters

TInt aInsertPosA valid document position at which to insert the character or descriptor.
const TDesC & aBufThe descriptor to insert.

InsertL(TInt, const CPlainText *)

voidInsertL(TIntaPos,
const CPlainText *aText
)[protected]

Parameters

TInt aPos
const CPlainText * aText

InternalizeFieldDataL(RReadStream &)

IMPORT_C voidInternalizeFieldDataL(RReadStream &aStream)

Parameters

RReadStream & aStream

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)[virtual]

Parameters

RReadStream & aStream

InternalizePlainTextL(RReadStream &)

IMPORT_C voidInternalizePlainTextL(RReadStream &aStream)

Parameters

RReadStream & aStream

InternalizePlainTextL(RReadStream &, TInt)

IMPORT_C voidInternalizePlainTextL(RReadStream &aStream,
TIntaLength
)

Parameters

RReadStream & aStream
TInt aLength

KillFieldSet()

voidKillFieldSet()[private]

NewL(TDocumentStorage, TInt)

IMPORT_C CPlainText *NewL(TDocumentStorageaStorage = ESegmentedStorage,
TIntaDefaultTextGranularity = EDefaultTextGranularity
)[static]

Parameters

TDocumentStorage aStorage = ESegmentedStorage
TInt aDefaultTextGranularity = EDefaultTextGranularity

NewL(const CStreamStore &, TStreamId, MTextFieldFactory *, TDocumentStorage)

IMPORT_C CPlainText *NewL(const CStreamStore &aStore,
TStreamIdaStreamId,
MTextFieldFactory *aFieldFactory = NULL,
TDocumentStorageaStorage = ESegmentedStorage
)[static]

Parameters

const CStreamStore & aStore
TStreamId aStreamId
MTextFieldFactory * aFieldFactory = NULL
TDocumentStorage aStorage = ESegmentedStorage

NewTextFieldL(TUid)

IMPORT_C CTextField *NewTextFieldL(TUidaFieldType)const

Parameters

TUid aFieldType

PageContainingPos(TInt)

IMPORT_C TIntPageContainingPos(TIntaPos)const

Parameters

TInt aPos

ParagraphCount()

IMPORT_C TIntParagraphCount()const [virtual]

Returns a count of the number of paragraphs in the document.

The number of paragraphs in the document. Notes: The end-of-text paragraph delimiter at the end of every document means this function always returns a count of at least one.

ParagraphNumberForPos(TInt &)

IMPORT_C TIntParagraphNumberForPos(TInt &aPos)const [virtual]

Parameters

TInt & aPos

PasteComponentsL(const CStreamStore &, TInt)

voidPasteComponentsL(const CStreamStore &aStore,
TIntaPos
)[protected]

Parameters

const CStreamStore & aStore
TInt aPos

PasteFromStoreL(const CStreamStore &, const CStreamDictionary &, TInt)

IMPORT_C TIntPasteFromStoreL(const CStreamStore &aStore,
const CStreamDictionary &aDictionary,
TIntaPos
)[virtual]

Pastes the contents of the clipboard into the text object at the specified document position.

The number of characters pasted.

Parameters

const CStreamStore & aStoreThe clipboard's store (see class CClipboard).
const CStreamDictionary & aDictionaryThe clipboard's stream dictionary (see class CClipboard).
TInt aPosA valid document position at which to paste the text.

PasteFromStreamL(RReadStream &, TInt)

TInt PasteFromStreamL(RReadStream &aStream,
TIntaPos
)[private]

Parameters

RReadStream & aStream
TInt aPos

PtInsertL(TInt, const TDesC &)

IMPORT_C voidPtInsertL(TIntaInsertPos,
const TDesC &aBuf
)[protected]

Parameters

TInt aInsertPos
const TDesC & aBuf

Read(TInt)

IMPORT_C TPtrCRead(TIntaStartPos)const [virtual]

Gets a read-only pointer descriptor to a portion of the text.

Read-only pointer descriptor to a portion of the text.

Parameters

TInt aStartPosA valid document position from which to read.

Read(TInt, TInt)

IMPORT_C TPtrCRead(TIntaStartPos,
TIntaLength
)const [virtual]

Gets a read-only pointer descriptor to a portion of the text.

Read-only pointer descriptor to a portion of the text.

Parameters

TInt aStartPosA valid document position from which to read.
TInt aLengthIf specified, the number of characters to read, inclusive of the character at position aStartPos. If not specified, the read continues to the end of the document, or the end of the segment if using segmented storage.

RemoveField(TInt)

IMPORT_C TBoolRemoveField(TIntaPos)

Parameters

TInt aPos

Reserved_2()

IMPORT_C voidReserved_2()[private, virtual]

Reset()

IMPORT_C voidReset()[virtual]

Deletes the text content and components from the text object, leaving the single end-of-text paragraph delimiter.

RestoreComponentsL(const CStreamStore &)

IMPORT_C voidRestoreComponentsL(const CStreamStore &aStore)[virtual]

Restores the text components, e.g. fields, pictures and formatting from the stream store. Does not restore the text content.

Parameters

const CStreamStore & aStoreThe stream store from which the text components are restored.

RestoreFieldComponentsL(const CStreamStore &)

IMPORT_C voidRestoreFieldComponentsL(const CStreamStore &aStore)

Parameters

const CStreamStore & aStore

ScanParas(TInt &, TUint &)

IMPORT_C TIntScanParas(TInt &aPos,
TUint &aScanMask
)const [virtual]

Parameters

TInt & aPos
TUint & aScanMask

ScanUnit(TInt &, TUnitOfText, SScanData &)

TInt ScanUnit(TInt &aPos,
TUnitOfTextaContext,
SScanData &aScanData
)const [private]

Parameters

TInt & aPos
TUnitOfText aContext
SScanData & aScanData

ScanWords(TInt &, TUint &)

IMPORT_C TIntScanWords(TInt &aPos,
TUint &aScanMask
)const [virtual]

Parameters

TInt & aPos
TUint & aScanMask

SetFieldFactory(MTextFieldFactory *)

IMPORT_C voidSetFieldFactory(MTextFieldFactory *aFactory)

Parameters

MTextFieldFactory * aFactory

SetPageTable(TPageTable *)

IMPORT_C voidSetPageTable(TPageTable *aPageTable)

Parameters

TPageTable * aPageTable

StoreComponentsL(CStreamStore &, CStoreMap &)

IMPORT_C voidStoreComponentsL(CStreamStore &aStore,
CStoreMap &aMap
)const [virtual]

Stores the text components, e.g. fields, pictures and formatting to the stream store specified. Does not store the text content.

Parameters

CStreamStore & aStoreStream store to which the text components are written.
CStoreMap & aMapA store map. This binds the address of text components to the stream ID of aStore. This is needed to support deferred loading of pictures in rich text.

StoreFieldComponentsL(CStreamStore &, CStoreMap &)

IMPORT_C voidStoreFieldComponentsL(CStreamStore &aStore,
CStoreMap &aMap
)const

Parameters

CStreamStore & aStore
CStoreMap & aMap

TestForDelimiter(TUnitOfText, SScanData &)

TBool TestForDelimiter(TUnitOfTextaContext,
SScanData &aScanData
)const [private]

Parameters

TUnitOfText aContext
SScanData & aScanData

TextField(TInt)

IMPORT_C const CTextField *TextField(TIntaPos)const

Parameters

TInt aPos

ToParagraphStart(TInt &)

IMPORT_C TIntToParagraphStart(TInt &aPos)const [virtual]

Updates a document position to the start of the paragraph.

The number of characters skipped in scanning to the start of the paragraph.

Parameters

TInt & aPosInitially specifies a valid document position. On return, set to the document position of the first character in the paragraph.

UidFromStreamL(RReadStream &)

TUid UidFromStreamL(RReadStream &aStream)[protected, static, inline]

Parameters

RReadStream & aStream

UpdateAllFieldsL()

IMPORT_C voidUpdateAllFieldsL()

UpdateFieldL(TInt)

IMPORT_C voidUpdateFieldL(TIntaPos)[virtual]

Parameters

TInt aPos

UpdatePageTable(TInt, TInt)

voidUpdatePageTable(TIntaPos,
TIntaLength
)[private]

Parameters

TInt aPos
TInt aLength

WordCount()

IMPORT_C TIntWordCount()const [virtual]

Returns a count of the number of words in the document.

The number of words in the document

operator=(const CPlainText &)

CPlainText &operator=(const CPlainText &aPlainTextDoc)[private]

Parameters

const CPlainText & aPlainTextDoc

Member Enumerations Documentation

Enum anonymous

Scan mask values.

Enumerators

EScanBackwards = 0x01

Scan direction is backwards. The default is forwards.

EScanStayIfBoundary = 0x02

If the current document position is a word or paragraph boundary, no scan occurs.

EScanToUnitStart = 0x04

Scan to the first character in the word or paragraph.

EScanToUnitEnd = 0x08

Scan to the last character in the word or paragraph.

EScanJoinDelimiters = 0x10

Treat adjacent word or paragraph delimiters as a single delimiter. Required when performing a word count, for example.

EScanPictureIsDelimiter = 0x20

Picture characters are considered to be word delimiters.

EScanPunctuationIsDelimiter = 0x40

Punctuation characters, except hyphens and apostrophes, are considered to be word delimiters.

Enum anonymous

Enumerators

EExtractAll = 0
EExtractVisible = 1
EExcludeInlineEditedText = 2

Enum anonymous

Enumerators

EImportBufSize = 512
EBiggestCharacterPaste = 0x100000

Enum TScanDataEnd

Used in text scanning functions to indicate the end of the document has been passed.

Enumerators

EScanEndOfData = -1

Indicates that a scan has passed the end of text paragraph delimiter.

Enum TTextOrganisation

Line delimiter translation.

Enumerators

EOrganiseByParagraph

When importing text from a text file, all line feeds are converted into paragraph delimiters.

When exporting text to a text file, lines do not wrap and paragraph delimiters are converted into CR/LF pairs.

EOrganiseByLine

When importing text from a text file, a single line feed or a line feed followed by a carriage return is converted into a space character. A line feed which is followed by another line feed is converted into a CEditableText::EParagraphDelimiter.

When exporting text to a text file, lines wrap at the specified wrap width and paragraph delimiters are converted into CR/LFs pairs.

Enum TUnitOfText

Enumerators

EUnitIsWord
EUnitIsParagraph

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST[protected]

CBufBase * iByteStore

CBufBase *iByteStore[protected]

MTextFieldFactory * iFieldFactory

MTextFieldFactory *iFieldFactory[protected]

TSwizzle< CTextFieldSet > iFieldSet

TSwizzle< CTextFieldSet >iFieldSet[protected]

TPageTable * iPageTable

TPageTable *iPageTable[protected]

void * iReserved_1

void *iReserved_1[private]