sw/source/uibase/utlui/content.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit 84ad4fe061ebfbbcdc0ffeec329e117250627157 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Apr 29 16:13:25 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Apr 30 11:50:14 2022 +0200 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 <caol...@redhat.com> 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)