docxmlater 10.1.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6099,14 +6099,14 @@ export class DocumentParser {
|
|
|
6099
6099
|
table.setBidiVisual(true);
|
|
6100
6100
|
}
|
|
6101
6101
|
|
|
6102
|
-
// Parse table width
|
|
6102
|
+
// Parse table width — always set when w:tblW is present, including w:w="0" w:type="auto"
|
|
6103
|
+
// (auto-sized tables). Skipping w:w="0" would leave the constructor default (9360/dxa),
|
|
6104
|
+
// causing tblPrChange snapshots to capture wrong "previous" width values.
|
|
6103
6105
|
if (tblPrObj["w:tblW"]) {
|
|
6104
|
-
const width =
|
|
6106
|
+
const width = safeParseInt(tblPrObj["w:tblW"]["@_w:w"], 0);
|
|
6105
6107
|
const widthType = tblPrObj["w:tblW"]["@_w:type"] || "dxa";
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
table.setWidthType(widthType);
|
|
6109
|
-
}
|
|
6108
|
+
table.setWidth(width);
|
|
6109
|
+
table.setWidthType(widthType);
|
|
6110
6110
|
}
|
|
6111
6111
|
|
|
6112
6112
|
// Parse table caption
|
|
@@ -6142,6 +6142,12 @@ export class DocumentParser {
|
|
|
6142
6142
|
}
|
|
6143
6143
|
}
|
|
6144
6144
|
|
|
6145
|
+
// Parse table indentation (w:tblInd) per ECMA-376 Part 1 §17.4.43
|
|
6146
|
+
if (tblPrObj["w:tblInd"]) {
|
|
6147
|
+
const indentVal = safeParseInt(tblPrObj["w:tblInd"]["@_w:w"], 0);
|
|
6148
|
+
table.setIndent(indentVal);
|
|
6149
|
+
}
|
|
6150
|
+
|
|
6145
6151
|
// Parse table cell margins (w:tblCellMar) per ECMA-376 Part 1 §17.4.42
|
|
6146
6152
|
if (tblPrObj["w:tblCellMar"]) {
|
|
6147
6153
|
const cellMar = tblPrObj["w:tblCellMar"];
|