1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! HWPX format codec for HwpForge.
//!
//! This crate reads and writes HWPX files (ZIP archives containing XML,
//! per KS X 6101), converting between HwpForge Core's document types
//! and the HWPX on-disk format.
//!
//! # Architecture
//!
//! **Decoding** (HWPX → Core):
//! 1. Open ZIP, validate mimetype, enumerate section files
//! 2. Parse `Contents/header.xml` → [`HwpxStyleStore`]
//! 3. Parse `Contents/section*.xml` → paragraphs + page settings
//! 4. Assemble `Document<Draft>` with sections
//!
//! **Encoding** (Core → HWPX):
//! 1. Serialize [`HwpxStyleStore`] → `header.xml`
//! 2. Serialize each section → `section{N}.xml`
//! 3. Package into ZIP with metadata files
//!
//! # Quick Start
//!
//! ```no_run
//! use hwpforge_smithy_hwpx::{HwpxDecoder, HwpxEncoder};
//!
//! // Decode
//! let result = HwpxDecoder::decode_file("document.hwpx").unwrap();
//! println!("Sections: {}", result.document.sections().len());
//!
//! // Round-trip: decode → validate → encode
//! let validated = result.document.validate().unwrap();
//! let output = HwpxEncoder::encode(&validated, &result.style_store, &result.image_store).unwrap();
//! std::fs::write("output.hwpx", &output).unwrap();
//! ```
//!
//! # Supported Content
//!
//! - Text runs with character shapes, paragraph shapes, styles
//! - Tables (nested), images (binary + path), text boxes
//! - Headers, footers, page numbers, footnotes, endnotes
//! - Shapes: line, ellipse, polygon, arc, curve, connect line
//! - Equations (HancomEQN), charts (18 types, OOXML)
//! - Multi-column layouts, captions, bookmarks, fields, memos
//! - Page settings (size, margins, landscape, gutter, master pages)
//!
//! Not yet supported:
//! - OLE objects, form controls, change tracking
pub use ;
pub use ;
pub use HwpxEncoder;
pub use ;
pub use ;
pub use ;
pub use HwpxStyleLookup;
pub use ;