summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-29 16:13:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-30 11:50:14 +0200
commit84ad4fe061ebfbbcdc0ffeec329e117250627157 (patch)
treedb75af2e91c949892e4e7770b0a874c03ff802a1 /sw
parent1f81dd9b05c4eaa3e4caae8fe38ef2ee7eb1db49 (diff)
tdf#148432 in LTR UI override the navigator treeview direction for RTL doc
based on the first page directionality Change-Id: Ifa1a67dd0db53afb125bcea29df83e776f9e65d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133646 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/content.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 3cb1fd4aede2..12f5d9e9f121 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -18,6 +18,7 @@
*/
#include <comphelper/string.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svl/urlbmk.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
@@ -43,6 +44,7 @@
#include <docsh.hxx>
#include <drawdoc.hxx>
#include <content.hxx>
+#include <frmatr.hxx>
#include <frmfmt.hxx>
#include <fldbas.hxx>
#include <IMark.hxx>
@@ -2972,6 +2974,16 @@ void SwContentTree::SetActiveShell(SwWrtShell* pSh)
m_eState = State::ACTIVE;
bClear = true;
}
+
+ // tdf#148432 in LTR UI override the navigator treeview direction based on
+ // the first page directionality
+ if (m_pActiveShell && !AllSettings::GetLayoutRTL())
+ {
+ const SwPageDesc& rDesc = m_pActiveShell->GetPageDesc(0);
+ const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrameDir();
+ m_xTreeView->set_direction(rFrameDir.GetValue() == SvxFrameDirection::Horizontal_RL_TB);
+ }
+
// Only if it is the active view, the array will be deleted and
// the screen filled new.
if (State::ACTIVE == m_eState && bClear)