v1.4.4-patch2

This commit is contained in:
csh 2023-08-29 11:24:11 +08:00
parent ba5f255573
commit fd4bd11c9e
2 changed files with 4 additions and 2 deletions

View File

@ -13009,7 +13009,7 @@ Type TDocumentBody = Class(DocObject)
if not ifObj(node) then
return false;
reset_position := false;
if node = TOfficeApi().GetCurrentPosition() then
if node.Eq(TOfficeApi().GetCurrentPosition()) then
reset_position := true;
next := node.NextElement('w:p');
node_.DeleteChild(node);
@ -13916,6 +13916,7 @@ Type TDocumentBody = Class(DocObject)
styleId := p.Format.Value('StyleId');
if styleId <> '' then Begin
obj := docx.StyleObject().GetStyleById(styleId);
println("styleid = {}, obj = {}", styleid, obj);
if ifObj(obj) then Begin
level := obj.HeadingLevel();
iLevel := Class(TSXml).SafeStrToIntDef(level, -1);

View File

@ -60,7 +60,8 @@ Type TDocxStyles = Class
///返回TDocxStyle对象
Function GetStyleById(id);
Begin
return idMap_[ id ];
newid := ifnumber(id) ? tostring(id) : id;
return idMap_[ newid ];
End;
//返回全部LatentStyles对象列表