1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00

Spreadsheet: Setup and prepare for cell types

This commit adds a generic interface for cell types and hooks it up.
There is no way to set these from the UI, and so they're not saved
anywhere yet.
Also implicitly converts numeric values (strictly integers) to numeric
javascript values, as numbery-looking + numbery-looking === string is
not very interesting. :^)
This commit is contained in:
AnotherTest 2020-08-28 17:55:06 +04:30 committed by Andreas Kling
parent 5715ed3dd6
commit 6614ee703b
13 changed files with 468 additions and 11 deletions

View file

@ -49,7 +49,7 @@ JS::Value SheetGlobalObject::get(const JS::PropertyName& name, JS::Value receive
if (auto pos = Sheet::parse_cell_name(name.as_string()); pos.has_value()) {
auto& cell = m_sheet.ensure(pos.value());
cell.reference_from(m_sheet.current_evaluated_cell());
return cell.js_data();
return cell.typed_js_data();
}
}