summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIssa Alkurtass <ialkurtass@kacst.edu.sa>2012-12-17 13:06:24 +0300
committerEike Rathke <erack@redhat.com>2012-12-20 16:21:14 +0100
commit85796e4759e67e8bcdd6b6c47206bbb7df2c546c (patch)
tree8096c0a3946b4326f5ef7ee6fd2cd47b430147ea
parentffb34388060090f3f627d74b903499aa80c6de1e (diff)
fdo#56970 Fixed insert new sheet button for different directionality
Fixed position of insert new sheet button (+) when using a sheet with a different directionality than that of the interface. Change-Id: Ifc7020c4eb7a1686c23b4d827c47494b88a236b5 Reviewed-on: https://gerrit.libreoffice.org/1385 Tested-by: Lior Kaplan <kaplanlior@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 53f23ca68dda1011f97bb28d672c7198e9e12c90) Signed-off-by: Eike Rathke <erack@redhat.com>
-rw-r--r--svtools/source/control/tabbar.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index a922241b2b44..3cbb2b6d6ab1 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1765,8 +1765,12 @@ Rectangle TabBar::ImplGetInsertTabRect(ImplTabBarItem* pItem) const
if (mbHasInsertTab && pItem)
{
Rectangle aInsTabRect = pItem->maRect;
- aInsTabRect.setX(
- aInsTabRect.getX() + aInsTabRect.getWidth() - TABBAR_OFFSET_X - TABBAR_OFFSET_X2);
+ if ( !mbMirrored )
+ aInsTabRect.setX(
+ aInsTabRect.getX() + aInsTabRect.getWidth() - TABBAR_OFFSET_X - TABBAR_OFFSET_X2);
+ else
+ aInsTabRect.setX(
+ aInsTabRect.getX() - 3*TABBAR_OFFSET_X - TABBAR_OFFSET_X2);
aInsTabRect.setWidth(32);
return aInsTabRect;
}