vcl/source/control/tabctrl.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit cd71e5b97fb8042df8770470ffa75fd5227ad5e6 Author: Thorsten Wagner <thorsten.wagne...@gmail.com> Date: Mon May 1 16:36:27 2017 +0200 tdf#103896: Fix wrong leading and trailing tabs within dialogs on macOS Change-Id: Ia18b530f3cfd48273ae00471e23131cae0df9eda Reviewed-on: https://gerrit.libreoffice.org/37123 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index f571ea20be0f..a20282e153f0 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1185,13 +1185,13 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect if (bDrawTabsRTL) { pFirstTab = mpTabCtrlData->maItemList.data(); - pLastTab = pFirstTab + mpTabCtrlData->maItemList.size(); + pLastTab = pFirstTab + mpTabCtrlData->maItemList.size() - 1; idx = mpTabCtrlData->maItemList.size() - 1; } else { pLastTab = mpTabCtrlData->maItemList.data(); - pFirstTab = pLastTab + mpTabCtrlData->maItemList.size(); + pFirstTab = pLastTab + mpTabCtrlData->maItemList.size() - 1; idx = 0; } @@ -1207,8 +1207,8 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect aClipRgn.Intersect(rRect); if (!aClipRgn.IsEmpty()) { - ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/, - pItem == pFirstTab); + ImplDrawItem(rRenderContext, pItem, aCurRect, + pItem == pFirstTab, pItem == pLastTab); } } @@ -2693,13 +2693,13 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co if (bDrawTabsRTL) { pFirstTab = mpTabCtrlData->maItemList.data(); - pLastTab = pFirstTab + mpTabCtrlData->maItemList.size(); + pLastTab = pFirstTab + mpTabCtrlData->maItemList.size() - 1; idx = mpTabCtrlData->maItemList.size() - 1; } else { pLastTab = mpTabCtrlData->maItemList.data(); - pFirstTab = pLastTab + mpTabCtrlData->maItemList.size(); + pFirstTab = pLastTab + mpTabCtrlData->maItemList.size() - 1; idx = 0; } @@ -2715,8 +2715,8 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co aClipRgn.Intersect(rRect); if (!aClipRgn.IsEmpty()) { - ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/, - pItem == pFirstTab); + ImplDrawItem(rRenderContext, pItem, aCurRect, + pItem == pFirstTab, pItem == pLastTab); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits