CParaFormatLayer Class Reference

class CParaFormatLayer : public CFormatLayer

A paragraph format layer.

Has a pointer (stored in its base class CFormatLayer) to another paragraph format layer which may be NULL. This pointer is referred to as the based-on link. A paragraph format layer is owned by an instance of the CGlobalText class and stores the object's global paragraph formatting. Implements persistence and allows attributes to be set and sensed.

Inherits from

Public Member Functions
CParaFormatLayer *CloneL()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidInternalizeL(RReadStream &, const CFormatLayer *)
IMPORT_C TBoolIsIdenticalL(const CParaFormat *, const TParaFormatMask &)
CParaFormatLayer *NewCopyBaseL(const CParaFormatLayer *)
IMPORT_C CParaFormatLayer *NewL()
IMPORT_C CParaFormatLayer *NewL(const CParaFormat *, const TParaFormatMask &)
IMPORT_C CParaFormatLayer *NewL(RReadStream &)
CParaFormatLayer *NewL(const CParaFormatLayer *)
IMPORT_C const TUint8 *Ptr(TInt &)
IMPORT_C voidSenseL(CParaFormat *, TParaFormatMask &, CParaFormat::TParaFormatGetMode)
IMPORT_C voidSetL(const CParaFormat *, const TParaFormatMask &)
IMPORT_C TUidType()
Protected Member Functions
CParaFormatLayer()
CFormatLayer *RestoreNewL(RReadStream &)
Private Member Functions
CParaFormatLayer(const CParaFormatLayer &)
voidCleanupBorders(CParaFormat *)
voidCleanupEffectiveFormat(CParaFormat *, TParaFormatMask)
voidFillParaFormatL(CParaFormat *, TParaFormatMask &, CParaFormat::TParaFormatGetMode)
CParaFormatLayer &operator=(const CParaFormatLayer &)
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()
CFormatLayer::CFormatLayer()
CFormatLayer::ChainCount()const
CFormatLayer::CloneLayerL(CFormatLayer *)const
CFormatLayer::ExternalizeChainL(RWriteStream &,TInt)const
CFormatLayer::ExternalizeLayersRecurseL(RWriteStream &,TInt)const
CFormatLayer::InternalizeChainL(RReadStream &,const CFormatLayer *)
CFormatLayer::IsEmpty()const
CFormatLayer::IsIdentical(const TUint8 *,TInt)const
CFormatLayer::Reset()
CFormatLayer::SenseBase()const
CFormatLayer::SetBase(const CFormatLayer *)
CFormatLayer::Swap(CFormatLayer &)
CFormatLayer::~CFormatLayer()
Inherited Attributes
CFormatLayer::__DECLARE_TEST
CFormatLayer::iBasedOn
CFormatLayer::iStore

Constructor & Destructor Documentation

CParaFormatLayer(const CParaFormatLayer &)

CParaFormatLayer(const CParaFormatLayer &aParaFormatLayer)[private]

Parameters

const CParaFormatLayer & aParaFormatLayer

CParaFormatLayer()

CParaFormatLayer()[protected]

Constructor.

Member Functions Documentation

CleanupBorders(CParaFormat *)

voidCleanupBorders(CParaFormat *aParaFormat)const [private]

Parameters

CParaFormat * aParaFormat

CleanupEffectiveFormat(CParaFormat *, TParaFormatMask)

voidCleanupEffectiveFormat(CParaFormat *aParaFormat,
TParaFormatMaskaMask
)const [private]

Parameters

CParaFormat * aParaFormat
TParaFormatMask aMask

CloneL()

CParaFormatLayer *CloneL()const [inline]

Constructs and returns a new CParaFormatLayer with identical formatting to the current layer. Note that the function does not copy the original layer's based-on link - the new layer's based-on link is set to NULL, so that the two layers may not have the same effective formatting.

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const [virtual]

Implementations of this function externalise the format layer but not its based-on link to a write stream. The presence of this function means that the standard templatedoperator<<() (defined in s32strm.h) is available to externalise objects of the derived class.

Parameters

RWriteStream & aStreamStream to which the format layer should be externalised.

FillParaFormatL(CParaFormat *, TParaFormatMask &, CParaFormat::TParaFormatGetMode)

voidFillParaFormatL(CParaFormat *aParaFormat,
TParaFormatMask &aMask,
CParaFormat::TParaFormatGetModeaMode
)const [private]

Fills aParaFormat by dumping the current format layer into it. Next traverse the 'basedOn' link if it is not NULL, and repeat.

Parameters

CParaFormat * aParaFormat
TParaFormatMask & aMask
CParaFormat::TParaFormatGetMode aMode

InternalizeL(RReadStream &, const CFormatLayer *)

IMPORT_C voidInternalizeL(RReadStream &aStream,
const CFormatLayer *aBase = NULL
)[virtual]

