TCustomRichView.RVFOptions

<< Click to display table of contents >>

TCustomRichView.RVFOptions

Options for loading and saving RVF (RichView Format). Some options also affect loading and saving XML files by TRichViewXML component.

type

  TRVFOption = 

    (rvfoSavePicturesBody, rvfoSaveControlsBody,

    rvfoIgnoreUnknownPicFmt, rvfoIgnoreUnknownCtrls,

    rvfoIgnoreUnknownCtrlProperties

    rvfoConvUnknownStylesToZero,

    rvfoConvLargeImageIdxToZero,

    rvfoSaveBinary,

    rvfoUseStyleNames,

    rvfoSaveBack, rvfoLoadBack,

    rvfoSaveTextStyles, rvfoSaveParaStyles,

    rvfoSaveLayout, rvfoLoadLayout,

    rvfoSaveDocProperties, rvfoLoadDocProperties,

    rvfoCanChangeUnits, rvfoSaveStyleTemplatesOnlyNames,

    rvfoSaveDocObjects, rvfoLoadDocObjects,

    rvfoIgnoreGraphicClasses);

  TRVFOptions = set of TRVFOption;

 

property RVFOptions: TRVFOptions;

Note: TRVFOption and TRVFOptions are defined in RVStyle/fmxRVStyle unit.

Options for Saving

Option

Meaning

rvfoSavePicturesBody

If set, full information about all pictures in RichView are saved in RVF.

If not set, OnRVFPictureNeeded event occurs on loading.

rvfoSaveControlsBody

If set, full information about all controls in RichView are saved in RVF.

If not set, OnRVFControlNeeded event occurs loading.

rvfoSaveBinary

If set, all non-text data are saved in RVF as they are (pictures, controls, tables, background, styles, Unicode text).

If not set, all binary data are converted to text (hexadecimal string); RVF becomes a plain text format, like RTF, but file size is increased.

rvfoSaveBack

(since version 1.2)

If set, background (color and image) is saved in RVF.

This flag affects only saving the whole document; selection is never saved (or copied to the Clipboard) with background.

(see rvfoLoadBack below)

rvfoUseStyleNames

(almost obsolete)

If set, TRichView saves quoted names of text and paragraph styles instead of their indices

Pluses:

content of file remains synchronized with collections of styles even if you delete or insert new styles;

Minuses:

increased file size;

names of styles must be unique;

files become sensitive to changing style names.

It's not recommended to use this options together with rvfoSaveTextStyles and rvfoSaveParaStyles.

rvfoSaveTextStyles

If set, collection of text styles associated with this RichView (TextStyles property of the linked TRVStyle component) is saved in RVF.

See RVFTextStylesReadMode property.

This option affects saving style templates.*

rvfoSaveParaStyles

If set, collections of paragraph and list styles associated with this RichView  (ParaStyles and ListStyles properties of the linked TRVStyle component)  are saved in RVF.

See RVFParaStylesReadMode property.

This option affects saving style templates.*

rvfoSaveLayout

If set, the following properties are stored in RVF:

Left-, Right-, Top-, BottomMargin, MinTextWidth, MaxTextWidth, BiDiMode.

Layout is saved only when saving the whole document (not selection).

(see rvfoLoadLayout below)

rvfoSaveDocProperties

If set, DocProperties and DocParameters are saved in RVF.

(see rvfoLoadDocProperties below)

rvfoSaveStyleTemplatesOnlyNames**

If set, when style templates must be saved in RVF*, only their names are saved. When loading such files, existing style templates are applied to loaded text and paragraph styles. This option is useful if you want to create multiple documents using the same collection of style templates. Since style templates are not saved in RVF in this mode, an application must save them itself elsewhere.

rvfoSaveDocObjects

If set, DocObjects are saved in RVF.

(see rvfoLoadDocObjects below)

* If the both rvfoSaveTextStyles and rvfoSaveParaStyles are included, and UseStyleTemplates=True, Style.StyleTemplates are saved as well.

** This option also used by TRichViewXML component when saving XML files.

Options for Loading

Option

Meaning

rvfoLoadBack

If not set, TRichView ignores background information, saved in RVF.

(see rvfoSaveBack above)

rvfoIgnoreUnknownPicFmt**

If set, TRichView skips pictures of unknown classes (unregistered classes and classes that cannot be detected by an image content).

if not set, RVF reading methods return False (failure value) if pictures of unknown classes exist in RVF

rvfoIgnoreUnknownCtrls**

The same as rvfoIgnoreUnknownPicFmt, but for controls

rvfoIgnoreUnknownCtrlProperties

If set, TRichView ignores errors occurred while reading inserted controls

rvfoConvLargeImageIdxToZero**

If set, too large (>=Imagelist.Count) image indices for bullets and hotspots are converted to 0.

if not set, RVF reading methods return False (failure value) in such case.

rvfoConvUnknownStylesToZero**

If set, TRichView converts too large (>= RichView.Style.TextStyles.Count, or RichView.Style.ParaStyles.Count) style indices to 0.

If not set, RVF reading methods return False (failure value) in such case.

rvfoLoadLayout

If not set, TRichView ignores layout information saved in RVF

(see rvfoSaveLayout above)

rvfoLoadDocProperties

If set, DocProperties and DocParameters are loaded from RVF (but not by methods for RVF insertion)

(see rvfoSaveDocProperties above)

rvfoCanChangeUnits

If set, the component can change Style.Units to the value read from RVF. This change is possible only when RVF is loaded, not inserted.

rvfoLoadDocObjects

If set, DocObjects are loaded from RVF.

(see rvfoSaveDocObjects above)

rvfoIgnoreGraphicClasses**

If set, names of graphic classes specified in RVF are ignored. File format is determined by content, and the default graphic class for this file format is used (see TRVGraphicHandler)

If not set, the component tries to use a graphic class specified in RVF. If this class is not found, TRichView works as if this option is specified.

The procedure described above is used for graphic items (pictures and hot pictures), background images of tables and table cells. For pictures of list markers, the specified graphic class is always used.

** This option also used by TRichViewXML component when loading XML files.

See RVF Overview for details.

Default value (VCL and LCL):

[rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveDocProperties, rvfoLoadDocProperties, rvfoSaveDocObjects, rvfoLoadDocObjects];

Default value (FireMonkey):

[rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveDocProperties, rvfoLoadDocProperties, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveDocObjects, rvfoLoadDocObjects];

Default value for components, placed on form at design time (can be changed in TRichView component editor):

[rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveDocProperties, rvfoLoadDocProperties, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveDocObjects, rvfoLoadDocObjects];

See also:

RVFWarnings