CGlobalText Class Reference

class CGlobalText : public CPlainText

Text with globally applied formatting.

Global text uses a single set of paragraph format attributes to describe the appearance of every paragraph and a single set of character format attributes to describe the appearance of every character.

The paragraph formatting is stored in a CParaFormatLayer and the character formatting is stored in a CCharFormatLayer. A format layer is a set of character or paragraph format attributes, which may own a pointer to another format layer. This pointer is called a based-on link. The effective formatting of a global text object is the set of attributes specified in its two format layers, as well as any attributes inherited from the layers' chain of based-on links. To get the effective formatting, the links are read in turn, so that each attribute's value is taken from the first layer in the chain in which it has been set. Use GetCharFormat() and GetParaFormatL() to get the text object's effective formatting.

A global text object references the two format layers; it does not own them. This allows more than one global text object to use the same formatting. The format layers may be modified (see ApplyParaFormatL() and ApplyCharFormatL()) or replaced (see SetGlobalParaFormat() and SetGlobalCharFormat()) during the text object's lifetime.

Inherits from

Public Member Functions
~CGlobalText()
IMPORT_C voidApplyCharFormatL(const TCharFormat &, const TCharFormatMask &, TInt, TInt)
IMPORT_C voidApplyParaFormatL(const CParaFormat *, const TParaFormatMask &, TInt, TInt)
IMPORT_C voidCancelSelectLabel()
IMPORT_C TBoolEnquirePageBreak(TInt, TInt)
IMPORT_C voidGetCharFormat(TCharFormat &, TCharFormatMask &, TInt, TInt)
IMPORT_C voidGetChars(TPtrC &, TCharFormat &, TInt)
IMPORT_C voidGetParaFormatL(CParaFormat *, TParaFormatMask &, TInt, TInt, CParaFormat::TParaFormatGetMode)
IMPORT_C voidGetParagraphFormatL(CParaFormat *, TInt)
IMPORT_C TIntGetPictureSizeInTwips(TSize &, TInt)
const CCharFormatLayer *GlobalCharFormatLayer()
const CParaFormatLayer *GlobalParaFormatLayer()
IMPORT_C TIntLdDocumentLength()
IMPORT_C TIntLdToParagraphStart(TInt &)
IMPORT_C CGlobalText *NewL(const CParaFormatLayer *, const CCharFormatLayer *, TDocumentStorage, TInt)
IMPORT_C CGlobalText *NewL(const CStreamStore &, TStreamId, const CParaFormatLayer *, const CCharFormatLayer *, MTextFieldFactory *, TDocumentStorage)
IMPORT_C CPicture *PictureHandleL(TInt, MLayDoc::TForcePictureLoad)
IMPORT_C TBoolSelectParagraphLabel(TInt)
IMPORT_C voidSetGlobalCharFormat(const CCharFormatLayer *)
IMPORT_C voidSetGlobalParaFormat(const CParaFormatLayer *)
Protected Member Functions
CGlobalText()
CGlobalText(const CParaFormatLayer *, const CCharFormatLayer *)
Private Member Functions
CGlobalText(const CGlobalText &)
CGlobalText &operator=(const CGlobalText &)
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()
CPlainText::CPlainText()
CPlainText::CharPosOfParagraph(TInt &,TInt)const
CPlainText::ComponentInfo()const
CPlainText::ConstructL(TDocumentStorage,TInt)
CPlainText::ConstructL(const CStreamStore &,TStreamId,MTextFieldFactory *,TDocumentStorage)
CPlainText::ConsumeAdornmentL(RReadStream &)
CPlainText::ConvertAllFieldsToText()
CPlainText::ConvertFieldToText(TInt)
CPlainText::CopyComponentsL(CStreamStore &,CStoreMap &,TInt,TInt)const
CPlainText::CopyToStoreL(CStreamStore &,CStreamDictionary &,TInt,TInt)const
CPlainText::CopyToStreamL(RWriteStream &,TInt,TInt)const
CPlainText::Delete(TInt,TInt)
CPlainText::DeleteL(TInt,TInt)
CPlainText::DoConstructL(TDocumentStorage,TInt,MTextFieldFactory *)
CPlainText::DoCopyToStoreL(CStreamStore &,CStreamDictionary &,TInt,TInt)const
CPlainText::DoExternalizeFieldDataL(RWriteStream &)const
CPlainText::DoExternalizePlainTextL(RWriteStream &)const
CPlainText::DoExtract(TDes &,TInt,TInt,TUint)const
CPlainText::DoInternalizeFieldDataL(RReadStream &)
CPlainText::DoInternalizePlainTextL(RReadStream &)
CPlainText::DoPasteFromStoreL(const CStreamStore &,TStreamId,TInt)
CPlainText::DoPtDelete(TInt,TInt)
CPlainText::DoPtInsertL(TInt,const TDesC &)
CPlainText::DocumentLength()const
CPlainText::ExportAsTextL(const TDes &,TTextOrganisation,TInt)const
CPlainText::ExportTextL(TInt,RWriteStream &,TTextOrganisation,TInt,TInt,TInt,TInt *,TInt *)const
CPlainText::ExportTextL(TInt,RWriteStream &,const TImportExportParam &,TImportExportResult &)const
CPlainText::ExtendedInterface(TAny *&,TUid)
CPlainText::ExternalizeFieldDataL(RWriteStream &)const
CPlainText::ExternalizeL(RWriteStream &)const
CPlainText::ExternalizePlainTextL(RWriteStream &)const
CPlainText::ExternalizePlainTextNoLengthCountL(RWriteStream &)const
CPlainText::Extract(TDes &,TInt)const
CPlainText::Extract(TDes &,TInt,TInt)const
CPlainText::ExtractSelectively(TDes &,TInt,TInt,TUint)
CPlainText::FieldCount()const
CPlainText::FieldFactory()const
CPlainText::FindFields(TFindFieldInfo &,TInt,TInt)const
CPlainText::FindFields(TInt)const
CPlainText::GetWordInfo(TInt,TInt &,TInt &,TBool,TBool)const
CPlainText::ImportTextFileL(TInt,const TDes &,TTextOrganisation)
CPlainText::ImportTextL(TInt,RReadStream &,TTextOrganisation,TInt,TInt,TInt *,TInt *)
CPlainText::ImportTextL(TInt,RReadStream &,const TImportExportParam &,TImportExportResult &)
CPlainText::InsertFieldL(TInt,CTextField *,TUid)
CPlainText::InsertL(TInt,const CPlainText *)
CPlainText::InsertL(TInt,const TChar &)
CPlainText::InsertL(TInt,const TDesC &)
CPlainText::InternalizeFieldDataL(RReadStream &)
CPlainText::InternalizeL(RReadStream &)
CPlainText::InternalizePlainTextL(RReadStream &)
CPlainText::InternalizePlainTextL(RReadStream &,TInt)
CPlainText::NewL(TDocumentStorage,TInt)
CPlainText::NewL(const CStreamStore &,TStreamId,MTextFieldFactory *,TDocumentStorage)
CPlainText::NewTextFieldL(TUid)const
CPlainText::PageContainingPos(TInt)const
CPlainText::ParagraphCount()const
CPlainText::ParagraphNumberForPos(TInt &)const
CPlainText::PasteComponentsL(const CStreamStore &,TInt)
CPlainText::PasteFromStoreL(const CStreamStore &,const CStreamDictionary &,TInt)
CPlainText::PtInsertL(TInt,const TDesC &)
CPlainText::Read(TInt)const
CPlainText::Read(TInt,TInt)const
CPlainText::RemoveField(TInt)
CPlainText::Reset()
CPlainText::RestoreComponentsL(const CStreamStore &)
CPlainText::RestoreFieldComponentsL(const CStreamStore &)
CPlainText::ScanParas(TInt &,TUint &)const
CPlainText::ScanWords(TInt &,TUint &)const
CPlainText::SetFieldFactory(MTextFieldFactory *)
CPlainText::SetPageTable(TPageTable *)
CPlainText::StoreComponentsL(CStreamStore &,CStoreMap &)const
CPlainText::StoreFieldComponentsL(CStreamStore &,CStoreMap &)const
CPlainText::TextField(TInt)const
CPlainText::ToParagraphStart(TInt &)const
CPlainText::UidFromStreamL(RReadStream &)
CPlainText::UpdateAllFieldsL()
CPlainText::UpdateFieldL(TInt)
CPlainText::WordCount()const
CPlainText::~CPlainText()
Inherited Enumerations
CEditableText:@52
CEditableText:@53
CEditableText:TDocumentStorage
CPlainText:@54
CPlainText:@55
CPlainText:@56
CPlainText:TScanDataEnd
CPlainText:TTextOrganisation
CPlainText:TUnitOfText
Protected Attributes
__DECLARE_TEST
const CCharFormatLayer *iGlobalCharFormatLayer
const CParaFormatLayer *iGlobalParaFormatLayer
Private Attributes
void *iReserved_2
Inherited Attributes
CEditableText::iHasChanged
CPlainText::iByteStore
CPlainText::iFieldFactory
CPlainText::iFieldSet
CPlainText::iPageTable

