TCustomRichView.OnWriteObjectProperties

<< Click to display table of contents >>

TCustomRichView.OnWriteObjectProperties

Occurs when TRichView saves non-text objects to RTF, DocX, or HTML; allows saving additional item properties.

type // Defined in RVStyle unit
  TRVObjectExportProperties = record
    Id, Name: TRVUnicodeString;
  end;
 
type
  TRVWriteObjectPropertiesEvent = procedure(Sender: TCustomRichView;
    RVData: TCustomRVData; ItemNo: Integer;

    SaveFormat: TRVSaveFormat;
    var Props: TRVObjectExportProperties) of object;
 
property OnWriteObjectProperties: TRVWriteObjectPropertiesEvent;

(introduced in version 19)

This event occurs when saving objects of the following types:

pictures and hot-pictures;

bullets and hotspots;

list markers containing images;

equations;

shapes (in Report Workshop).

All these items are exported as pictures.

 

Input parameters:

RVData a document containing an item to save (it may be Sender.RVData, or table cell, or cell inplace editor's RVData)

ItemNo an index of this item inside RVData.

SaveFormat can be rvsfHTML or rvsfRTF or rvsfDocX

Props contains initial values of properties.

 

Output parameters:

Props contains values of properties that will be saved in the file.

 

Properties for saving

Props.Id contains an object identifier. If specified, it must be unique within a document.

Format

Initial value of Id

Requirements for Id

rvsfRTF

'' (empty string)

If empty string, the identifier is not saved.

Otherwise, it must be an integer value encoded as a string. We highly recommend using negative numbers for RTF image identifiers (zero or small positive values may result corrupted picture).

rvsfDocX

An integer number encoded as a string. This number is auto-generated during DocX saving, and may be changed on each saving.

The identifier must be unique integer value encoded as a string.

rvsfHTML

'' (empty string)

If empty string, the identifier is not saved.

Otherwise, it must contains a string that begins with a letter (['A'..'Z','a'..'z']) and may be followed by any number of letters, digits (['0'..'9']), hyphens ('-'), underscores ('_'), colons (':'), and periods ('.').

Props.Name contains an object name.

Format

Initial value of Name

Requirements for Name

rvsfRTF

'' (empty string)

Name is not saved, ignored.

rvsfDocX

'Pic N', where N is the initial value of Prop.Id.

Any string without line breaks.

rvsfHTML

'' (empty string)

Name is not saved, ignored.