[Libreoffice-commits] core.git: vcl/source

Thorsten Wagner thorsten.wagner.4 at gmail.com
Mon May 22 14:09:48 UTC 2017


 vcl/source/control/tabctrl.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit cd71e5b97fb8042df8770470ffa75fd5227ad5e6
Author: Thorsten Wagner <thorsten.wagner.4 at 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 <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at 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);
                 }
             }
 


More information about the Libreoffice-commits mailing list