release: 2026-03-01 (6건 커밋) #69
@ -207,7 +207,11 @@ const HEADER_XML =
|
||||
'</hh:fontface>' +
|
||||
'</hh:fontfaces>' +
|
||||
// ── borderFill
|
||||
'<hh:borderFills itemCnt="2">' +
|
||||
// id=1: 기본 (테두리 없음)
|
||||
// id=2: 기본 + fillBrush 없음
|
||||
// id=3: 테이블 값 셀 (실선 테두리)
|
||||
// id=4: 테이블 라벨 셀 (실선 테두리 + 배경색 #f0f4f8)
|
||||
'<hh:borderFills itemCnt="4">' +
|
||||
'<hh:borderFill id="1" threeD="0" shadow="0" centerLine="NONE" breakCellSeparateLine="0">' +
|
||||
'<hh:slash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
'<hh:backSlash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
@ -227,6 +231,27 @@ const HEADER_XML =
|
||||
'<hh:diagonal type="SOLID" width="0.1 mm" color="#000000"/>' +
|
||||
'<hc:fillBrush><hc:winBrush faceColor="none" hatchColor="#999999" alpha="0"/></hc:fillBrush>' +
|
||||
'</hh:borderFill>' +
|
||||
// id=3: 값 셀 — 실선 테두리, 배경 없음
|
||||
'<hh:borderFill id="3" threeD="0" shadow="0" centerLine="NONE" breakCellSeparateLine="0">' +
|
||||
'<hh:slash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
'<hh:backSlash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
'<hh:leftBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:rightBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:topBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:bottomBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:diagonal type="NONE" width="0.1 mm" color="#000000"/>' +
|
||||
'</hh:borderFill>' +
|
||||
// id=4: 라벨 셀 — 실선 테두리 + 연한 파란 배경
|
||||
'<hh:borderFill id="4" threeD="0" shadow="0" centerLine="NONE" breakCellSeparateLine="0">' +
|
||||
'<hh:slash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
'<hh:backSlash type="NONE" Crooked="0" isCounter="0"/>' +
|
||||
'<hh:leftBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:rightBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:topBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:bottomBorder type="SOLID" width="0.12 mm" color="#d1d5db"/>' +
|
||||
'<hh:diagonal type="NONE" width="0.1 mm" color="#000000"/>' +
|
||||
'<hc:fillBrush><hc:winBrush faceColor="#f0f4f8" hatchColor="#999999" alpha="0"/></hc:fillBrush>' +
|
||||
'</hh:borderFill>' +
|
||||
'</hh:borderFills>' +
|
||||
// ── charProperties (Skeleton 7개 그대로)
|
||||
'<hh:charProperties itemCnt="7">' +
|
||||
@ -490,10 +515,12 @@ function buildCell(
|
||||
colSpan: number,
|
||||
rowSpan: number,
|
||||
width: number,
|
||||
isHeader = false,
|
||||
isLabel = false,
|
||||
): string {
|
||||
// 라벨 셀: borderFill id=4 (테두리 + 배경), 값 셀: id=3 (테두리만)
|
||||
const bfId = isLabel ? 4 : 3;
|
||||
return (
|
||||
`<hp:tc name="" header="${isHeader ? '1' : '0'}" hasMargin="0" protect="0" editable="0" dirty="0" borderFillIDRef="2">` +
|
||||
`<hp:tc name="" header="0" hasMargin="0" protect="0" editable="0" dirty="0" borderFillIDRef="${bfId}">` +
|
||||
`<hp:subList id="" textDirection="HORIZONTAL" lineWrap="BREAK" vertAlign="CENTER" ` +
|
||||
`linkListIDRef="0" linkListNextIDRef="0" textWidth="0" textHeight="0" hasTextRef="0" hasNumRef="0">` +
|
||||
buildCellPara(text) +
|
||||
@ -526,17 +553,17 @@ function buildFieldTable(
|
||||
fields.forEach((field, rowIdx) => {
|
||||
const value = getVal(field.key) || '-';
|
||||
if (field.label) {
|
||||
// 2열: 라벨 | 값
|
||||
// 2열: 라벨(배경색) | 값
|
||||
rows +=
|
||||
'<hp:tr>' +
|
||||
buildCell(field.label, 0, rowIdx, 1, 1, LABEL_WIDTH) +
|
||||
buildCell(value, 1, rowIdx, 1, 1, VALUE_WIDTH) +
|
||||
buildCell(field.label, 0, rowIdx, 1, 1, LABEL_WIDTH, true) +
|
||||
buildCell(value, 1, rowIdx, 1, 1, VALUE_WIDTH, false) +
|
||||
'</hp:tr>';
|
||||
} else {
|
||||
// 1열 전체 너비 (textarea 류)
|
||||
rows +=
|
||||
'<hp:tr>' +
|
||||
buildCell(value, 0, rowIdx, 2, 1, CONTENT_WIDTH) +
|
||||
buildCell(value, 0, rowIdx, 2, 1, CONTENT_WIDTH, false) +
|
||||
'</hp:tr>';
|
||||
}
|
||||
});
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user