#include <txtstyle.h>
class CParagraphStyle : public CParaFormatLayer |
Public Attributes | |
---|---|
TParagraphStyleName | iName |
Public Member Enumerations | |
---|---|
enum | TApplyParaStyleMode { ERetainAllSpecificFormats, ERetainNoSpecificFormats, ERetainSpecificParaFormat, ERetainSpecificCharFormat } |
enum | TStylePasteMode { EAddNewStyles, EConvertNewStyles, EIgnoreNewStyles } |
Public Member Functions | |
---|---|
~CParagraphStyle() | |
CCharFormatLayer * | CharFormatLayer() |
CParagraphStyle * | CloneL() |
IMPORT_C CParagraphStyle * | NewL(const CParaFormatLayer &, const CCharFormatLayer &) |
TInt | OutlineLevel() |
void | SetOutlineLevel(TInt) |
void | SetType(TUid) |
virtual IMPORT_C TUid | Type() |
Inherited Attributes | |
---|---|
CFormatLayer::__DECLARE_TEST | |
CFormatLayer::iBasedOn | |
CFormatLayer::iStore |
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.
Retention of specific formatting
Controls what happens to the styles when styled rich text is pasted into another rich text object.
IMPORT_C | ~CParagraphStyle | ( | ) |
The destructor frees all resources owned by the object, prior to its destruction.
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.
Returns: Pointer to the style's global character format layer.
CParagraphStyle * | CloneL | ( | ) | const [inline] |
Reimplemented from CParaFormatLayer::CloneL()const
Creates and returns a CParagraphStyle object which is a clone of the current style.
Returns: Pointer to a clone of the current style.
IMPORT_C CParagraphStyle * | NewL | ( | const CParaFormatLayer & | aGlobalParaFormatLayer, |
const CCharFormatLayer & | aGlobalCharFormatLayer | |||
) | [static] |
Allocates and constructs a CParagraphStyle object whose formatting is based on a global paragraph and character format layer. The type UID is initialised to KUserDefinedParagraphStyleUid. The outline level is not initialised.
Parameter | Description |
---|---|
aGlobalParaFormatLayer | The paragraph format layer on which the style's paragraph formatting is based. |
aGlobalCharFormatLayer | The character format layer on which the style's character formatting is based. |
Returns: Pointer to the new CParagraphStyle object.
TInt | OutlineLevel | ( | ) | const [inline] |
Gets the style's outline level.
Returns: The style's outline level.
void | SetOutlineLevel | ( | TInt | aOutlineLevel | ) | [inline] |
Sets the style's outline level.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aType | The style's type UID. |
IMPORT_C TUid | Type | ( | ) | const [virtual] |
Reimplemented from CParaFormatLayer::Type()const
Gets the style's type UID.
Returns: The style's type UID.