class CParagraphStyle : public CParaFormatLayer |
Defines a paragraph style.
A paragraph style is a named paragraph format layer which owns a set of character format attributes, has an outline level and a type UID. The outline level controls which headings should be shown when in document outline view. The type UID is used to differentiate between a word processor's built-in styles, which cannot be deleted, and user-defined styles, which can be deleted.
The style's paragraph format attributes can be set using the functions derived from the base class CParaFormatLayer. Its character format attributes can be set through the owned CCharFormatLayer*. The style's character and paragraph format attributes are based on the global format layers specified on construction.
Public Member Functions | |
---|---|
~CParagraphStyle() | |
CCharFormatLayer * | CharFormatLayer() |
CParagraphStyle * | CloneL() |
IMPORT_C CParagraphStyle * | NewL(const CParaFormatLayer &, const CCharFormatLayer &) |
TInt | OutlineLevel() |
void | SetOutlineLevel(TInt) |
void | SetType(TUid) |
IMPORT_C TUid | Type() |
Private Member Functions | |
---|---|
CParagraphStyle() | |
void | ConstructL(const CParaFormatLayer &, const CCharFormatLayer &) |
IMPORT_C CFormatLayer * | DoCloneL() |
void | ExternalizeL(RWriteStream &) |
void | InternalizeL(RReadStream &, const CFormatLayer *, const CFormatLayer *) |
CParagraphStyle * | NewL(RReadStream &, const CParaFormatLayer &, const CCharFormatLayer &) |
Public Member Enumerations | |
---|---|
enum | TApplyParaStyleMode { ERetainAllSpecificFormats, ERetainNoSpecificFormats, ERetainSpecificParaFormat, ERetainSpecificCharFormat } |
enum | TStylePasteMode { EAddNewStyles, EConvertNewStyles, EIgnoreNewStyles } |
Public Attributes | |
---|---|
TParagraphStyleName | iName |
Private Attributes | |
---|---|
CCharFormatLayer * | iCharFormatLayer |
TInt | iOutlineLevel |
TUid | iType |
Inherited Attributes | |
---|---|
CFormatLayer::__DECLARE_TEST | |
CFormatLayer::iBasedOn | |
CFormatLayer::iStore |
CCharFormatLayer * | CharFormatLayer | ( | ) | const [inline] |
Gets a pointer to the character format layer owned by the object.
Note
The style's character formatting is set and retrieved using this pointer.
Pointer to the style's global character format layer.
CParagraphStyle * | CloneL | ( | ) | const [inline] |
Creates and returns a CParagraphStyle object which is a clone of the current style.
Pointer to a clone of the current style.
void | ConstructL | ( | const CParaFormatLayer & | aGlobalParaFormatLayer, |
const CCharFormatLayer & | aGlobalCharFormatLayer | |||
) | [private] |
const CParaFormatLayer & aGlobalParaFormatLayer | |
const CCharFormatLayer & aGlobalCharFormatLayer |
void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [private, 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.
RWriteStream & aStream | Stream to which the format layer should be externalised. |
void | InternalizeL | ( | RReadStream & | aStream, |
const CFormatLayer * | aParaLayerBase, | |||
const CFormatLayer * | aCharLayerBase | |||
) | [private, virtual] |
RReadStream & aStream | |
const CFormatLayer * aParaLayerBase | |
const CFormatLayer * aCharLayerBase |
IMPORT_C CParagraphStyle * | NewL | ( | const CParaFormatLayer & | aGlobalParaFormatLayer, |
const CCharFormatLayer & | aGlobalCharFormatLayer | |||
) | [static] |
const CParaFormatLayer & aGlobalParaFormatLayer | |
const CCharFormatLayer & aGlobalCharFormatLayer |
CParagraphStyle * | NewL | ( | RReadStream & | aStream, |
const CParaFormatLayer & | aGlobalParaFormatLayer, | |||
const CCharFormatLayer & | aGlobalCharFormatLayer | |||
) | [private, static] |
RReadStream & aStream | |
const CParaFormatLayer & aGlobalParaFormatLayer | |
const CCharFormatLayer & aGlobalCharFormatLayer |
TInt | OutlineLevel | ( | ) | const [inline] |
Gets the style's outline level.
The style's outline level.
void | SetOutlineLevel | ( | TInt | aOutlineLevel | ) | [inline] |
Sets the style's outline level.
TInt aOutlineLevel | The style's new outline level. |
void | SetType | ( | TUid | aType | ) | [inline] |
Sets the style's type UID. On construction, the style's type UID is initialized to KUserDefinedParagraphStyleUid to distinguish it from ordinary paragraph format layers, which have a type of KNormalParagraphStyleUid. This function can be used to change it to another value.
TUid aType | The style's type UID. |
Retention of specific formatting
ERetainAllSpecificFormats |
Specific character and paragraph formatting which has been applied to the paragraph is retained when a style is applied. If the style's formatting conflicts with the specific formatting, the specific formatting overrides the style. |
ERetainNoSpecificFormats |
Specific character and paragraph formatting which has been applied to the paragraph is removed when a style is applied, regardless of whether or not it conflicts with the style. |
ERetainSpecificParaFormat |
Specific paragraph formatting which has been applied to the paragraph is retained when a style is applied. If the style's formatting conflicts with the specific paragraph formatting, the specific formatting overrides the style. Specific character formatting which has been applied to the paragraph is removed, regardless of whether or not it conflicts with the style. |
ERetainSpecificCharFormat |
Specific character formatting which has been applied to the paragraph is retained when a style is applied. If the style's formatting conflicts with the specific character formatting, the specific formatting overrides the style. Specific paragraph formatting which has been applied to the paragraph is removed, regardless of whether or not it conflicts with the style. |
Controls what happens to the styles when styled rich text is pasted into another rich text object.
EAddNewStyles |
The pasted rich text retains all formatting and any new style definitions are added to the style list of the rich text object into which it is pasted. |
EConvertNewStyles |
The pasted rich text retains all formatting, including that specified in the styles, but the new style definitions are not added to the style list of the rich text object into which it is pasted. The formatting specified in the styles becomes specific formatting. |
EIgnoreNewStyles |
The pasted rich text loses all formatting specified in the styles. |
TParagraphStyleName | iName |
Unique style name, with a maximum of 32 characters.