TRVFReaderStyleMode Type

<< Click to display table of contents >>

TRVFReaderStyleMode Type

Unit [VCL/FMX] RVStyle / fmxRVStyle;

type

  TRVFReaderStyleMode = 

  (rvf_sIgnore, rvf_sInsertMap, rvf_sInsertMerge)

Defines a mode for loading collection of styles from RVF (if they are contained there, see rvfoSaveTextStyles and rvfoSaveParaStyles RVFOptions).

This is a type of the following properties of TCustomRichView:

RVFTextStylesReadMode (loading Style.TextStyles);

RVFParaStylesReadMode (loading Style.ParaStyles and Style.ListStyles).

Mode

When loading RVF...

When Inserting RVF...

rvf_sIgnore

Collections of styles in RVF are ignored. For correct loading, this RVF file must be saved with the same collections of styles.

rvf_sInsertMerge

Current collection of styles will be replaced with values from RVF.

 

Current styles will be merged with styles from RVF (new styles will be added to the collection, if necessary).

rvf_sInsertMap

Current collection of styles will be replaced with values from RVF.

Styles from RVF will be mapped to the most similar existing styles. New styles will not be added.

You should be careful with the last two modes: it's recommended to use them only if TRVStyle component is used exclusively by the given TRichView[Edit].

If style templates are used, and RVFTextStylesReadMode=RVFParaStylesReadMode=rvf_sInsertMerge, and StyleTemplateInsertMode<>rvstimIgnoreSourceStyleTemplates, the RVF loading methods replace the existing Style.StyleTemplates with the style templates read from RVF; the RVF insertion methods merge the collection of style templates from RVF into the existing style templates, and read text and paragraph styles according to StyleTemplateInsertMode.

Loading operations include:

LoadRVF,

LoadRVFFromStream,

loading from database fields.

Insertion operations include:

InsertRVFFromStream,

AppendRVFFromStream,

TRichViewEdit.InsertRVFFromFileEd,

TRichViewEdit.InsertRVFFromStreamEd,

pasting from the Clipboard,

drag&drop.