summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-10-31 15:48:44 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2023-11-01 05:58:04 +0100
commit7a062cdd9b91c577b2296bfe1f81ea78e0b75168 (patch)
treea4400eb482c598cbbe7097615e3bd444f2405b0e
parenta1b3d8d6e90923f2cd03a556afd09edc2d084475 (diff)
tdf#100584, tdf#157784 - Arrange sheets depending on the RTL settings
The tab bar's position should be determined globally based on the RTL settings, rather than being individually set for each sheet. Change-Id: I0690b01c842d2da6d49b57d1adad0a8e0844087f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158730 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 4f1b3c16f5530a2a190cab07c07c7bf63acf42c7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158696 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--sc/source/ui/view/tabview.cxx3
-rw-r--r--svtools/source/control/tabbar.cxx4
2 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b6c7a2bd8e66..56776d2d9b49 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -280,7 +280,8 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner )
if (bHasHint)
RemoveHintWindow();
- bool bLayoutRTL = aViewData.GetDocument().IsLayoutRTL( aViewData.GetTabNo() );
+ // tdf#100584 - arrange sheets depending on the RTL settings
+ bool bLayoutRTL = AllSettings::GetLayoutRTL();
tools::Long nTotalWidth = rSize.Width();
if ( bLayoutRTL )
nTotalWidth += 2*rOffset.X();
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 1690269ba234..02a23b8aea33 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -715,9 +715,7 @@ void TabBar::ImplFormat()
const size_t nItemListSize = mpImpl->maItemList.size();
for (size_t nItemIndex = 0; nItemIndex < nItemListSize; nItemIndex++)
{
- // tdf#100584 - arrange sheets depending on the RTL settings
- auto& rItem = mbMirrored ? mpImpl->maItemList[nItemListSize - nItemIndex - 1]
- : mpImpl->maItemList[nItemIndex];
+ auto& rItem = mpImpl->maItemList[nItemIndex];
// At all non-visible tabs an empty rectangle is set
if ((nItemIndex + 1 < mnFirstPos) || (x > mnLastOffX))