Constructor & Destructor Documentation

CGlobalText()

IMPORT_CCGlobalText()[protected]

CGlobalText(const CParaFormatLayer *, const CCharFormatLayer *)

IMPORT_CCGlobalText(const CParaFormatLayer *aGlobalParaLayer,
const CCharFormatLayer *aGlobalCharLayer
)[protected]

Parameters

const CParaFormatLayer * aGlobalParaLayer
const CCharFormatLayer * aGlobalCharLayer

CGlobalText(const CGlobalText &)

CGlobalText(const CGlobalText &aGlobalText)[private]

Parameters

const CGlobalText & aGlobalText

~CGlobalText()

IMPORT_C~CGlobalText()

Member Functions Documentation

ApplyCharFormatL(const TCharFormat &, const TCharFormatMask &, TInt, TInt)

IMPORT_C voidApplyCharFormatL(const TCharFormat &aFormat,
const TCharFormatMask &aMask,
TIntaPos,
TIntaLength
)[virtual]

Parameters

const TCharFormat & aFormat
const TCharFormatMask & aMask
TInt aPos
TInt aLength

ApplyParaFormatL(const CParaFormat *, const TParaFormatMask &, TInt, TInt)

IMPORT_C voidApplyParaFormatL(const CParaFormat *aFormat,
const TParaFormatMask &aMask,
TIntaPos,
TIntaLength
)[virtual]

