From 0407b63663cee07423b42f4a4046440d794fc2cb Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 05:11:53 +0000 Subject: [PATCH] GridCraft: update XLS import to current shared crate --- Cargo.lock | 23 ++++++++++++++++++----- Cargo.toml | 6 +++--- crates/xlsx/src/xls.rs | 10 ++++++---- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba1bf3641..b3cb8c0b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -910,7 +910,7 @@ dependencies = [ [[package]] name = "craft-cfb" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=119415f46f601e20b9bc6b1b4d6979ceda86d88e#119415f46f601e20b9bc6b1b4d6979ceda86d88e" +source = "git+https://github.com/storytold/craft-libs?rev=bb57d422d0bc842cbde430955825553ab7b976f4#bb57d422d0bc842cbde430955825553ab7b976f4" [[package]] name = "craft-fonts-build" @@ -957,7 +957,7 @@ dependencies = [ [[package]] name = "craft-sheet" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=119415f46f601e20b9bc6b1b4d6979ceda86d88e#119415f46f601e20b9bc6b1b4d6979ceda86d88e" +source = "git+https://github.com/storytold/craft-libs?rev=bb57d422d0bc842cbde430955825553ab7b976f4#bb57d422d0bc842cbde430955825553ab7b976f4" [[package]] name = "craft-ui" @@ -982,7 +982,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=119415f46f601e20b9bc6b1b4d6979ceda86d88e#119415f46f601e20b9bc6b1b4d6979ceda86d88e" +source = "git+https://github.com/storytold/craft-libs?rev=bb57d422d0bc842cbde430955825553ab7b976f4#bb57d422d0bc842cbde430955825553ab7b976f4" dependencies = [ "chrono", "dunce", @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=119415f46f601e20b9bc6b1b4d6979ceda86d88e#119415f46f601e20b9bc6b1b4d6979ceda86d88e" +source = "git+https://github.com/storytold/craft-libs?rev=bb57d422d0bc842cbde430955825553ab7b976f4#bb57d422d0bc842cbde430955825553ab7b976f4" dependencies = [ "egui", "objc2 0.6.5", @@ -1048,10 +1048,13 @@ dependencies = [ [[package]] name = "craft-xls" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=119415f46f601e20b9bc6b1b4d6979ceda86d88e#119415f46f601e20b9bc6b1b4d6979ceda86d88e" +source = "git+https://github.com/storytold/craft-libs?rev=bb57d422d0bc842cbde430955825553ab7b976f4#bb57d422d0bc842cbde430955825553ab7b976f4" dependencies = [ "craft-cfb", "craft-sheet", + "md-5", + "miniz_oxide 0.9.1", + "sha1 0.10.7", "thiserror 2.0.21", ] @@ -3013,6 +3016,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.8.3" diff --git a/Cargo.toml b/Cargo.toml index ad9ae0f1a..3aff4c091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,9 @@ gridcraft-math = { path = "crates/math" } # ui-egui, craft-print in the app, craft-web-api and craft-web-host in the web app) comes from one # craft-libs revision. # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", rev = "119415f46f601e20b9bc6b1b4d6979ceda86d88e", version = "=0.1.0", features = ["egui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", version = "=0.1.0", features = ["egui"] } # Excel 97-2003 (.xls, BIFF8) workbooks; `crates/xlsx/src/xls.rs` maps them onto the model. -craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "119415f46f601e20b9bc6b1b4d6979ceda86d88e", version = "0.1.0" } +craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", version = "0.1.0" } # foundation thiserror = "2" @@ -75,7 +75,7 @@ skrifa = { version = "0.44", default-features = false, features = ["std"] } epaint_default_fonts = "0.37" # One native window per workbook: the window list, Window menu titles and the immediate-viewport # driver. Same craft-libs revision as craft-update above. -craft-window = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "119415f46f601e20b9bc6b1b4d6979ceda86d88e", default-features = false, features = ["egui"] } +craft-window = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "bb57d422d0bc842cbde430955825553ab7b976f4", default-features = false, features = ["egui"] } [workspace.lints.rust] unsafe_code = "forbid" diff --git a/crates/xlsx/src/xls.rs b/crates/xlsx/src/xls.rs index 5428e909e..205e806ff 100644 --- a/crates/xlsx/src/xls.rs +++ b/crates/xlsx/src/xls.rs @@ -68,10 +68,12 @@ fn warning(w: &x::Warning) -> String { W::DialogSheet => "Dialog sheets and unreadable sheets were skipped.".into(), W::MissingSharedString => "Some cells refer to missing shared strings and were left empty.".into(), W::DataTable => "What-if data tables are not supported; their values were kept.".into(), - W::Comments => "Cell comments in .xls files are not imported yet.".into(), - W::Drawings => "Pictures, charts and shapes in .xls files are not imported yet.".into(), - W::ConditionalFormatting => "Conditional formatting in .xls files is not imported yet.".into(), - W::DataValidation => "Data validation in .xls files is not imported yet.".into(), + W::DamagedObjects => "Some comments or drawing objects in .xls files could not be read and were skipped.".into(), + W::Charts => "Charts in .xls files are not imported yet.".into(), + W::PicturesSkipped => "Some pictures in .xls files were skipped.".into(), + W::ConditionalFormattingSkipped | W::ConditionalFormatting12 => "Some conditional formatting in .xls files was not imported.".into(), + W::DataValidationSkipped => "Some data validation in .xls files could not be read and was skipped.".into(), + W::DataValidationIgnored => "Some data validation records in .xls files were ignored, as Excel ignores them.".into(), W::Hyperlinks => "Hyperlinks in .xls files are not imported yet.".into(), W::PivotTables => "PivotTables in .xls files are not imported yet; their values were kept.".into(), W::CellsOutsideGrid(n) => format!("{n} cells outside the grid were skipped."),