This commit is contained in:
csh
2026-07-30 14:05:16 +08:00
parent 6b0f11cebb
commit 3df8ce2be0
6 changed files with 222 additions and 215 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
// Version 1.8.6
// Version 1.8.7
Function TOfficeObj(n);
Begin
case lowercase(n) of
+1 -1
View File
@@ -1,4 +1,4 @@
// Version 1.8.6
// Version 1.8.7
Type TSDocxFile = Class
///Version: V1.0 2022-09-20
///适用于 Microsoft Word docx格式文件
+1 -1
View File
@@ -1,4 +1,4 @@
// Version 1.8.6
// Version 1.8.7
Type TSXlsxFile = Class
///Version: V1.0 2022-08-08
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
+2 -4
View File
@@ -501,18 +501,16 @@ private
Function GetNewName(name);
Begin
new_name := name;
count := 0;
while ifObj(old_style_obj_.GetStyle(class(TSXml).Utf8ToCurCodePage(new_name))) or style_name_map2_[new_name] do
new_name := new_name $ count++;
new_name := new_name $ crc32(inttostr(random(2000000)));
return new_name;
End;
Function GetNewId(id);
Begin
new_id := id;
count := 0;
while ifObj(old_style_obj_.GetStyleById(new_id)) or style_id_map2_[new_id] do
new_id := new_id $ count++;
new_id := new_id $ crc32(inttostr(random(2000000)));
return new_id;
End;
@@ -141,6 +141,7 @@ Type TDocxStyles = Class
Begin
if ifObj(newstyle) and ifObj(newstyle.node_) then Begin
node := stylesXml_.FirstChildElement('w:styles').InsertEndChild(newstyle.node_.Marshal()[0]);
node.DeleteAttribute('w:default');
obj := TOfficeObj('TDocxStyle');
obj.StyleId := node.GetAttribute('w:styleId');
obj.Name := node.FirstChildElement('w:name').GetAttribute('w:val');
+10 -2
View File
@@ -1,8 +1,16 @@
# 更新日志
## 2026-07-30
### V1.8.7
#### word
1. 修复`InsertFile`时,样式重复导致wps/word识别失败从而渲染错误问题
## 2026-01-16
#### V1.8.6
### V1.8.6
修复语法问题
@@ -12,7 +20,7 @@
## 2025-12-15
#### V1.8.5
### V1.8.5
#### word