mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-20 01:20:59 +03:00
fix(skd-compile): remove spurious vMerge flag from source cells in template DSL
The vertical merge flag (ОбъединятьПоВертикали) was incorrectly placed on
both the source cell (with content) and continuation cells ("|"). 1C only
expects it on continuation cells. Removed startsVMerge logic from both
PS1 and PY scripts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
123fc41b06
commit
e2924c4ae0
@@ -1,4 +1,4 @@
|
|||||||
# skd-compile v1.7 — Compile 1C DCS from JSON
|
# skd-compile v1.8 — Compile 1C DCS from JSON
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[string]$DefinitionFile,
|
[string]$DefinitionFile,
|
||||||
@@ -1231,12 +1231,6 @@ function Emit-AreaTemplateDSL {
|
|||||||
$w = if ($c -lt $widths.Count) { [double]$widths[$c] } else { 0 }
|
$w = if ($c -lt $widths.Count) { [double]$widths[$c] } else { 0 }
|
||||||
$isVMerged = $vMerge[$r][$c] -eq $true
|
$isVMerged = $vMerge[$r][$c] -eq $true
|
||||||
$isHMerged = $hMerge[$r][$c] -eq $true
|
$isHMerged = $hMerge[$r][$c] -eq $true
|
||||||
# Check if this cell starts a vertical merge (next row has "|" in same column)
|
|
||||||
$startsVMerge = $false
|
|
||||||
for ($nr = $r + 1; $nr -lt $rows.Count; $nr++) {
|
|
||||||
if ($vMerge[$nr][$c] -eq $true) { $startsVMerge = $true } else { break }
|
|
||||||
}
|
|
||||||
|
|
||||||
X "`t`t`t`t<dcsat:tableCell>"
|
X "`t`t`t`t<dcsat:tableCell>"
|
||||||
if ($isVMerged) {
|
if ($isVMerged) {
|
||||||
# Vertically merged cell — only appearance with vMerge flag + width
|
# Vertically merged cell — only appearance with vMerge flag + width
|
||||||
@@ -1281,7 +1275,7 @@ function Emit-AreaTemplateDSL {
|
|||||||
# Appearance
|
# Appearance
|
||||||
$h = if ($r -eq 0) { $minHeight } else { 0 }
|
$h = if ($r -eq 0) { $minHeight } else { 0 }
|
||||||
if (-not $cellExtraItems) { $cellExtraItems = @() }
|
if (-not $cellExtraItems) { $cellExtraItems = @() }
|
||||||
Emit-CellAppearance $style $w $startsVMerge $false $h $cellExtraItems
|
Emit-CellAppearance $style $w $false $false $h $cellExtraItems
|
||||||
$cellExtraItems = @()
|
$cellExtraItems = @()
|
||||||
}
|
}
|
||||||
X "`t`t`t`t</dcsat:tableCell>"
|
X "`t`t`t`t</dcsat:tableCell>"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# skd-compile v1.7 — Compile 1C DCS from JSON
|
# skd-compile v1.8 — Compile 1C DCS from JSON
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
@@ -1041,14 +1041,6 @@ def _emit_area_template_dsl(lines, t):
|
|||||||
w = float(widths[c]) if c < len(widths) else 0
|
w = float(widths[c]) if c < len(widths) else 0
|
||||||
is_v_merged = v_merge.get(r, {}).get(c, False)
|
is_v_merged = v_merge.get(r, {}).get(c, False)
|
||||||
is_h_merged = h_merge.get(r, {}).get(c, False)
|
is_h_merged = h_merge.get(r, {}).get(c, False)
|
||||||
# Check if this cell starts a vertical merge
|
|
||||||
starts_v_merge = False
|
|
||||||
for nr in range(r + 1, len(rows)):
|
|
||||||
if v_merge.get(nr, {}).get(c, False):
|
|
||||||
starts_v_merge = True
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
lines.append('\t\t\t\t<dcsat:tableCell>')
|
lines.append('\t\t\t\t<dcsat:tableCell>')
|
||||||
if is_v_merged:
|
if is_v_merged:
|
||||||
_emit_cell_appearance(lines, style, w, True)
|
_emit_cell_appearance(lines, style, w, True)
|
||||||
@@ -1086,7 +1078,7 @@ def _emit_area_template_dsl(lines, t):
|
|||||||
lines.append('\t\t\t\t\t\t</dcsat:value>')
|
lines.append('\t\t\t\t\t\t</dcsat:value>')
|
||||||
lines.append('\t\t\t\t\t</dcsat:item>')
|
lines.append('\t\t\t\t\t</dcsat:item>')
|
||||||
h = min_height if r == 0 else 0
|
h = min_height if r == 0 else 0
|
||||||
_emit_cell_appearance(lines, style, w, starts_v_merge, False, h, cell_extra_items or None)
|
_emit_cell_appearance(lines, style, w, False, False, h, cell_extra_items or None)
|
||||||
lines.append('\t\t\t\t</dcsat:tableCell>')
|
lines.append('\t\t\t\t</dcsat:tableCell>')
|
||||||
lines.append('\t\t\t</dcsat:item>')
|
lines.append('\t\t\t</dcsat:item>')
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
<DataCompositionSchema xmlns="http://v8.1c.ru/8.1/data-composition-system/schema"
|
||||||
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
xmlns:dcscom="http://v8.1c.ru/8.1/data-composition-system/common"
|
||||||
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core"
|
||||||
@@ -187,10 +187,6 @@
|
|||||||
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
||||||
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
||||||
</dcscor:item>
|
</dcscor:item>
|
||||||
<dcscor:item>
|
|
||||||
<dcscor:parameter>ОбъединятьПоВертикали</dcscor:parameter>
|
|
||||||
<dcscor:value xsi:type="xs:boolean">true</dcscor:value>
|
|
||||||
</dcscor:item>
|
|
||||||
</dcsat:appearance>
|
</dcsat:appearance>
|
||||||
</dcsat:tableCell>
|
</dcsat:tableCell>
|
||||||
<dcsat:tableCell>
|
<dcsat:tableCell>
|
||||||
@@ -265,10 +261,6 @@
|
|||||||
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
||||||
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
||||||
</dcscor:item>
|
</dcscor:item>
|
||||||
<dcscor:item>
|
|
||||||
<dcscor:parameter>ОбъединятьПоВертикали</dcscor:parameter>
|
|
||||||
<dcscor:value xsi:type="xs:boolean">true</dcscor:value>
|
|
||||||
</dcscor:item>
|
|
||||||
</dcsat:appearance>
|
</dcsat:appearance>
|
||||||
</dcsat:tableCell>
|
</dcsat:tableCell>
|
||||||
<dcsat:tableCell>
|
<dcsat:tableCell>
|
||||||
@@ -689,10 +681,6 @@
|
|||||||
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
<dcscor:parameter>МинимальнаяВысота</dcscor:parameter>
|
||||||
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
<dcscor:value xsi:type="xs:decimal">24.75</dcscor:value>
|
||||||
</dcscor:item>
|
</dcscor:item>
|
||||||
<dcscor:item>
|
|
||||||
<dcscor:parameter>ОбъединятьПоВертикали</dcscor:parameter>
|
|
||||||
<dcscor:value xsi:type="xs:boolean">true</dcscor:value>
|
|
||||||
</dcscor:item>
|
|
||||||
</dcsat:appearance>
|
</dcsat:appearance>
|
||||||
</dcsat:tableCell>
|
</dcsat:tableCell>
|
||||||
</dcsat:item>
|
</dcsat:item>
|
||||||
|
|||||||
Reference in New Issue
Block a user