vcl/source/app/salvtables.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit bb9a3f1cd2912b836deb9f73c2010bf03a1438c9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 5 12:19:30 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed May 5 15:58:30 2021 +0200 factor in treeview borders for get_height_rows as seen in tdf#142049 for format chart type where the scrollbar appears in gen when that's something it tries to avoid Change-Id: I494114078603797b0450363816823e5898a3ef01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115141 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e3541057da60..a74e14120058 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4739,7 +4739,13 @@ int SalInstanceTreeView::count_selected_rows() const { return m_xTreeView->GetSe int SalInstanceTreeView::get_height_rows(int nRows) const { - return m_xTreeView->GetEntryHeight() * nRows; + int nHeight = m_xTreeView->GetEntryHeight() * nRows; + + sal_Int32 nLeftBorder(0), nTopBorder(0), nRightBorder(0), nBottomBorder(0); + m_xTreeView->GetBorder(nLeftBorder, nTopBorder, nRightBorder, nBottomBorder); + nHeight += nTopBorder + nBottomBorder; + + return nHeight; } void SalInstanceTreeView::make_sorted() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits