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
/// Word (.doc) document support.
///
/// This module provides parsing of Microsoft Word documents in the legacy
/// binary format (.doc files), which uses OLE2 structured storage.
///
/// # Architecture
///
/// The module is organized around these key types:
/// - `Package`: The overall .doc file package (OLE container)
/// - `Document`: The main document content and API
/// - `Paragraph`: A paragraph with runs (formatted text)
/// - `Run`: A text run with formatting
/// - `Table`: A table with rows and cells
///
/// # DOC File Structure
///
/// A .doc file is an OLE2 structured storage containing several streams:
/// - **WordDocument**: Main document stream containing the FIB and text
/// - **1Table** or **0Table**: Contains formatting and structure information
/// - **Data**: Contains embedded objects and images
/// - **\x05SummaryInformation**: Document metadata
///
/// # Example
///
/// ```rust,no_run
/// use litchi::doc::Package;
///
/// // Open a document
/// let package = Package::open("document.doc")?;
/// let doc = package.document()?;
///
/// // Extract all text
/// let text = doc.text()?;
/// println!("Document text: {}", text);
///
/// // Access paragraphs
/// for para in doc.paragraphs()? {
/// println!("Paragraph: {}", para.text()?);
/// }
///
/// // Access tables
/// for table in doc.tables()? {
/// for row in table.rows()? {
/// for cell in row.cells()? {
/// println!("Cell: {}", cell.text()?);
/// }
/// }
/// }
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
pub use Document;
pub use Package;
pub use ;
pub use ;