mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
Integration: #2033 drop the dated history from the auto-fit comments
This commit is contained in:
@@ -457,9 +457,7 @@ fn same_content(a: Option<&gridcraft_model::Cell>, b: Option<&gridcraft_model::C
|
||||
/// Rows with a user-set height keep it.
|
||||
///
|
||||
/// Line breaks in a cell's text count only when the cell wraps, as in Excel: with Wrap Text off
|
||||
/// a multi-line value shows on one line and AutoFit gives a one-line row. (Until 2026-10-15 a
|
||||
/// line break grew the row whether or not the cell wrapped, so a sheet whose notes column held
|
||||
/// pasted multi-line text had tall rows with nothing visibly tall in them.)
|
||||
/// a multi-line value shows on one line and AutoFit gives a one-line row.
|
||||
pub fn auto_row_height(wb: &mut Workbook, si: usize, row: u32) {
|
||||
let Some(sh) = wb.sheet(si) else { return };
|
||||
if sh.rows.get(&row).is_some_and(|i| i.custom) {
|
||||
|
||||
@@ -1122,9 +1122,7 @@ fn open_grows_default_height_rows_to_their_font() {
|
||||
#[test]
|
||||
fn line_breaks_grow_a_row_only_when_the_cell_wraps() {
|
||||
// Excel: a cell holding "a\nb" with Wrap Text off displays on one line and AutoFit gives a
|
||||
// one-line row; with Wrap Text on it gets one line per break. Until 2026-10-15 the break grew
|
||||
// the row either way, so a file whose notes column held pasted multi-line text (wrap off, as
|
||||
// generating libraries write it) opened with tall rows and nothing visibly tall in them.
|
||||
// one-line row; with Wrap Text on it gets one line per break.
|
||||
// Typing a break (Alt+Enter) turns wrap on, as in Excel, so the unwrapped case comes from a
|
||||
// file, built with the model API and exported without row heights.
|
||||
let text = "first line\n\n\nfourth line";
|
||||
|
||||
Reference in New Issue
Block a user