summaryrefslogtreecommitdiff
path: root/sc/source/ui/namedlg
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-16 10:16:37 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-16 19:05:05 +0200
commitf6a5efc7cde6e7d723e05b866bc6de1bb56913b0 (patch)
tree7224b816983b0cbbe758dd3b0b466ef6923986b7 /sc/source/ui/namedlg
parent62078c534f96e859d4e8c0ead6337a876344e4ab (diff)
Simplify vector initialization in sc
Change-Id: If5b7632cfbc81f89d68ce8fbce1fac265e8354fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123692 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/ui/namedlg')
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 0309931b7cf3..a48352a26083 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -11,6 +11,7 @@
#include <memory>
#include <global.hxx>
#include <globstr.hrc>
+#include <o3tl/safeint.hxx>
#include <scresid.hxx>
#include <globalnames.hxx>
#include <namemgrtable.hxx>
@@ -63,9 +64,8 @@ ScRangeManagerTable::ScRangeManagerTable(
, mbNeedUpdate(true)
{
auto nColWidth = m_xTreeView->get_size_request().Width() / 7;
- std::vector<int> aWidths;
- aWidths.push_back(nColWidth * 2);
- aWidths.push_back(nColWidth * 3);
+ std::vector<int> aWidths{ o3tl::narrowing<int>(nColWidth * 2),
+ o3tl::narrowing<int>(nColWidth * 3) };
m_xTreeView->set_column_fixed_widths(aWidths);
Init();