summaryrefslogtreecommitdiff
path: root/sw/source/ui/index/cnttab.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/index/cnttab.cxx')
-rw-r--r--sw/source/ui/index/cnttab.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index e58de4007613..dad3312e3d5a 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -502,8 +502,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(weld::Window* pParent,
m_xHeaderTree->enable_toggle_buttons(weld::ColumnToggleType::Radio);
m_xHeaderTree->connect_toggled(LINK(this, SwAddStylesDlg_Impl, RadioToggleOnHdl));
- std::vector<int> aWidths;
- aWidths.push_back(m_xHeaderTree->get_approximate_digit_width() * 30);
+ std::vector<int> aWidths
+ {
+ o3tl::narrowing<int>(m_xHeaderTree->get_approximate_digit_width() * 30)
+ };
int nPadding = m_xHeaderTree->get_approximate_digit_width() * 2;
OUString sTitle(m_xHeaderTree->get_column_title(1));
for (sal_uInt16 i = 0; i <= MAXLEVEL; ++i)
@@ -579,8 +581,7 @@ IMPL_LINK(SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size&, rSize, void)
{
auto nWidth = rSize.Width() - Application::GetSettings().GetStyleSettings().GetScrollBarSize();
- std::vector<int> aWidths;
- aWidths.push_back(0);
+ std::vector<int> aWidths { 0 };
int nPadding = m_xHeaderTree->get_approximate_digit_width() * 2;
for (sal_uInt16 i = 0; i <= MAXLEVEL; ++i)
{