Page 1 of 1
How to determine the Table. cells [0, 0] is empty?
Posted: Sat Jun 11, 2016 3:18 am
by aayaay
How to determine the Table. cells [0, 0] is empty?(cells [0, 0] is the RTF format)
thank you.
Posted: Sat Jun 11, 2016 7:45 am
by Sergey Tkachenko
Normally, empty cells have a single empty text items.
Code: Select all
function IsEmpyCell(Cell: TRVTableCellData): Boolean;
var RVData: TCustomRVData;
begin
RVData := Cell.GetRVData;
Result := (RVData.ItemCount = 0) or
((RVData.ItemCount = 1) and (RVData.GetItemStyle(0) >= 0) and
(RVData.GetItemText(0)=''));
end;
Posted: Sun Jun 12, 2016 2:57 am
by aayaay
The data in cells[0,0] is the way it is.
table.Cells[0,0].InsertRVFFromStream(Stream , 0, Dummy1 ,dummy2,dummy3 ,False, nil,nil);
IsEmpyCell Return incorrect¡£
Posted: Sun Jun 12, 2016 9:24 am
by Sergey Tkachenko
Are you sure that the cell is not being edited at the moment of insertion?
Try
table.Cells[0,0].GetRVData.InsertRVFFromStream(...)
Posted: Sun Jun 12, 2016 10:50 am
by aayaay
I'm sorry, I was wrong.
rveMain.LoadRTF(111.rtf)
111.rtf -- this file contains a table.
Posted: Sun Jun 12, 2016 1:24 pm
by Sergey Tkachenko
Please send this RTF to me, richviewgmailcom
Posted: Tue Jun 14, 2016 4:23 pm
by Sergey Tkachenko
I received your email.
Your RTF file does not have empty cells.
Any cell contain something, for example space characters.
You can see them, if you click in "Show non-printing characters" in MS Word or in our ActionTest project.
Posted: Wed Jun 15, 2016 3:19 am
by aayaay
I see. Thank you.