vcl/source/control/tabctrl.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit bd5eedd14069fa859bad25d4e126c244074d5f94 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 10 20:37:41 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 11 12:38:34 2021 +0100 ImplGetTabRect(ImplTabItem*) variant always returns 0 with default args so TabControl::GetPageId(const Point& rPos) doesn't work since... commit 6540912ae1a570fd8c2318f77b757e07b87c0707 Date: Sun Jun 16 21:41:31 2019 +0000 VCL merge most of NotebookbarTabControlBase Change-Id: Ia99911e753dbe2bb22dc892c6bddc0392fab97a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 6579613dbd62..c4cb34ef5fae 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1787,9 +1787,10 @@ sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const sal_uInt16 TabControl::GetPageId( const Point& rPos ) const { + Size winSize = Control::GetOutputSizePixel(); const auto &rList = mpTabCtrlData->maItemList; - const auto it = std::find_if(rList.begin(), rList.end(), [&rPos, this](const auto &item) { - return const_cast<TabControl*>(this)->ImplGetTabRect(&item).IsInside(rPos); }); + const auto it = std::find_if(rList.begin(), rList.end(), [&rPos, &winSize, this](const auto &item) { + return const_cast<TabControl*>(this)->ImplGetTabRect(&item, winSize.Width(), winSize.Height()).IsInside(rPos); }); return (it != rList.end()) ? it->id() : 0; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits