|Top Previous Next|
Allows you to change how document items are saved in text, RTF, DocX or HTML file or stream.
TRVSaveItemToFileEvent = procedure (Sender: TCustomRichView;
const Path: String; RVData: TCustomRVData; ItemNo: Integer;
var DoDefault: Boolean) of object;
(introduced in v1.8; changed in v18)
This is a "low level" event allowing to change saving of items completely.
There are events offering a subset of functionality of this event:
These events are easier to use than this event.
Path – path to output file;
SaveFormat identifies file format, one of rvsfText, rvsfHTML, rvsfRTF, rvsfDocX.
▪for non-text items: empty string;
▪for text items: text that needs to be saved (it can be a part of the item's text when saving selected fragment).
DoDefault – True.
Set values of DoDefault and OutStr according to the table below.
If you do not want to change saving of some item, leave DoDefault to True.
You cannot override some special processing for paragraph markers when saving to HTML and RTF.
Notes about DocX:
•this event is not called for tables
•this event allows changing saving of numbering sequences only partially
Example: saving pictures as '[PIC]'
Sender: TCustomRichView; const Path: String;
RVData: TCustomRVData; ItemNo: Integer;
var OutStr: TRVUnicodeString; var DoDefault: Boolean);
OutStr := '[PIC]';
DoDefault := False;
TRichView © trichview.com