mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 22:22:20 +00:00
- Model: Sheet.edit_ranges (title, ranges, optional password hash,
security descriptor) and gridcraft_model::password: the ECMA-376 legacy
16-bit hash and the salted, iterated SHA-2 hash (SHA-512/384/256; other
algorithms, damaged hashes and spin counts over 10,000,000 are refused).
New passwords use SHA-512, spin count 100000. Adds the sha2 crate.
- XLSX: <protectedRanges> read and written; an unreadable password keeps
the range locked.
- review.allowEditRanges {action: list|add|modify|delete|unlock, ...}: empty
params list; ranges can't change while the sheet is protected; unlock
verifies the password for the session. Not journaled (passwords).
- Locked-cell checks (commit guard, cell.set, picture in cell) let edits
through in open or unlocked ranges; ranges move with structural edits.
- Ribbon button and a form dialog (menu invocation only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.2 KiB
Rust
32 lines
1.2 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 password;
|
|
pub mod sheet;
|
|
pub mod store;
|
|
pub mod style;
|
|
pub mod workbook;
|
|
|
|
pub use cell::{Cell, CellPicture, Formula};
|
|
pub use features::*;
|
|
pub use password::PasswordHash;
|
|
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;
|