summaryrefslogtreecommitdiff
path: root/Applications/Spreadsheet/SpreadsheetWidget.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-10-06 15:02:05 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-06 15:28:39 +0200
commitf005548d560c1e628ae5d6dffb58adabba709f85 (patch)
treed753e7c36aa49c753ffc01dcd96ae721718e0708 /Applications/Spreadsheet/SpreadsheetWidget.cpp
parent30ca17e78f77a7a67029cb6981a761f68cdf1285 (diff)
downloadserenity-f005548d560c1e628ae5d6dffb58adabba709f85.zip
Spreadsheet: Use new format functions.
In a few places I also simplified a few format strings: -outln("{} item{}", items, items.size() == 1 ? ' ' : 's'); +outln("{} item(s)", items); In my opinion this is more readable and in some places it incorrectly wrote '0 item' which is "fixed" now. In other places the placeholder space looked weird.
Diffstat (limited to 'Applications/Spreadsheet/SpreadsheetWidget.cpp')
-rw-r--r--Applications/Spreadsheet/SpreadsheetWidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Applications/Spreadsheet/SpreadsheetWidget.cpp
index 1b5fec57fa..548be961d7 100644
--- a/Applications/Spreadsheet/SpreadsheetWidget.cpp
+++ b/Applications/Spreadsheet/SpreadsheetWidget.cpp
@@ -104,7 +104,7 @@ void SpreadsheetWidget::setup_tabs(NonnullRefPtrVector<Sheet> new_sheets)
auto& position = selection.first();
StringBuilder builder;
builder.append(position.column);
- builder.appendf("%zu", position.row);
+ builder.appendff("{}", position.row);
m_current_cell_label->set_enabled(true);
m_current_cell_label->set_text(builder.string_view());
@@ -121,7 +121,7 @@ void SpreadsheetWidget::setup_tabs(NonnullRefPtrVector<Sheet> new_sheets)
// There are many cells selected, change all of them.
StringBuilder builder;
- builder.appendf("<%zu>", selection.size());
+ builder.appendff("<{}>", selection.size());
m_current_cell_label->set_enabled(true);
m_current_cell_label->set_text(builder.string_view());
@@ -184,7 +184,7 @@ void SpreadsheetWidget::add_sheet()
{
StringBuilder name;
name.append("Sheet");
- name.appendf(" %d", m_workbook->sheets().size() + 1);
+ name.appendff(" {}", m_workbook->sheets().size() + 1);
auto& sheet = m_workbook->add_sheet(name.string_view());