rvico TRichView Reference | TRichView

TCustomRichView.OnSaveDocXExtra

Top  Previous  Next

Allows saving additional information in DocX.

type

  TRVDocXSaveArea = // defined in RVStyle.pas

   (rv_docxs_TextStyle, rv_docxs_ParaStyle, 

    rv_docxs_ListStyle, rv_docxs_StyleTemplate, 

    rv_docxs_StyleTemplateText, rv_docxs_StyleTemplatePara,

    rv_docxs_CellProps, rv_docxs_RowProps, rv_docxs_TableProps,

    rv_docxs_SectProps, rv_docxs_Settings, rv_docxs_CoreProperties);

 TRVSaveDocXExtraEvent = procedure (Sender: TCustomRichView;

   Area: TRVDocXSaveArea; Obj: TObject;

   Index1, Index2: Integer; var OOXMLCode: TRVAnsiStringof object;

 

property OnSaveDocXExtra: TRVSaveDocXExtraEvent;

This event occurs when saving DocX (SaveDocX, SaveDocXToStream).

Text assigned to OOXMLCode parameter will be saved in DocX. This text must be encoded as UTF-8.

Area defines a place where OOXMLCode will be inserted. Meaning of Index1, Index2 and Obj depends on Area.

Area

Meaning

Parent XML Element

XML file

rv_docxs_TextStyle

Occurs when saving a text style.
Index1 is an index of the text style in TextStyles collection, Obj is a text style object

<w:rPr>

document files*

rv_docxs_ParaStyle

Occurs when saving a paragraph style.
Index1 is an index of the paragraph style in ParaStyles collection, Obj is a paragraph style object

<w:pPr>

document files*

rv_rtfs_ListStyle

Occurs when saving a list style and list levels.
Index1 is an index of the list style in ListStyles.
Index2 equals to -1 when saving the list description, or  it equals to the level index when saving a list level.
Obj is a list style object

if Index2 = -1:

<w:abstractNum>;

if Index2 >= 0:

<w:lvl>

word/numbering.xml

rv_docxs_StyleTemplate

Occurs when saving a style template as a style sheet item.

Index1 is an index of the style template in StyleTemplates.

Obj is a style template.

<w:style>

word/styles.xml

rv_docxs_StyleTemplateText

Occurs when saving text attributes of a style template inside a style sheet item.

Index1 is an index of the style template in StyleTemplates.

Obj is a style template.

<w:rPr> inside <w:style>

word/styles.xml

rv_docxs_StyleTemplatePara

Occurs when saving paragraph attributes of a style template inside a style sheet item.

Index1 is an index of the style template in StyleTemplates.

Obj is a style template.

<w:pPr> inside <w:style>

word/styles.xml

rv_docxs_CellProps

Occurs when saving table cell properties
Index1 = row index, Index2 =column index, Obj is the table.

<w:tcPr>

document files*

rv_docxs_RowProps

Occurs when saving table row properties.
Index1 = row index, Obj is the table.

<w:trPr>

document files*

rv_docxs_TableProps

Occurs when saving table properties.
Obj is the table.

<w:tblPr>

document files*

rv_docxs_SectProps

Occurs when saving page properties.

<w:sectPr>

word/document.xml

rv_docxs_Settings

Occurs when saving document settings.

<w:settings>

word/settings.xml

rv_docxs_CoreProperties

Occurs when saving document properties.

<cp:coreProperties>

docProps/core.xml

* - "document files" include:

word/document.xml

word/footnotes.xml

word/endnotes.xml

XML files used for saving headers and footers (header.xml. footer.xml, etc.)

See also properties:

DocParameters.

See also events:

OnSaveRTFExtra.

OnSaveHTMLExtra.


TRichView © trichview.com