mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:57:34 +00:00
Spreadsheet: Remove 'return (...)' workaround in conditional formatting
Now that LibJS can evaluate expressions correctly, that workaround was breaking conditional formatting.
This commit is contained in:
parent
16b4a78072
commit
0c9a505ad1
1 changed files with 1 additions and 6 deletions
|
@ -113,14 +113,9 @@ void Cell::update_data(Badge<Sheet>)
|
||||||
m_evaluated_formats.background_color.clear();
|
m_evaluated_formats.background_color.clear();
|
||||||
m_evaluated_formats.foreground_color.clear();
|
m_evaluated_formats.foreground_color.clear();
|
||||||
if (!m_js_exception) {
|
if (!m_js_exception) {
|
||||||
StringBuilder builder;
|
|
||||||
for (auto& fmt : m_conditional_formats) {
|
for (auto& fmt : m_conditional_formats) {
|
||||||
if (!fmt.condition.is_empty()) {
|
if (!fmt.condition.is_empty()) {
|
||||||
builder.clear();
|
auto [value, exception] = m_sheet->evaluate(fmt.condition, this);
|
||||||
builder.append("return (");
|
|
||||||
builder.append(fmt.condition);
|
|
||||||
builder.append(')');
|
|
||||||
auto [value, exception] = m_sheet->evaluate(builder.string_view(), this);
|
|
||||||
if (exception) {
|
if (exception) {
|
||||||
m_js_exception = move(exception);
|
m_js_exception = move(exception);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue