@rhwp/core 0.7.13 → 0.7.15
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 +1 -1
- package/rhwp.d.ts +139 -13
- package/rhwp.js +652 -55
- package/rhwp_bg.wasm +0 -0
- package/rhwp_bg.wasm.d.ts +26 -5
package/rhwp.js
CHANGED
|
@@ -140,6 +140,32 @@ export class HwpDocument {
|
|
|
140
140
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* 미주 모양을 적용한다.
|
|
145
|
+
* @param {number} section_idx
|
|
146
|
+
* @param {string} props_json
|
|
147
|
+
* @returns {string}
|
|
148
|
+
*/
|
|
149
|
+
applyEndnoteShape(section_idx, props_json) {
|
|
150
|
+
let deferred3_0;
|
|
151
|
+
let deferred3_1;
|
|
152
|
+
try {
|
|
153
|
+
const ptr0 = passStringToWasm0(props_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
154
|
+
const len0 = WASM_VECTOR_LEN;
|
|
155
|
+
const ret = wasm.hwpdocument_applyEndnoteShape(this.__wbg_ptr, section_idx, ptr0, len0);
|
|
156
|
+
var ptr2 = ret[0];
|
|
157
|
+
var len2 = ret[1];
|
|
158
|
+
if (ret[3]) {
|
|
159
|
+
ptr2 = 0; len2 = 0;
|
|
160
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
161
|
+
}
|
|
162
|
+
deferred3_0 = ptr2;
|
|
163
|
+
deferred3_1 = len2;
|
|
164
|
+
return getStringFromWasm0(ptr2, len2);
|
|
165
|
+
} finally {
|
|
166
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
143
169
|
/**
|
|
144
170
|
* 머리말/꼬리말 마당(템플릿)을 적용한다.
|
|
145
171
|
* @param {number} section_idx
|
|
@@ -222,6 +248,35 @@ export class HwpDocument {
|
|
|
222
248
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
223
249
|
}
|
|
224
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* 각주/미주 내부 문단 속성 적용
|
|
253
|
+
* @param {number} section_idx
|
|
254
|
+
* @param {number} para_idx
|
|
255
|
+
* @param {number} control_idx
|
|
256
|
+
* @param {number} fn_para_idx
|
|
257
|
+
* @param {string} props_json
|
|
258
|
+
* @returns {string}
|
|
259
|
+
*/
|
|
260
|
+
applyParaFormatInFootnote(section_idx, para_idx, control_idx, fn_para_idx, props_json) {
|
|
261
|
+
let deferred3_0;
|
|
262
|
+
let deferred3_1;
|
|
263
|
+
try {
|
|
264
|
+
const ptr0 = passStringToWasm0(props_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
266
|
+
const ret = wasm.hwpdocument_applyParaFormatInFootnote(this.__wbg_ptr, section_idx, para_idx, control_idx, fn_para_idx, ptr0, len0);
|
|
267
|
+
var ptr2 = ret[0];
|
|
268
|
+
var len2 = ret[1];
|
|
269
|
+
if (ret[3]) {
|
|
270
|
+
ptr2 = 0; len2 = 0;
|
|
271
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
272
|
+
}
|
|
273
|
+
deferred3_0 = ptr2;
|
|
274
|
+
deferred3_1 = len2;
|
|
275
|
+
return getStringFromWasm0(ptr2, len2);
|
|
276
|
+
} finally {
|
|
277
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
225
280
|
/**
|
|
226
281
|
* 머리말/꼬리말 문단에 문단 서식을 적용한다.
|
|
227
282
|
* @param {number} section_idx
|
|
@@ -373,27 +428,33 @@ export class HwpDocument {
|
|
|
373
428
|
}
|
|
374
429
|
/**
|
|
375
430
|
* 컨트롤 객체(표, 이미지, 도형)를 내부 클립보드에 복사한다.
|
|
431
|
+
*
|
|
432
|
+
* [Task #1161] `cell_path_json` 이 빈 문자열/`"[]"` 면 본문, 그 외에는 셀/글상자
|
|
433
|
+
* 경로(`[{"controlIndex","cellIndex","cellParaIndex"}, ...]`)의 컨트롤을 복사한다.
|
|
376
434
|
* @param {number} section_idx
|
|
377
435
|
* @param {number} para_idx
|
|
436
|
+
* @param {string} cell_path_json
|
|
378
437
|
* @param {number} control_idx
|
|
379
438
|
* @returns {string}
|
|
380
439
|
*/
|
|
381
|
-
copyControl(section_idx, para_idx, control_idx) {
|
|
382
|
-
let
|
|
383
|
-
let
|
|
440
|
+
copyControl(section_idx, para_idx, cell_path_json, control_idx) {
|
|
441
|
+
let deferred3_0;
|
|
442
|
+
let deferred3_1;
|
|
384
443
|
try {
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
444
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
|
+
const len0 = WASM_VECTOR_LEN;
|
|
446
|
+
const ret = wasm.hwpdocument_copyControl(this.__wbg_ptr, section_idx, para_idx, ptr0, len0, control_idx);
|
|
447
|
+
var ptr2 = ret[0];
|
|
448
|
+
var len2 = ret[1];
|
|
388
449
|
if (ret[3]) {
|
|
389
|
-
|
|
450
|
+
ptr2 = 0; len2 = 0;
|
|
390
451
|
throw takeFromExternrefTable0(ret[2]);
|
|
391
452
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
return getStringFromWasm0(
|
|
453
|
+
deferred3_0 = ptr2;
|
|
454
|
+
deferred3_1 = len2;
|
|
455
|
+
return getStringFromWasm0(ptr2, len2);
|
|
395
456
|
} finally {
|
|
396
|
-
wasm.__wbindgen_free(
|
|
457
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
397
458
|
}
|
|
398
459
|
}
|
|
399
460
|
/**
|
|
@@ -654,6 +715,34 @@ export class HwpDocument {
|
|
|
654
715
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
655
716
|
}
|
|
656
717
|
}
|
|
718
|
+
/**
|
|
719
|
+
* [Task #1171 / PR #1254] 표 셀/글상자 내부 Picture 삭제 (by_path).
|
|
720
|
+
* @param {number} section_idx
|
|
721
|
+
* @param {number} parent_para_idx
|
|
722
|
+
* @param {string} cell_path_json
|
|
723
|
+
* @param {number} inner_control_idx
|
|
724
|
+
* @returns {string}
|
|
725
|
+
*/
|
|
726
|
+
deleteCellPictureControlByPath(section_idx, parent_para_idx, cell_path_json, inner_control_idx) {
|
|
727
|
+
let deferred3_0;
|
|
728
|
+
let deferred3_1;
|
|
729
|
+
try {
|
|
730
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
731
|
+
const len0 = WASM_VECTOR_LEN;
|
|
732
|
+
const ret = wasm.hwpdocument_deleteCellPictureControlByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, inner_control_idx);
|
|
733
|
+
var ptr2 = ret[0];
|
|
734
|
+
var len2 = ret[1];
|
|
735
|
+
if (ret[3]) {
|
|
736
|
+
ptr2 = 0; len2 = 0;
|
|
737
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
738
|
+
}
|
|
739
|
+
deferred3_0 = ptr2;
|
|
740
|
+
deferred3_1 = len2;
|
|
741
|
+
return getStringFromWasm0(ptr2, len2);
|
|
742
|
+
} finally {
|
|
743
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
657
746
|
/**
|
|
658
747
|
* 수식 컨트롤을 문단에서 삭제한다.
|
|
659
748
|
*
|
|
@@ -1200,25 +1289,28 @@ export class HwpDocument {
|
|
|
1200
1289
|
* 컨트롤 객체를 HTML 문자열로 변환한다.
|
|
1201
1290
|
* @param {number} section_idx
|
|
1202
1291
|
* @param {number} para_idx
|
|
1292
|
+
* @param {string} cell_path_json
|
|
1203
1293
|
* @param {number} control_idx
|
|
1204
1294
|
* @returns {string}
|
|
1205
1295
|
*/
|
|
1206
|
-
exportControlHtml(section_idx, para_idx, control_idx) {
|
|
1207
|
-
let
|
|
1208
|
-
let
|
|
1296
|
+
exportControlHtml(section_idx, para_idx, cell_path_json, control_idx) {
|
|
1297
|
+
let deferred3_0;
|
|
1298
|
+
let deferred3_1;
|
|
1209
1299
|
try {
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
|
|
1300
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1301
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1302
|
+
const ret = wasm.hwpdocument_exportControlHtml(this.__wbg_ptr, section_idx, para_idx, ptr0, len0, control_idx);
|
|
1303
|
+
var ptr2 = ret[0];
|
|
1304
|
+
var len2 = ret[1];
|
|
1213
1305
|
if (ret[3]) {
|
|
1214
|
-
|
|
1306
|
+
ptr2 = 0; len2 = 0;
|
|
1215
1307
|
throw takeFromExternrefTable0(ret[2]);
|
|
1216
1308
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
return getStringFromWasm0(
|
|
1309
|
+
deferred3_0 = ptr2;
|
|
1310
|
+
deferred3_1 = len2;
|
|
1311
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1220
1312
|
} finally {
|
|
1221
|
-
wasm.__wbindgen_free(
|
|
1313
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1222
1314
|
}
|
|
1223
1315
|
}
|
|
1224
1316
|
/**
|
|
@@ -1699,6 +1791,34 @@ export class HwpDocument {
|
|
|
1699
1791
|
}
|
|
1700
1792
|
return ret[0] >>> 0;
|
|
1701
1793
|
}
|
|
1794
|
+
/**
|
|
1795
|
+
* [Task #1151 v4] 표 셀 내 Picture 속성 조회 (by_path). Shape 패턴 정합.
|
|
1796
|
+
* @param {number} section_idx
|
|
1797
|
+
* @param {number} parent_para_idx
|
|
1798
|
+
* @param {string} cell_path_json
|
|
1799
|
+
* @param {number} inner_control_idx
|
|
1800
|
+
* @returns {string}
|
|
1801
|
+
*/
|
|
1802
|
+
getCellPicturePropertiesByPath(section_idx, parent_para_idx, cell_path_json, inner_control_idx) {
|
|
1803
|
+
let deferred3_0;
|
|
1804
|
+
let deferred3_1;
|
|
1805
|
+
try {
|
|
1806
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1807
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1808
|
+
const ret = wasm.hwpdocument_getCellPicturePropertiesByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, inner_control_idx);
|
|
1809
|
+
var ptr2 = ret[0];
|
|
1810
|
+
var len2 = ret[1];
|
|
1811
|
+
if (ret[3]) {
|
|
1812
|
+
ptr2 = 0; len2 = 0;
|
|
1813
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1814
|
+
}
|
|
1815
|
+
deferred3_0 = ptr2;
|
|
1816
|
+
deferred3_1 = len2;
|
|
1817
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1818
|
+
} finally {
|
|
1819
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1702
1822
|
/**
|
|
1703
1823
|
* 셀 속성을 조회한다.
|
|
1704
1824
|
*
|
|
@@ -1727,6 +1847,34 @@ export class HwpDocument {
|
|
|
1727
1847
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1728
1848
|
}
|
|
1729
1849
|
}
|
|
1850
|
+
/**
|
|
1851
|
+
* [Task #1138] 표 셀 내 Shape(글상자/사각형/도형) 속성 조회 (by_path).
|
|
1852
|
+
* @param {number} section_idx
|
|
1853
|
+
* @param {number} parent_para_idx
|
|
1854
|
+
* @param {string} cell_path_json
|
|
1855
|
+
* @param {number} inner_control_idx
|
|
1856
|
+
* @returns {string}
|
|
1857
|
+
*/
|
|
1858
|
+
getCellShapePropertiesByPath(section_idx, parent_para_idx, cell_path_json, inner_control_idx) {
|
|
1859
|
+
let deferred3_0;
|
|
1860
|
+
let deferred3_1;
|
|
1861
|
+
try {
|
|
1862
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1863
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1864
|
+
const ret = wasm.hwpdocument_getCellShapePropertiesByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, inner_control_idx);
|
|
1865
|
+
var ptr2 = ret[0];
|
|
1866
|
+
var len2 = ret[1];
|
|
1867
|
+
if (ret[3]) {
|
|
1868
|
+
ptr2 = 0; len2 = 0;
|
|
1869
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1870
|
+
}
|
|
1871
|
+
deferred3_0 = ptr2;
|
|
1872
|
+
deferred3_1 = len2;
|
|
1873
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1874
|
+
} finally {
|
|
1875
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1730
1878
|
/**
|
|
1731
1879
|
* 셀 내부 문단의 스타일을 조회한다.
|
|
1732
1880
|
* @param {number} sec_idx
|
|
@@ -1852,41 +2000,47 @@ export class HwpDocument {
|
|
|
1852
2000
|
* 컨트롤의 이미지 바이너리 데이터를 반환한다 (Uint8Array).
|
|
1853
2001
|
* @param {number} section_idx
|
|
1854
2002
|
* @param {number} para_idx
|
|
2003
|
+
* @param {string} cell_path_json
|
|
1855
2004
|
* @param {number} control_idx
|
|
1856
2005
|
* @returns {Uint8Array}
|
|
1857
2006
|
*/
|
|
1858
|
-
getControlImageData(section_idx, para_idx, control_idx) {
|
|
1859
|
-
const
|
|
2007
|
+
getControlImageData(section_idx, para_idx, cell_path_json, control_idx) {
|
|
2008
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2009
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2010
|
+
const ret = wasm.hwpdocument_getControlImageData(this.__wbg_ptr, section_idx, para_idx, ptr0, len0, control_idx);
|
|
1860
2011
|
if (ret[3]) {
|
|
1861
2012
|
throw takeFromExternrefTable0(ret[2]);
|
|
1862
2013
|
}
|
|
1863
|
-
var
|
|
2014
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1864
2015
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1865
|
-
return
|
|
2016
|
+
return v2;
|
|
1866
2017
|
}
|
|
1867
2018
|
/**
|
|
1868
2019
|
* 컨트롤의 이미지 MIME 타입을 반환한다.
|
|
1869
2020
|
* @param {number} section_idx
|
|
1870
2021
|
* @param {number} para_idx
|
|
2022
|
+
* @param {string} cell_path_json
|
|
1871
2023
|
* @param {number} control_idx
|
|
1872
2024
|
* @returns {string}
|
|
1873
2025
|
*/
|
|
1874
|
-
getControlImageMime(section_idx, para_idx, control_idx) {
|
|
1875
|
-
let
|
|
1876
|
-
let
|
|
2026
|
+
getControlImageMime(section_idx, para_idx, cell_path_json, control_idx) {
|
|
2027
|
+
let deferred3_0;
|
|
2028
|
+
let deferred3_1;
|
|
1877
2029
|
try {
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1880
|
-
|
|
2030
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2031
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2032
|
+
const ret = wasm.hwpdocument_getControlImageMime(this.__wbg_ptr, section_idx, para_idx, ptr0, len0, control_idx);
|
|
2033
|
+
var ptr2 = ret[0];
|
|
2034
|
+
var len2 = ret[1];
|
|
1881
2035
|
if (ret[3]) {
|
|
1882
|
-
|
|
2036
|
+
ptr2 = 0; len2 = 0;
|
|
1883
2037
|
throw takeFromExternrefTable0(ret[2]);
|
|
1884
2038
|
}
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
return getStringFromWasm0(
|
|
2039
|
+
deferred3_0 = ptr2;
|
|
2040
|
+
deferred3_1 = len2;
|
|
2041
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1888
2042
|
} finally {
|
|
1889
|
-
wasm.__wbindgen_free(
|
|
2043
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1890
2044
|
}
|
|
1891
2045
|
}
|
|
1892
2046
|
/**
|
|
@@ -2052,6 +2206,33 @@ export class HwpDocument {
|
|
|
2052
2206
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2053
2207
|
}
|
|
2054
2208
|
}
|
|
2209
|
+
/**
|
|
2210
|
+
* 각주/미주 내부 커서 렉트 계산
|
|
2211
|
+
* @param {number} section_idx
|
|
2212
|
+
* @param {number} para_idx
|
|
2213
|
+
* @param {number} control_idx
|
|
2214
|
+
* @param {number} note_para_idx
|
|
2215
|
+
* @param {number} char_offset
|
|
2216
|
+
* @returns {string}
|
|
2217
|
+
*/
|
|
2218
|
+
getCursorRectInNote(section_idx, para_idx, control_idx, note_para_idx, char_offset) {
|
|
2219
|
+
let deferred2_0;
|
|
2220
|
+
let deferred2_1;
|
|
2221
|
+
try {
|
|
2222
|
+
const ret = wasm.hwpdocument_getCursorRectInNote(this.__wbg_ptr, section_idx, para_idx, control_idx, note_para_idx, char_offset);
|
|
2223
|
+
var ptr1 = ret[0];
|
|
2224
|
+
var len1 = ret[1];
|
|
2225
|
+
if (ret[3]) {
|
|
2226
|
+
ptr1 = 0; len1 = 0;
|
|
2227
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2228
|
+
}
|
|
2229
|
+
deferred2_0 = ptr1;
|
|
2230
|
+
deferred2_1 = len1;
|
|
2231
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2232
|
+
} finally {
|
|
2233
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2055
2236
|
/**
|
|
2056
2237
|
* 문서 정보를 JSON 문자열로 반환한다.
|
|
2057
2238
|
* @returns {string}
|
|
@@ -2076,6 +2257,29 @@ export class HwpDocument {
|
|
|
2076
2257
|
const ret = wasm.hwpdocument_getDpi(this.__wbg_ptr);
|
|
2077
2258
|
return ret;
|
|
2078
2259
|
}
|
|
2260
|
+
/**
|
|
2261
|
+
* 미주 모양을 조회한다.
|
|
2262
|
+
* @param {number} section_idx
|
|
2263
|
+
* @returns {string}
|
|
2264
|
+
*/
|
|
2265
|
+
getEndnoteShape(section_idx) {
|
|
2266
|
+
let deferred2_0;
|
|
2267
|
+
let deferred2_1;
|
|
2268
|
+
try {
|
|
2269
|
+
const ret = wasm.hwpdocument_getEndnoteShape(this.__wbg_ptr, section_idx);
|
|
2270
|
+
var ptr1 = ret[0];
|
|
2271
|
+
var len1 = ret[1];
|
|
2272
|
+
if (ret[3]) {
|
|
2273
|
+
ptr1 = 0; len1 = 0;
|
|
2274
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2275
|
+
}
|
|
2276
|
+
deferred2_0 = ptr1;
|
|
2277
|
+
deferred2_1 = len1;
|
|
2278
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2279
|
+
} finally {
|
|
2280
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2079
2283
|
/**
|
|
2080
2284
|
* 수식 컨트롤의 속성을 조회한다.
|
|
2081
2285
|
*
|
|
@@ -2143,6 +2347,24 @@ export class HwpDocument {
|
|
|
2143
2347
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2144
2348
|
}
|
|
2145
2349
|
}
|
|
2350
|
+
/**
|
|
2351
|
+
* [Task #1142] 외부 file path 그림 reference 목록을 구조화된 JSON 배열로 반환한다.
|
|
2352
|
+
*
|
|
2353
|
+
* 반환: JSON 배열 `[{ key, binDataId, originalPath, basename, extension, loaded }, ...]`
|
|
2354
|
+
* @returns {string}
|
|
2355
|
+
*/
|
|
2356
|
+
getExternalImageReferences() {
|
|
2357
|
+
let deferred1_0;
|
|
2358
|
+
let deferred1_1;
|
|
2359
|
+
try {
|
|
2360
|
+
const ret = wasm.hwpdocument_getExternalImageReferences(this.__wbg_ptr);
|
|
2361
|
+
deferred1_0 = ret[0];
|
|
2362
|
+
deferred1_1 = ret[1];
|
|
2363
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2364
|
+
} finally {
|
|
2365
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2146
2368
|
/**
|
|
2147
2369
|
* 현재 대체 폰트 경로를 반환한다.
|
|
2148
2370
|
* @returns {string}
|
|
@@ -2608,7 +2830,62 @@ export class HwpDocument {
|
|
|
2608
2830
|
if (ret[2]) {
|
|
2609
2831
|
throw takeFromExternrefTable0(ret[1]);
|
|
2610
2832
|
}
|
|
2611
|
-
return ret[0] >>> 0;
|
|
2833
|
+
return ret[0] >>> 0;
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* 각주/미주 편집 모드 진입 대상 조회
|
|
2837
|
+
* @param {number} section_idx
|
|
2838
|
+
* @param {number} para_idx
|
|
2839
|
+
* @param {number} control_idx
|
|
2840
|
+
* @returns {string}
|
|
2841
|
+
*/
|
|
2842
|
+
getNoteEditInfo(section_idx, para_idx, control_idx) {
|
|
2843
|
+
let deferred2_0;
|
|
2844
|
+
let deferred2_1;
|
|
2845
|
+
try {
|
|
2846
|
+
const ret = wasm.hwpdocument_getNoteEditInfo(this.__wbg_ptr, section_idx, para_idx, control_idx);
|
|
2847
|
+
var ptr1 = ret[0];
|
|
2848
|
+
var len1 = ret[1];
|
|
2849
|
+
if (ret[3]) {
|
|
2850
|
+
ptr1 = 0; len1 = 0;
|
|
2851
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2852
|
+
}
|
|
2853
|
+
deferred2_0 = ptr1;
|
|
2854
|
+
deferred2_1 = len1;
|
|
2855
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2856
|
+
} finally {
|
|
2857
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
* 각주/미주 내부 수식 컨트롤의 속성을 조회한다.
|
|
2862
|
+
* @param {string} kind
|
|
2863
|
+
* @param {number} section_idx
|
|
2864
|
+
* @param {number} parent_para_idx
|
|
2865
|
+
* @param {number} note_control_idx
|
|
2866
|
+
* @param {number} note_para_idx
|
|
2867
|
+
* @param {number} inner_control_idx
|
|
2868
|
+
* @returns {string}
|
|
2869
|
+
*/
|
|
2870
|
+
getNoteEquationProperties(kind, section_idx, parent_para_idx, note_control_idx, note_para_idx, inner_control_idx) {
|
|
2871
|
+
let deferred3_0;
|
|
2872
|
+
let deferred3_1;
|
|
2873
|
+
try {
|
|
2874
|
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2875
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2876
|
+
const ret = wasm.hwpdocument_getNoteEquationProperties(this.__wbg_ptr, ptr0, len0, section_idx, parent_para_idx, note_control_idx, note_para_idx, inner_control_idx);
|
|
2877
|
+
var ptr2 = ret[0];
|
|
2878
|
+
var len2 = ret[1];
|
|
2879
|
+
if (ret[3]) {
|
|
2880
|
+
ptr2 = 0; len2 = 0;
|
|
2881
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2882
|
+
}
|
|
2883
|
+
deferred3_0 = ptr2;
|
|
2884
|
+
deferred3_1 = len2;
|
|
2885
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2886
|
+
} finally {
|
|
2887
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2888
|
+
}
|
|
2612
2889
|
}
|
|
2613
2890
|
/**
|
|
2614
2891
|
* 문서에 정의된 문단 번호(Numbering) 목록을 조회한다.
|
|
@@ -2629,6 +2906,29 @@ export class HwpDocument {
|
|
|
2629
2906
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2630
2907
|
}
|
|
2631
2908
|
}
|
|
2909
|
+
/**
|
|
2910
|
+
* 구역의 쪽 테두리/배경 설정을 JSON으로 반환한다.
|
|
2911
|
+
* @param {number} section_idx
|
|
2912
|
+
* @returns {string}
|
|
2913
|
+
*/
|
|
2914
|
+
getPageBorderFill(section_idx) {
|
|
2915
|
+
let deferred2_0;
|
|
2916
|
+
let deferred2_1;
|
|
2917
|
+
try {
|
|
2918
|
+
const ret = wasm.hwpdocument_getPageBorderFill(this.__wbg_ptr, section_idx);
|
|
2919
|
+
var ptr1 = ret[0];
|
|
2920
|
+
var len1 = ret[1];
|
|
2921
|
+
if (ret[3]) {
|
|
2922
|
+
ptr1 = 0; len1 = 0;
|
|
2923
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2924
|
+
}
|
|
2925
|
+
deferred2_0 = ptr1;
|
|
2926
|
+
deferred2_1 = len1;
|
|
2927
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2928
|
+
} finally {
|
|
2929
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2632
2932
|
/**
|
|
2633
2933
|
* 컨트롤(표, 이미지 등) 레이아웃 정보를 반환한다.
|
|
2634
2934
|
* @param {number} page_num
|
|
@@ -2890,6 +3190,32 @@ export class HwpDocument {
|
|
|
2890
3190
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2891
3191
|
}
|
|
2892
3192
|
}
|
|
3193
|
+
/**
|
|
3194
|
+
* 각주/미주 내부 문단 속성 조회
|
|
3195
|
+
* @param {number} section_idx
|
|
3196
|
+
* @param {number} para_idx
|
|
3197
|
+
* @param {number} control_idx
|
|
3198
|
+
* @param {number} fn_para_idx
|
|
3199
|
+
* @returns {string}
|
|
3200
|
+
*/
|
|
3201
|
+
getParaPropertiesInFootnote(section_idx, para_idx, control_idx, fn_para_idx) {
|
|
3202
|
+
let deferred2_0;
|
|
3203
|
+
let deferred2_1;
|
|
3204
|
+
try {
|
|
3205
|
+
const ret = wasm.hwpdocument_getParaPropertiesInFootnote(this.__wbg_ptr, section_idx, para_idx, control_idx, fn_para_idx);
|
|
3206
|
+
var ptr1 = ret[0];
|
|
3207
|
+
var len1 = ret[1];
|
|
3208
|
+
if (ret[3]) {
|
|
3209
|
+
ptr1 = 0; len1 = 0;
|
|
3210
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3211
|
+
}
|
|
3212
|
+
deferred2_0 = ptr1;
|
|
3213
|
+
deferred2_1 = len1;
|
|
3214
|
+
return getStringFromWasm0(ptr1, len1);
|
|
3215
|
+
} finally {
|
|
3216
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
2893
3219
|
/**
|
|
2894
3220
|
* 머리말/꼬리말 문단의 문단 속성을 조회한다.
|
|
2895
3221
|
* @param {number} section_idx
|
|
@@ -3083,6 +3409,34 @@ export class HwpDocument {
|
|
|
3083
3409
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3084
3410
|
}
|
|
3085
3411
|
}
|
|
3412
|
+
/**
|
|
3413
|
+
* 각주/미주 내부 선택 영역의 줄별 사각형을 반환한다.
|
|
3414
|
+
* @param {number} page_num
|
|
3415
|
+
* @param {number} footnote_index
|
|
3416
|
+
* @param {number} start_fn_para_idx
|
|
3417
|
+
* @param {number} start_char_offset
|
|
3418
|
+
* @param {number} end_fn_para_idx
|
|
3419
|
+
* @param {number} end_char_offset
|
|
3420
|
+
* @returns {string}
|
|
3421
|
+
*/
|
|
3422
|
+
getSelectionRectsInFootnote(page_num, footnote_index, start_fn_para_idx, start_char_offset, end_fn_para_idx, end_char_offset) {
|
|
3423
|
+
let deferred2_0;
|
|
3424
|
+
let deferred2_1;
|
|
3425
|
+
try {
|
|
3426
|
+
const ret = wasm.hwpdocument_getSelectionRectsInFootnote(this.__wbg_ptr, page_num, footnote_index, start_fn_para_idx, start_char_offset, end_fn_para_idx, end_char_offset);
|
|
3427
|
+
var ptr1 = ret[0];
|
|
3428
|
+
var len1 = ret[1];
|
|
3429
|
+
if (ret[3]) {
|
|
3430
|
+
ptr1 = 0; len1 = 0;
|
|
3431
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3432
|
+
}
|
|
3433
|
+
deferred2_0 = ptr1;
|
|
3434
|
+
deferred2_1 = len1;
|
|
3435
|
+
return getStringFromWasm0(ptr1, len1);
|
|
3436
|
+
} finally {
|
|
3437
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3086
3440
|
/**
|
|
3087
3441
|
* [Task #919] 글상자/도형 컨트롤의 페이지 좌표 바운딩박스를 반환한다.
|
|
3088
3442
|
*
|
|
@@ -3749,6 +4103,26 @@ export class HwpDocument {
|
|
|
3749
4103
|
const ret = wasm.hwpdocument_injectExternalImage(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
3750
4104
|
return ret >>> 0;
|
|
3751
4105
|
}
|
|
4106
|
+
/**
|
|
4107
|
+
* [Task #1143] `getExternalImageReferences()` 의 key로 외부 이미지 bytes를 주입한다.
|
|
4108
|
+
*
|
|
4109
|
+
* 지원 key: `binData:<bin_data_id>`.
|
|
4110
|
+
* 잘못된 key, 존재하지 않는 key, 이미 loaded 상태인 reference는 0을 반환한다.
|
|
4111
|
+
* @param {string} key
|
|
4112
|
+
* @param {Uint8Array} data
|
|
4113
|
+
* @param {string} display_path
|
|
4114
|
+
* @returns {number}
|
|
4115
|
+
*/
|
|
4116
|
+
injectExternalImageByKey(key, data, display_path) {
|
|
4117
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4118
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4119
|
+
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
4120
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4121
|
+
const ptr2 = passStringToWasm0(display_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4122
|
+
const len2 = WASM_VECTOR_LEN;
|
|
4123
|
+
const ret = wasm.hwpdocument_injectExternalImageByKey(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4124
|
+
return ret >>> 0;
|
|
4125
|
+
}
|
|
3752
4126
|
/**
|
|
3753
4127
|
* 단 나누기 삽입 (Ctrl+Shift+Enter)
|
|
3754
4128
|
* @param {number} section_idx
|
|
@@ -3774,6 +4148,31 @@ export class HwpDocument {
|
|
|
3774
4148
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3775
4149
|
}
|
|
3776
4150
|
}
|
|
4151
|
+
/**
|
|
4152
|
+
* 미주를 삽입한다.
|
|
4153
|
+
* @param {number} section_idx
|
|
4154
|
+
* @param {number} para_idx
|
|
4155
|
+
* @param {number} char_offset
|
|
4156
|
+
* @returns {string}
|
|
4157
|
+
*/
|
|
4158
|
+
insertEndnote(section_idx, para_idx, char_offset) {
|
|
4159
|
+
let deferred2_0;
|
|
4160
|
+
let deferred2_1;
|
|
4161
|
+
try {
|
|
4162
|
+
const ret = wasm.hwpdocument_insertEndnote(this.__wbg_ptr, section_idx, para_idx, char_offset);
|
|
4163
|
+
var ptr1 = ret[0];
|
|
4164
|
+
var len1 = ret[1];
|
|
4165
|
+
if (ret[3]) {
|
|
4166
|
+
ptr1 = 0; len1 = 0;
|
|
4167
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4168
|
+
}
|
|
4169
|
+
deferred2_0 = ptr1;
|
|
4170
|
+
deferred2_1 = len1;
|
|
4171
|
+
return getStringFromWasm0(ptr1, len1);
|
|
4172
|
+
} finally {
|
|
4173
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4174
|
+
}
|
|
4175
|
+
}
|
|
3777
4176
|
/**
|
|
3778
4177
|
* 수식을 삽입한다.
|
|
3779
4178
|
* @param {number} section_idx
|
|
@@ -3938,10 +4337,21 @@ export class HwpDocument {
|
|
|
3938
4337
|
* width, height: HWPUNIT 단위 크기
|
|
3939
4338
|
* extension: 파일 확장자 (jpg, png 등)
|
|
3940
4339
|
*
|
|
3941
|
-
* 반환:
|
|
4340
|
+
* 반환:
|
|
4341
|
+
* - 본문 inline: `{"ok":true,"paraIdx":<N>,"controlIdx":0}`
|
|
4342
|
+
* - 셀 floating (#1151): `{"ok":true,"paraIdx":<table_para>,"controlIdx":<new_sibling_idx>}`
|
|
4343
|
+
*
|
|
4344
|
+
* `cell_path_json` 이 빈 문자열 또는 `"[]"` 면 본문 inline 삽입. 그 외에는
|
|
4345
|
+
* 표 셀 영역에 floating picture (한컴 정합) 로 삽입한다.
|
|
4346
|
+
* 예: `[{"controlIndex":0,"cellIndex":2,"cellParaIndex":0}]`
|
|
4347
|
+
* [Task #1151 v8 결함 C] `paper_offset_x_hu / paper_offset_y_hu` 는 사용자가 셀 안에
|
|
4348
|
+
* 클릭/드래그한 위치 (paper-relative HU). studio 의 finishImagePlacement 가 drag 좌표를
|
|
4349
|
+
* 변환하여 전달. JS 측에서 `undefined` 전달 시 (또는 음수) wasm 이 셀 좌상단을 default 사용
|
|
4350
|
+
* — 기존 동작 호환.
|
|
3942
4351
|
* @param {number} section_idx
|
|
3943
4352
|
* @param {number} para_idx
|
|
3944
4353
|
* @param {number} char_offset
|
|
4354
|
+
* @param {string} cell_path_json
|
|
3945
4355
|
* @param {Uint8Array} image_data
|
|
3946
4356
|
* @param {number} width
|
|
3947
4357
|
* @param {number} height
|
|
@@ -3949,30 +4359,34 @@ export class HwpDocument {
|
|
|
3949
4359
|
* @param {number} natural_height_px
|
|
3950
4360
|
* @param {string} extension
|
|
3951
4361
|
* @param {string} description
|
|
4362
|
+
* @param {number | null} [paper_offset_x_hu]
|
|
4363
|
+
* @param {number | null} [paper_offset_y_hu]
|
|
3952
4364
|
* @returns {string}
|
|
3953
4365
|
*/
|
|
3954
|
-
insertPicture(section_idx, para_idx, char_offset, image_data, width, height, natural_width_px, natural_height_px, extension, description) {
|
|
3955
|
-
let
|
|
3956
|
-
let
|
|
4366
|
+
insertPicture(section_idx, para_idx, char_offset, cell_path_json, image_data, width, height, natural_width_px, natural_height_px, extension, description, paper_offset_x_hu, paper_offset_y_hu) {
|
|
4367
|
+
let deferred6_0;
|
|
4368
|
+
let deferred6_1;
|
|
3957
4369
|
try {
|
|
3958
|
-
const ptr0 =
|
|
4370
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3959
4371
|
const len0 = WASM_VECTOR_LEN;
|
|
3960
|
-
const ptr1 =
|
|
4372
|
+
const ptr1 = passArray8ToWasm0(image_data, wasm.__wbindgen_malloc);
|
|
3961
4373
|
const len1 = WASM_VECTOR_LEN;
|
|
3962
|
-
const ptr2 = passStringToWasm0(
|
|
4374
|
+
const ptr2 = passStringToWasm0(extension, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3963
4375
|
const len2 = WASM_VECTOR_LEN;
|
|
3964
|
-
const
|
|
3965
|
-
|
|
3966
|
-
|
|
4376
|
+
const ptr3 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4377
|
+
const len3 = WASM_VECTOR_LEN;
|
|
4378
|
+
const ret = wasm.hwpdocument_insertPicture(this.__wbg_ptr, section_idx, para_idx, char_offset, ptr0, len0, ptr1, len1, width, height, natural_width_px, natural_height_px, ptr2, len2, ptr3, len3, isLikeNone(paper_offset_x_hu) ? Number.MAX_SAFE_INTEGER : (paper_offset_x_hu) >> 0, isLikeNone(paper_offset_y_hu) ? Number.MAX_SAFE_INTEGER : (paper_offset_y_hu) >> 0);
|
|
4379
|
+
var ptr5 = ret[0];
|
|
4380
|
+
var len5 = ret[1];
|
|
3967
4381
|
if (ret[3]) {
|
|
3968
|
-
|
|
4382
|
+
ptr5 = 0; len5 = 0;
|
|
3969
4383
|
throw takeFromExternrefTable0(ret[2]);
|
|
3970
4384
|
}
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
return getStringFromWasm0(
|
|
4385
|
+
deferred6_0 = ptr5;
|
|
4386
|
+
deferred6_1 = len5;
|
|
4387
|
+
return getStringFromWasm0(ptr5, len5);
|
|
3974
4388
|
} finally {
|
|
3975
|
-
wasm.__wbindgen_free(
|
|
4389
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
3976
4390
|
}
|
|
3977
4391
|
}
|
|
3978
4392
|
/**
|
|
@@ -4716,6 +5130,37 @@ export class HwpDocument {
|
|
|
4716
5130
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
4717
5131
|
}
|
|
4718
5132
|
}
|
|
5133
|
+
/**
|
|
5134
|
+
* HTML 문자열을 파싱하여 cellPath가 가리키는 중첩 표 셀에 삽입한다.
|
|
5135
|
+
* @param {number} section_idx
|
|
5136
|
+
* @param {number} parent_para_idx
|
|
5137
|
+
* @param {string} path_json
|
|
5138
|
+
* @param {number} char_offset
|
|
5139
|
+
* @param {string} html
|
|
5140
|
+
* @returns {string}
|
|
5141
|
+
*/
|
|
5142
|
+
pasteHtmlInCellByPath(section_idx, parent_para_idx, path_json, char_offset, html) {
|
|
5143
|
+
let deferred4_0;
|
|
5144
|
+
let deferred4_1;
|
|
5145
|
+
try {
|
|
5146
|
+
const ptr0 = passStringToWasm0(path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5147
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5148
|
+
const ptr1 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5149
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5150
|
+
const ret = wasm.hwpdocument_pasteHtmlInCellByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, char_offset, ptr1, len1);
|
|
5151
|
+
var ptr3 = ret[0];
|
|
5152
|
+
var len3 = ret[1];
|
|
5153
|
+
if (ret[3]) {
|
|
5154
|
+
ptr3 = 0; len3 = 0;
|
|
5155
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5156
|
+
}
|
|
5157
|
+
deferred4_0 = ptr3;
|
|
5158
|
+
deferred4_1 = len3;
|
|
5159
|
+
return getStringFromWasm0(ptr3, len3);
|
|
5160
|
+
} finally {
|
|
5161
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
5162
|
+
}
|
|
5163
|
+
}
|
|
4719
5164
|
/**
|
|
4720
5165
|
* 내부 클립보드의 내용을 캐럿 위치에 붙여넣는다 (본문 문단).
|
|
4721
5166
|
*
|
|
@@ -4773,6 +5218,36 @@ export class HwpDocument {
|
|
|
4773
5218
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4774
5219
|
}
|
|
4775
5220
|
}
|
|
5221
|
+
/**
|
|
5222
|
+
* 내부 클립보드의 내용을 cellPath가 가리키는 중첩 표 셀에 붙여넣는다.
|
|
5223
|
+
*
|
|
5224
|
+
* 반환값: JSON `{"ok":true,"cellParaIdx":<idx>,"charOffset":<offset>}`
|
|
5225
|
+
* @param {number} section_idx
|
|
5226
|
+
* @param {number} parent_para_idx
|
|
5227
|
+
* @param {string} path_json
|
|
5228
|
+
* @param {number} char_offset
|
|
5229
|
+
* @returns {string}
|
|
5230
|
+
*/
|
|
5231
|
+
pasteInternalInCellByPath(section_idx, parent_para_idx, path_json, char_offset) {
|
|
5232
|
+
let deferred3_0;
|
|
5233
|
+
let deferred3_1;
|
|
5234
|
+
try {
|
|
5235
|
+
const ptr0 = passStringToWasm0(path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5236
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5237
|
+
const ret = wasm.hwpdocument_pasteInternalInCellByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, char_offset);
|
|
5238
|
+
var ptr2 = ret[0];
|
|
5239
|
+
var len2 = ret[1];
|
|
5240
|
+
if (ret[3]) {
|
|
5241
|
+
ptr2 = 0; len2 = 0;
|
|
5242
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5243
|
+
}
|
|
5244
|
+
deferred3_0 = ptr2;
|
|
5245
|
+
deferred3_1 = len2;
|
|
5246
|
+
return getStringFromWasm0(ptr2, len2);
|
|
5247
|
+
} finally {
|
|
5248
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
5249
|
+
}
|
|
5250
|
+
}
|
|
4776
5251
|
/**
|
|
4777
5252
|
* 사용자 명시 요청에 의한 lineseg 전체 reflow (#177).
|
|
4778
5253
|
*
|
|
@@ -4973,8 +5448,9 @@ export class HwpDocument {
|
|
|
4973
5448
|
* 다층 레이어 필터를 적용한 Canvas 렌더링 (Task #516, Stage 5.2).
|
|
4974
5449
|
*
|
|
4975
5450
|
* `layer_kind`:
|
|
4976
|
-
* - `"all"` → 모든
|
|
4977
|
-
* - `"
|
|
5451
|
+
* - `"all"` → 모든 PaintOp 렌더 (기본 `renderPageToCanvas` 와 동일)
|
|
5452
|
+
* - `"background"` → page background layer
|
|
5453
|
+
* - `"flow"` → 본문 layer (BehindText / InFrontOfText plane 제외)
|
|
4978
5454
|
* - `"behind"` → BehindText overlay layer
|
|
4979
5455
|
* - `"front"` → InFrontOfText overlay layer
|
|
4980
5456
|
*
|
|
@@ -5251,6 +5727,37 @@ export class HwpDocument {
|
|
|
5251
5727
|
const ret = wasm.hwpdocument_setActiveFieldInCell(this.__wbg_ptr, section_idx, parent_para_idx, control_idx, cell_idx, cell_para_idx, char_offset, is_textbox);
|
|
5252
5728
|
return ret !== 0;
|
|
5253
5729
|
}
|
|
5730
|
+
/**
|
|
5731
|
+
* [Task #1151 v4] 표 셀 내 Picture 속성 변경 (by_path). Shape 패턴 정합.
|
|
5732
|
+
* @param {number} section_idx
|
|
5733
|
+
* @param {number} parent_para_idx
|
|
5734
|
+
* @param {string} cell_path_json
|
|
5735
|
+
* @param {number} inner_control_idx
|
|
5736
|
+
* @param {string} props_json
|
|
5737
|
+
* @returns {string}
|
|
5738
|
+
*/
|
|
5739
|
+
setCellPicturePropertiesByPath(section_idx, parent_para_idx, cell_path_json, inner_control_idx, props_json) {
|
|
5740
|
+
let deferred4_0;
|
|
5741
|
+
let deferred4_1;
|
|
5742
|
+
try {
|
|
5743
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5744
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5745
|
+
const ptr1 = passStringToWasm0(props_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5746
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5747
|
+
const ret = wasm.hwpdocument_setCellPicturePropertiesByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, inner_control_idx, ptr1, len1);
|
|
5748
|
+
var ptr3 = ret[0];
|
|
5749
|
+
var len3 = ret[1];
|
|
5750
|
+
if (ret[3]) {
|
|
5751
|
+
ptr3 = 0; len3 = 0;
|
|
5752
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5753
|
+
}
|
|
5754
|
+
deferred4_0 = ptr3;
|
|
5755
|
+
deferred4_1 = len3;
|
|
5756
|
+
return getStringFromWasm0(ptr3, len3);
|
|
5757
|
+
} finally {
|
|
5758
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5254
5761
|
/**
|
|
5255
5762
|
* 셀 속성을 수정한다.
|
|
5256
5763
|
*
|
|
@@ -5282,6 +5789,37 @@ export class HwpDocument {
|
|
|
5282
5789
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
5283
5790
|
}
|
|
5284
5791
|
}
|
|
5792
|
+
/**
|
|
5793
|
+
* [Task #1138] 표 셀 내 Shape 속성 변경 (by_path).
|
|
5794
|
+
* @param {number} section_idx
|
|
5795
|
+
* @param {number} parent_para_idx
|
|
5796
|
+
* @param {string} cell_path_json
|
|
5797
|
+
* @param {number} inner_control_idx
|
|
5798
|
+
* @param {string} props_json
|
|
5799
|
+
* @returns {string}
|
|
5800
|
+
*/
|
|
5801
|
+
setCellShapePropertiesByPath(section_idx, parent_para_idx, cell_path_json, inner_control_idx, props_json) {
|
|
5802
|
+
let deferred4_0;
|
|
5803
|
+
let deferred4_1;
|
|
5804
|
+
try {
|
|
5805
|
+
const ptr0 = passStringToWasm0(cell_path_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5806
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5807
|
+
const ptr1 = passStringToWasm0(props_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5808
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5809
|
+
const ret = wasm.hwpdocument_setCellShapePropertiesByPath(this.__wbg_ptr, section_idx, parent_para_idx, ptr0, len0, inner_control_idx, ptr1, len1);
|
|
5810
|
+
var ptr3 = ret[0];
|
|
5811
|
+
var len3 = ret[1];
|
|
5812
|
+
if (ret[3]) {
|
|
5813
|
+
ptr3 = 0; len3 = 0;
|
|
5814
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5815
|
+
}
|
|
5816
|
+
deferred4_0 = ptr3;
|
|
5817
|
+
deferred4_1 = len3;
|
|
5818
|
+
return getStringFromWasm0(ptr3, len3);
|
|
5819
|
+
} finally {
|
|
5820
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
5821
|
+
}
|
|
5822
|
+
}
|
|
5285
5823
|
/**
|
|
5286
5824
|
* @param {boolean} enabled
|
|
5287
5825
|
*/
|
|
@@ -5532,6 +6070,39 @@ export class HwpDocument {
|
|
|
5532
6070
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
5533
6071
|
}
|
|
5534
6072
|
}
|
|
6073
|
+
/**
|
|
6074
|
+
* 각주/미주 내부 수식 컨트롤의 속성을 변경한다.
|
|
6075
|
+
* @param {string} kind
|
|
6076
|
+
* @param {number} section_idx
|
|
6077
|
+
* @param {number} parent_para_idx
|
|
6078
|
+
* @param {number} note_control_idx
|
|
6079
|
+
* @param {number} note_para_idx
|
|
6080
|
+
* @param {number} inner_control_idx
|
|
6081
|
+
* @param {string} props_json
|
|
6082
|
+
* @returns {string}
|
|
6083
|
+
*/
|
|
6084
|
+
setNoteEquationProperties(kind, section_idx, parent_para_idx, note_control_idx, note_para_idx, inner_control_idx, props_json) {
|
|
6085
|
+
let deferred4_0;
|
|
6086
|
+
let deferred4_1;
|
|
6087
|
+
try {
|
|
6088
|
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6089
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6090
|
+
const ptr1 = passStringToWasm0(props_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6091
|
+
const len1 = WASM_VECTOR_LEN;
|
|
6092
|
+
const ret = wasm.hwpdocument_setNoteEquationProperties(this.__wbg_ptr, ptr0, len0, section_idx, parent_para_idx, note_control_idx, note_para_idx, inner_control_idx, ptr1, len1);
|
|
6093
|
+
var ptr3 = ret[0];
|
|
6094
|
+
var len3 = ret[1];
|
|
6095
|
+
if (ret[3]) {
|
|
6096
|
+
ptr3 = 0; len3 = 0;
|
|
6097
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
6098
|
+
}
|
|
6099
|
+
deferred4_0 = ptr3;
|
|
6100
|
+
deferred4_1 = len3;
|
|
6101
|
+
return getStringFromWasm0(ptr3, len3);
|
|
6102
|
+
} finally {
|
|
6103
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
6104
|
+
}
|
|
6105
|
+
}
|
|
5535
6106
|
/**
|
|
5536
6107
|
* 문단 서식을 적용한다 (본문 문단).
|
|
5537
6108
|
* 문단 번호 시작 방식 설정
|
|
@@ -5559,6 +6130,32 @@ export class HwpDocument {
|
|
|
5559
6130
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
5560
6131
|
}
|
|
5561
6132
|
}
|
|
6133
|
+
/**
|
|
6134
|
+
* 구역의 쪽 테두리/배경 설정을 변경하고 재페이지네이션한다.
|
|
6135
|
+
* @param {number} section_idx
|
|
6136
|
+
* @param {string} json
|
|
6137
|
+
* @returns {string}
|
|
6138
|
+
*/
|
|
6139
|
+
setPageBorderFill(section_idx, json) {
|
|
6140
|
+
let deferred3_0;
|
|
6141
|
+
let deferred3_1;
|
|
6142
|
+
try {
|
|
6143
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6144
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6145
|
+
const ret = wasm.hwpdocument_setPageBorderFill(this.__wbg_ptr, section_idx, ptr0, len0);
|
|
6146
|
+
var ptr2 = ret[0];
|
|
6147
|
+
var len2 = ret[1];
|
|
6148
|
+
if (ret[3]) {
|
|
6149
|
+
ptr2 = 0; len2 = 0;
|
|
6150
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
6151
|
+
}
|
|
6152
|
+
deferred3_0 = ptr2;
|
|
6153
|
+
deferred3_1 = len2;
|
|
6154
|
+
return getStringFromWasm0(ptr2, len2);
|
|
6155
|
+
} finally {
|
|
6156
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
6157
|
+
}
|
|
6158
|
+
}
|
|
5562
6159
|
/**
|
|
5563
6160
|
* 구역의 용지 설정(PageDef)을 변경하고 재페이지네이션한다.
|
|
5564
6161
|
* @param {number} section_idx
|