Parameters

const CParaFormat * aFormat
const TParaFormatMask & aMask
TInt aPos
TInt aLength

CancelSelectLabel()

IMPORT_C voidCancelSelectLabel()[virtual]

EnquirePageBreak(TInt, TInt)

IMPORT_C TBoolEnquirePageBreak(TIntaPos,
TIntaLength = 0
)const [virtual]

Parameters

TInt aPos
TInt aLength = 0

GetCharFormat(TCharFormat &, TCharFormatMask &, TInt, TInt)

IMPORT_C voidGetCharFormat(TCharFormat &aFormat,
TCharFormatMask &aVaries,
TIntaPos,
TIntaLength
)const [virtual]

Parameters

TCharFormat & aFormat
TCharFormatMask & aVaries
TInt aPos
TInt aLength

GetChars(TPtrC &, TCharFormat &, TInt)

IMPORT_C voidGetChars(TPtrC &aView,
TCharFormat &aFormat,
TIntaStartPos
)const [virtual]

Parameters

TPtrC & aView
TCharFormat & aFormat
TInt aStartPos

GetParaFormatL(CParaFormat *, TParaFormatMask &, TInt, TInt, CParaFormat::TParaFormatGetMode)

IMPORT_C voidGetParaFormatL(CParaFormat *aFormat,
TParaFormatMask &aVaries,
TIntaPos,
TIntaLength,
CParaFormat::TParaFormatGetModeaMode = CParaFormat::EAllAttributes
)const [virtual]

Parameters

