trichview.support
Re: Checkmarks inside tables. how to get CheckPointData . ? |
Author |
Message |
Sergey Tkachenko |
Posted: 07/07/2002 15:59:43 Yes, checkpoints in tables are not included in the list of checkpoints in the document, so they cannot be found by GetFirstCheckPoint/GetNextCheckpoint. In order to get all checkpoints including in document, you need to iterate through all items, checking their checkpoints. The example is below. procedure EnumCheckpoints(RVData: TCustomRVData); var i,r,c: Integer; table: TRVTableItemInfo; cpdata: TCheckpointData; begin for i := 0 to RVData.Items.Count-1 do begin cpdata := RVData.GetItemCheckpoint(i); if cpdata<>nil then begin // processing the checkpoint // RVData.GetCheckpointInfo(); end; if RVData.GetItemStyle(i)=rvsTable then begin table := TRVTableItemInfo(RVData.GetItem(i)); for r := 0 to table.Rows.Count-1 do for c := 0 to table.Rows[r].Count-1 do if table.Cells[r,c]<>nil then EnumCheckpoints(table.Cells[r,c].GetRVData); end; end; end; call it as: EnumCheckpoints(RichView.RVData); > How can I get Checkpoint data of all Checkpoints in a file (both Checkpoints > inside tables and outside tables) ? > > The problem is like this, I implemented checkmark and hyperlinking to those > checkmarks with manipulation of Tags of items and checkmarks. I can also > save the file to HTML/RVF/RTF, and all the bookmarking and corresponding > hyperlinks are saved into HTML (I am converting the tags to corresponding > html tags at OnURLneeded etc). > > It is working perfectly with hyprlinks outside the tables of the file. But > when I create a hyperlink inside a table all info. reg. hyprlinks are lost > and even the text of hyperlinks are not saved into file. > > How can I correc the issue. > > My code is like this, getting all bookmark info. from the file, so that the > user can select hyperlinks from an Insert hyperlink form. > ==== > procedure frmXXX.mitInsertHyperLinkClick(Sender: TObject); > var > vCPData : TCheckPointData; > vTempCPData : TCheckPointData > ...... > begin > .... > vTempCPData := RichEditEmailText.GetFirstCheckPoint; // here I am getting > vTempCPData as NIL. > > while vTempCPData<>nil do > begin > .... > end > .... > end; > > In the above code I am getting vCPData as NIL. > > But when I am using the methodGetCurrentCheckPoint at a cursor position it > is returning the correct CheckPoint data. > > thanks in advance. > > > > |
Powered by ABC Amber Outlook Express Converter