Spreadsheet: Avoid using Value.to_string_without_side_effects()

We should use .to_string() and handle the possible exceptions.
This makes the displayed cell contents so much more informative than
'[object Object]' :^)
This commit is contained in:
Ali Mohammad Pur 2021-11-21 05:08:00 +03:30 committed by Ali Mohammad Pur
commit 5f1a34bba3
Notes: sideshowbarker 2024-07-17 22:53:49 +09:00
13 changed files with 72 additions and 53 deletions

View file

@ -74,12 +74,12 @@ const CellType& Cell::type() const
return *CellType::get_by_name("Identity");
}
String Cell::typed_display() const
JS::ThrowCompletionOr<String> Cell::typed_display() const
{
return type().display(const_cast<Cell&>(*this), m_type_metadata);
}
JS::Value Cell::typed_js_data() const
JS::ThrowCompletionOr<JS::Value> Cell::typed_js_data() const
{
return type().js_value(const_cast<Cell&>(*this), m_type_metadata);
}