chart2/source/controller/dialogs/tp_DataSource.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 4079daadf85a799e7a5bf386e03f55687aab1df9 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 15 16:30:53 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Oct 15 18:12:36 2021 +0200 Simplify vector initialization in chart2 Change-Id: I26dd2e0480bb60719f4f1b6dcc30cb28bb35ee09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123660 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 8586bd7260c7..2694d9ca28a6 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -26,6 +26,7 @@ #include <ControllerLockGuard.hxx> #include <DataSourceHelper.hxx> #include "DialogModel.hxx" +#include <o3tl/safeint.hxx> #include <TabPageNotifiable.hxx> #include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/chart2/XDataSeries.hpp> @@ -214,8 +215,7 @@ DataSourceTabPage::DataSourceTabPage(weld::Container* pPage, weld::DialogControl m_xEDT_CATEGORIES->connect_changed(LINK( this, DataSourceTabPage, RangeModifiedHdl)); // init controls - std::vector<int> aWidths; - aWidths.push_back(m_xLB_ROLE->get_approximate_digit_width() * 20); + std::vector<int> aWidths { o3tl::narrowing<int>(m_xLB_ROLE->get_approximate_digit_width() * 20) }; m_xLB_ROLE->set_column_fixed_widths(aWidths); m_xLB_ROLE->show();