mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
Spreadsheet: Add (limited) support for custom cell formatting
This commit is contained in:
parent
e75247a75b
commit
054638c355
10 changed files with 466 additions and 4 deletions
|
@ -60,12 +60,16 @@ void Cell::set_data(JS::Value new_data)
|
|||
evaluated_data = move(new_data);
|
||||
}
|
||||
|
||||
void Cell::set_type(const CellType* type)
|
||||
{
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
void Cell::set_type(const StringView& name)
|
||||
{
|
||||
auto* cell_type = CellType::get_by_name(name);
|
||||
if (cell_type) {
|
||||
m_type = cell_type;
|
||||
return;
|
||||
return set_type(cell_type);
|
||||
}
|
||||
|
||||
ASSERT_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue