mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-31 06:06:48 -06:00
Pass-through of package content GridCraft does not model: on read the raw parts are kept with their content types and relationship graph per owner (package root, workbook, sheet); on write they get fresh part names where needed and new relationship ids, and the r:ids in kept XML are rewritten. Kept: custom document properties, ribbon customisation, add-in task panes, custom XML, links to external workbooks with <externalReferences> (never followed), connections, sheet query tables, printer settings with the <pageSetup r:id> (#324), form and ActiveX controls, OLE objects and sheet backgrounds with their VML shapes (merged with GridCraft's note shapes). Content whose graph reaches parts GridCraft rewrites is dropped with a warning; sheet content goes with its sheet and is not copied by Copy Sheet. Fixes #324 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.3 KiB
Rust
32 lines
1.3 KiB
Rust
//! The GridCraft document model: workbooks, sheets, a copy-on-write cell store, interned
|
|
//! styles, defined names, tables, conditional formats, validation, comments, charts and print
|
|
//! settings. Pure data; calculation lives in `gridcraft-calc`.
|
|
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
mod b64;
|
|
pub mod cell;
|
|
mod cellmap;
|
|
pub mod features;
|
|
pub mod preserved;
|
|
pub mod sheet;
|
|
pub mod store;
|
|
pub mod style;
|
|
pub mod workbook;
|
|
|
|
pub use cell::{Cell, CellPicture, Formula};
|
|
pub use features::*;
|
|
pub use preserved::{Preserved, PreservedPart, PreservedRel, PreservedXml};
|
|
pub use sheet::{DEFAULT_COL_WIDTH, DEFAULT_ROW_HEIGHT, LineIndex, Sheet, Visibility};
|
|
pub use store::CellStore;
|
|
pub use style::{
|
|
Alignment, BorderLine, BorderStyle, Borders, Color, Fill, Font, HAlign, NumFmt, PatternType, Style, StyleId, StyleTable, Theme, Underline,
|
|
VAlign, VertAlign,
|
|
};
|
|
pub use workbook::{CalcMode, CalcSettings, DefinedName, DocProps, Workbook};
|
|
|
|
/// Font used for new workbooks. Only a name: renderers substitute an available open font
|
|
/// (e.g. the metric-compatible Carlito) when it isn't installed.
|
|
pub const DEFAULT_FONT: &str = "Calibri";
|
|
pub const DEFAULT_FONT_SIZE: f32 = 11.0;
|