CParaFormat * aFormat
TParaFormatMask & aVaries
TInt aPos
TInt aLength
CParaFormat::TParaFormatGetMode aMode = CParaFormat::EAllAttributes

GetParagraphFormatL(CParaFormat *, TInt)

IMPORT_C voidGetParagraphFormatL(CParaFormat *aFormat,
TIntaPos
)const [virtual]

Parameters

CParaFormat * aFormat
TInt aPos

GetPictureSizeInTwips(TSize &, TInt)

IMPORT_C TIntGetPictureSizeInTwips(TSize &aSize,
TIntaPos
)const [virtual]

Parameters

TSize & aSize
TInt aPos

GlobalCharFormatLayer()

const CCharFormatLayer *GlobalCharFormatLayer()const [inline]

Gets the character format layer referenced by the global text object.

Pointer to the character format layer referenced by the global text object.

GlobalParaFormatLayer()

const CParaFormatLayer *GlobalParaFormatLayer()const [inline]

Gets the paragraph format layer referenced by the global text object.

Pointer to the paragraph format layer referenced by the global text object.

LdDocumentLength()

IMPORT_C TIntLdDocumentLength()const [virtual]

LdToParagraphStart(TInt &)

IMPORT_C TIntLdToParagraphStart(TInt &aCurrentPos)const [virtual]

Parameters

TInt & aCurrentPos

NewL(const CParaFormatLayer *, const CCharFormatLayer *, TDocumentStorage, TInt)

IMPORT_C CGlobalText *NewL(const CParaFormatLayer *aGlobalParaLayer,
const CCharFormatLayer *aGlobalCharLayer,
TDocumentStorageaStorage = ESegmentedStorage,
TIntaDefaultTextGranularity = EDefaultTextGranularity
)[static]

Parameters

const CParaFormatLayer * aGlobalParaLayer
const CCharFormatLayer * aGlobalCharLayer
TDocumentStorage aStorage = ESegmentedStorage
TInt aDefaultTextGranularity = EDefaultTextGranularity

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

IMPORT_C CGlobalText *NewL(const CStreamStore &aStore,
TStreamIdaStreamId,
const CParaFormatLayer *aGlobalParaLayer,
const CCharFormatLayer *aGlobalCharLayer,
MTextFieldFactory *aFieldFactory = NULL,
TDocumentStorage = ESegmentedStorage
)[static]

Parameters

const CStreamStore & aStore
TStreamId aStreamId
const CParaFormatLayer * aGlobalParaLayer
const CCharFormatLayer * aGlobalCharLayer
MTextFieldFactory * aFieldFactory = NULL
TDocumentStorage  = ESegmentedStorage

PictureHandleL(TInt, MLayDoc::TForcePictureLoad)

IMPORT_C CPicture *PictureHandleL(TIntaPos,
MLayDoc::TForcePictureLoadaForceLoad
)const [virtual]

Parameters

TInt aPos
MLayDoc::TForcePictureLoad aForceLoad

SelectParagraphLabel(TInt)

IMPORT_C TBoolSelectParagraphLabel(TIntaPos)[virtual]

Parameters

TInt aPos

SetGlobalCharFormat(const CCharFormatLayer *)

IMPORT_C voidSetGlobalCharFormat(const CCharFormatLayer *aCharFormatLayer)

Parameters

const CCharFormatLayer * aCharFormatLayer

SetGlobalParaFormat(const CParaFormatLayer *)

IMPORT_C voidSetGlobalParaFormat(const CParaFormatLayer *aParaFormatLayer)

Parameters

const CParaFormatLayer * aParaFormatLayer

operator=(const CGlobalText &)

CGlobalText &operator=(const CGlobalText &aGlobalText)[private]

Parameters

const CGlobalText & aGlobalText

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST[protected]

const CCharFormatLayer * iGlobalCharFormatLayer

const CCharFormatLayer *iGlobalCharFormatLayer[protected]

const CParaFormatLayer * iGlobalParaFormatLayer

const CParaFormatLayer *iGlobalParaFormatLayer[protected]

void * iReserved_2

void *iReserved_2[private]