From f005548d560c1e628ae5d6dffb58adabba709f85 Mon Sep 17 00:00:00 2001 From: asynts Date: Tue, 6 Oct 2020 15:02:05 +0200 Subject: 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. --- Applications/Spreadsheet/SpreadsheetWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Applications/Spreadsheet/SpreadsheetWidget.cpp') 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 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 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()); -- cgit v1.2.3