summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-15 16:30:53 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-15 18:12:36 +0200
commit4079daadf85a799e7a5bf386e03f55687aab1df9 (patch)
tree23e6268e6632dce2044529bc6b7df88bf9965e6a /chart2
parentb695169194c671464f0fab2bc6eb9af94ca68710 (diff)
Simplify vector initialization in chart2
Change-Id: I26dd2e0480bb60719f4f1b6dcc30cb28bb35ee09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123660 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
1 files changed, 2 insertions, 2 deletions
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();