Internalises the paragraph format layer but not its based-on link from a read stream. The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class. The internalised layer is set to be based on the layer specified.

Parameters

RReadStream & aStreamStream from which the format layer should be internalised.
const CFormatLayer * aBase = NULLThe based-on link to assign to the layer. By default NULL.

IsIdenticalL(const CParaFormat *, const TParaFormatMask &)

IMPORT_C TBoolIsIdenticalL(const CParaFormat *aParaFormat,
const TParaFormatMask &aMask
)const

Compares a format attribute container with the current layer. For the two objects to be identical, the current layer must contain only the attributes specified in the argument aMask, and these attributes must have the same values as those in aParaFormat. None of the current layer's based-on links are searched.

Parameters

const CParaFormat * aParaFormatContains the attribute values used in the comparison.
const TParaFormatMask & aMaskA bitmask specifying which attributes are relevant to the function.

NewCopyBaseL(const CParaFormatLayer *)

CParaFormatLayer *NewCopyBaseL(const CParaFormatLayer *aLayer)[static]

Parameters

const CParaFormatLayer * aLayer

NewL()

IMPORT_C CParaFormatLayer *NewL()[static]

Allocates and constructs an empty CParaFormatLayer. Its based-on link is NULL.

Note: Use SetL() to set format attributes in the layer. Use SetBase(), defined in the base class CFormatLayer, to set the layer's based on link.

NewL(const CParaFormat *, const TParaFormatMask &)

IMPORT_C CParaFormatLayer *NewL(const CParaFormat *aParaFormat,
const TParaFormatMask &aMask
)[static]

Parameters

const CParaFormat * aParaFormat
const TParaFormatMask & aMask

NewL(RReadStream &)

IMPORT_C CParaFormatLayer *NewL(RReadStream &aStream)[static]

Parameters

RReadStream & aStream

NewL(const CParaFormatLayer *)

CParaFormatLayer *NewL(const CParaFormatLayer *aLayer)[static]

Parameters

const CParaFormatLayer * aLayer

Ptr(TInt &)

IMPORT_C const TUint8 *Ptr(TInt &aSize)const

Return a pointer to the stored bytecode.

Parameters

TInt & aSize

RestoreNewL(RReadStream &)

CFormatLayer *RestoreNewL(RReadStream &aStream)[protected, virtual]

Return a new CParaFormatLayer, having restored it from aStream. Overrides the base class method, to provide a new format layer of the correct type.

Parameters

RReadStream & aStream

SenseL(CParaFormat *, TParaFormatMask &, CParaFormat::TParaFormatGetMode)

IMPORT_C voidSenseL(CParaFormat *aParaFormat,
TParaFormatMask &aMask,
CParaFormat::TParaFormatGetModeaMode = CParaFormat::EAllAttributes
)const

Senses the formatting which has been applied to the current layer only. No based-on links are searched. This function does not get the effective formatting, but the resulting aParaFormat is useable even if not all attributes are flagged for sensing in aMask because any attribute values not sensed from the current layer, are set to default values.

The function can only leave if aMode has a value of EAllAttributes.

Parameters

CParaFormat * aParaFormatOn return, contains the formatting which has been applied to the current layer only. Any attributes not explicitly set in the current layer are initialised to the default values for a CParaFormat. Attributes specified in aMask are not sensed from this layer. The values for these attributes are also initialised to the default settings. Must not be NULL or a panic occurs.
TParaFormatMask & aMaskA bitmask. Any attributes which are set in the mask as passed into the function are not sensed from the current layer. On return, indicates the attributes which were sensed from this layer. So, normally, when passed to the function, all attributes in the mask should be unset.
CParaFormat::TParaFormatGetMode aMode = CParaFormat::EAllAttributesControls which attributes are written to aParaFormat. If EAllAttributes, all attributes are written; if EFixedAttributes, tabs, bullets and borders are not written.

SetL(const CParaFormat *, const TParaFormatMask &)

IMPORT_C voidSetL(const CParaFormat *aDesiredEffectiveFormat,
const TParaFormatMask &aMask
)

Sets the layer's format attributes. The attributes which are set in the mask are set in the layer to the values specified in the format container aDesiredEffectiveFormat. The attributes which are not set in the mask are not changed.

Note: Any tab stops in aDesiredEffectiveFormat are merged with the tab stops in the current layer.

Parameters

const CParaFormat * aDesiredEffectiveFormatContains the attribute values to assign to the format layer.
const TParaFormatMask & aMaskMask specifying which attributes should be set from aDesiredEffectiveFormat.

Type()

IMPORT_C TUidType()const [virtual]

Returns the paragraph format layer UID. This can be used to distinguish between an ordinary paragraph format layer and paragraph styles, which have a different UID.

operator=(const CParaFormatLayer &)

CParaFormatLayer &operator=(const CParaFormatLayer &aParaFormatLayer)[private]

Parameters

const CParaFormatLayer & aParaFormatLayer