parent
dbebc2805c
commit
1f7d5f403b
Binary file not shown.
|
|
@ -394,7 +394,7 @@ End;
|
|||
|
||||
Function TSDocxCell.WriteBottomPadding(value);
|
||||
Begin
|
||||
tcpr_.CellMar.Bottom := 20 * bottom;
|
||||
tcpr_.CellMar.Bottom := 20 * value;
|
||||
tcpr_.CellMar.BottomType := "dxa";
|
||||
tcpr_.Update();
|
||||
End;
|
||||
|
|
@ -517,7 +517,7 @@ Function TSDocxCell.ReadHeight();
|
|||
Begin
|
||||
trpr_obj := GetTrPrObject();
|
||||
value := trpr_obj.Value("Height");
|
||||
return ifnil(value) ? 0 : value;
|
||||
return ifnil(value) ? 0 : value / 20;
|
||||
End;
|
||||
|
||||
Function TSDocxCell.WriteHeightRule(value);
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ private
|
|||
cells_;
|
||||
|
||||
public
|
||||
// Properties
|
||||
// Methods
|
||||
Function AutoFit();
|
||||
Function Delete();
|
||||
Function Select();
|
||||
Function SetWidth(ColumnWidth, RulerStyle);
|
||||
Function Sort(ExcludeHeader, SortFieldType, SortOrder, CaseSensitive, BidiSort, IgnoreThe, IgnoreKashida, IgnoreDiacritics, IgnoreHe, LanguageID);
|
||||
|
||||
// Methods
|
||||
// Properties
|
||||
property Borders read ReadBorders;
|
||||
property Cells read ReadCells;
|
||||
property Index read ReadIndex;
|
||||
|
|
|
|||
|
|
@ -68,16 +68,3 @@ Begin
|
|||
return table_.Cols();
|
||||
End;
|
||||
|
||||
Function TSDocxColumns.WritePreferredWidthType(value);
|
||||
Begin
|
||||
End;
|
||||
Function TSDocxColumns.ReadPreferredWidthType();
|
||||
Begin
|
||||
End;
|
||||
|
||||
Function TSDocxColumns.WritePreferredWidth(value);
|
||||
Begin
|
||||
End;
|
||||
Function TSDocxColumns.ReadPreferredWidth();
|
||||
Begin
|
||||
End;
|
||||
|
|
|
|||
|
|
@ -399,45 +399,14 @@ Begin
|
|||
return table;
|
||||
end
|
||||
|
||||
psplit := function(direction);
|
||||
begin
|
||||
[flag, last_node, new_node] := self.BreakIntoParagraphs(direction);
|
||||
if flag then
|
||||
begin
|
||||
document_.Paragraphs.AddParagraph(last_node, new_node, direction);
|
||||
return array(flag, new_node);
|
||||
end
|
||||
else begin
|
||||
paragraph := self.InsertNewParagraph();
|
||||
return array(flag, paragraph);
|
||||
end
|
||||
end
|
||||
|
||||
case collapse_ of
|
||||
TSDocxEnumerations.wdCollapseStart():
|
||||
[flag, paragraph] := ##psplit("before");
|
||||
|
||||
TSDocxEnumerations.wdCollapseEnd():
|
||||
[flag, paragraph] := ##psplit("after");
|
||||
|
||||
else begin
|
||||
flag := true;
|
||||
paragraph := range_obj_[range_obj_.Size()-1].TParagraph.Root();
|
||||
clear_flag := true;
|
||||
end
|
||||
end;
|
||||
node := paragraph.Object().Root();
|
||||
data := nils(numRows, numColumns);
|
||||
ttable := docx_.CreateTable(data);
|
||||
if flag then
|
||||
begin
|
||||
table := ##padd_table(ttable, paragraph);
|
||||
document_.Paragraphs.AddTableToParagraphs(paragraph, table);
|
||||
end
|
||||
else begin
|
||||
table := ##padd_table(ttable, paragraph.Object().Root());
|
||||
table := ##padd_table(ttable, node);
|
||||
document_.Paragraphs.AddTableToParagraphs(node, table);
|
||||
paragraph.Range.Clear(true);
|
||||
end
|
||||
if clear_flag then self.Clear(true);
|
||||
if ifnil(collapse_) then self.Clear(true);
|
||||
return table;
|
||||
End;
|
||||
|
||||
|
|
@ -552,11 +521,12 @@ Begin
|
|||
else begin
|
||||
range_obj_.Clear();
|
||||
index := 0;
|
||||
flag := 1;
|
||||
end
|
||||
end;
|
||||
range_obj_.SplitRun(index);
|
||||
tparagraph := range_obj_[index].TParagraph;
|
||||
run := tparagraph.PrependRun(range_obj_[index].TRun);
|
||||
run := flag = 1 ? range_obj_[0].TRun : tparagraph.PrependRun(range_obj_[index].TRun);
|
||||
run.Br.Type := t;
|
||||
run.Br.Clear := c;
|
||||
run.Apply();
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ End;
|
|||
|
||||
Function TSDocxTable.Cell(Row, Column);
|
||||
Begin
|
||||
cell_obj := new TSDocxCell(self.Application, self.Creator, self.Parent);
|
||||
cell_obj := new TSDocxCell(self.Application, self.Creator, self);
|
||||
cell_obj.Init(docx_, table_, Row, Column);
|
||||
return cell_obj;
|
||||
End;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ End;
|
|||
|
||||
Function TSWdRange.Refresh();
|
||||
Begin
|
||||
if target_node_ then self.FindRangeByNode(target_node_);
|
||||
self.Init();
|
||||
End;
|
||||
|
||||
Function TSWdRange.Size();
|
||||
|
|
|
|||
Loading…
Reference in New Issue