diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2025-02-10 10:14:07 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2025-02-10 14:05:35 +0100 |
commit | b0b97184aa56fd507785045afb51d2b53419d023 (patch) | |
tree | 15f6aaba0da43058cc4dd847f569e7a8e8cca0d3 /vcl/source | |
parent | 59d34ccdbd27ddba09179c235ba89e542d818a41 (diff) |
vcl: Simplify and rename SvTabListBox::SetTabJustify
SvTabListBox::SetTabJustify only ever gets called
with SvTabJustify::AdjustCenter for param `eJustify`.
Drop the param and rename the method to
SvTabListBox::SetTabAlignCenter to simplify the code.
Drop now unused enum class SvTabJustify.
Change-Id: Ibaaafcbdc16551f7562987212b25a68552290c66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181337
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 5 | ||||
-rw-r--r-- | vcl/source/treelist/svtabbx.cxx | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 8eb8721cd910..d05c9419698a 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3969,10 +3969,7 @@ void SalInstanceTreeView::set_column_editables(const std::vector<bool>& rEditabl m_xTreeView->SetTabEditable(i, rEditables[i]); } -void SalInstanceTreeView::set_centered_column(int nCol) -{ - m_xTreeView->SetTabJustify(nCol, SvTabJustify::AdjustCenter); -} +void SalInstanceTreeView::set_centered_column(int nCol) { m_xTreeView->SetTabAlignCenter(nCol); } int SalInstanceTreeView::get_column_width(int nColumn) const { diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 54c83e79ea91..b2a1a4319891 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -506,7 +506,7 @@ SvTreeListEntry* SvTabListBox::GetChildOnPos( SvTreeListEntry* _pParent, sal_uIn return nullptr; } -void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify) +void SvTabListBox::SetTabAlignCenter(sal_uInt16 nTab) { DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab"); if( nTab >= mvTabList.size() ) @@ -515,7 +515,7 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify) SvLBoxTabFlags nFlags = rTab.nFlags; nFlags &= ~MYTABMASK; // see SvLBoxTab::CalcOffset for force, which only matters for centering - nFlags |= static_cast<SvLBoxTabFlags>(eJustify) | SvLBoxTabFlags::FORCE; + nFlags |= SvLBoxTabFlags::ADJUST_CENTER | SvLBoxTabFlags::FORCE; rTab.nFlags = nFlags; SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS; if( IsUpdateMode() ) |