v1.4.6-patch3
This commit is contained in:
parent
493691b930
commit
5f1064794d
File diff suppressed because it is too large
Load Diff
|
|
@ -14661,7 +14661,7 @@ Type TTable = Class(DocObject, TTableImpl)
|
|||
cellObj.mergeSpan_ := c[1];
|
||||
return cellObj;
|
||||
End;
|
||||
|
||||
|
||||
///设置列宽
|
||||
Function ColumnWidth(n, wth);
|
||||
Begin
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Type TDocxCopy = class
|
|||
Function Copy(posOpt);
|
||||
Begin
|
||||
// 复制所有的样式
|
||||
style_copy_obj_.CopyStyle();
|
||||
style_copy_obj_.CopyStyle(number_copy_obj_);
|
||||
|
||||
parts := new_docx_obj_.Body().Parts();
|
||||
pos := old_docx_obj_.GetPosNode(posOpt);
|
||||
|
|
@ -222,7 +222,7 @@ private
|
|||
begin
|
||||
id := numpr.GetAttribute('w:val');
|
||||
numberid := number_copy_obj_.CopyNumbering(id);
|
||||
numpr.SetAttribute('w:val', id);
|
||||
numpr.SetAttribute('w:val', numberid);
|
||||
end
|
||||
DeleteComment(paragraph); // 删除批注
|
||||
End;
|
||||
|
|
@ -326,11 +326,12 @@ Type TDocxStyleCopy = class
|
|||
end
|
||||
End;
|
||||
|
||||
Function CopyStyle();
|
||||
Function CopyStyle(numberobj);
|
||||
Begin
|
||||
for id, obj in id_map_ do
|
||||
begin
|
||||
SetBasedOn(obj);
|
||||
SetNumId(obj, numberobj);
|
||||
SetLink(obj);
|
||||
old_style_obj_.CopyStyle(obj);
|
||||
end;
|
||||
|
|
@ -382,11 +383,23 @@ private
|
|||
end
|
||||
End;
|
||||
|
||||
Function SetNumId(obj, numberobj);
|
||||
Begin
|
||||
if not ifObj(numberobj) then return;
|
||||
numPr := class(TSXml).GetNode(obj.node_, 'w:pPr/w:numPr/w:numId');
|
||||
if ifObj(numPr) then
|
||||
begin
|
||||
id := numpr.GetAttribute('w:val');
|
||||
numberid := numberobj.CopyNumbering(id);
|
||||
numpr.SetAttribute('w:val', numberid);
|
||||
end
|
||||
End;
|
||||
|
||||
Function GetNewName(name);
|
||||
Begin
|
||||
new_name := name;
|
||||
count := 0;
|
||||
while ifObj(old_style_obj_.GetStyle(new_name)) or style_name_map2_[new_name] do
|
||||
while ifObj(old_style_obj_.GetStyle(class(TSXml).Utf8ToCurCodePage(new_name))) or style_name_map2_[new_name] do
|
||||
new_name := new_name $ count++;
|
||||
return new_name;
|
||||
End;
|
||||
|
|
@ -437,9 +450,9 @@ Type TDocxNumberCopy = class
|
|||
begin
|
||||
number_obj := old_number_obj_.CopyNumber(obj);
|
||||
id_map_[number] := number_obj;
|
||||
return number_obj;
|
||||
end
|
||||
end;
|
||||
return id_map_[number];
|
||||
end
|
||||
End;
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Reference in New Issue