diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-03 20:40:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-04 11:57:26 +0200 |
commit | 66a71a288bea335cd5737710ee2f7e36ebd934a4 (patch) | |
tree | 4aef38c78a7996a2b07f74fc159ca71336444f33 /sw | |
parent | 5493ddc18ffd256ae85ef6aa26649f177164ac7e (diff) |
tdf#131725 use first page directionality for x-reference dialog TreeView
Change-Id: Ib827f4e73266f6416ba8459214263545291c4727
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133779
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 5392df80463e..1fbd69c9f10e 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -22,6 +22,7 @@ #include <expfld.hxx> #include <swmodule.hxx> #include "fldref.hxx" +#include <frmatr.hxx> #include <reffld.hxx> #include <wrtsh.hxx> @@ -34,8 +35,10 @@ #include <osl/diagnose.h> #include <comphelper/string.hxx> +#include <editeng/frmdiritem.hxx> #include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> +#include <vcl/settings.hxx> #define REFFLDFLAG 0x4000 #define REFFLDFLAG_BOOKMARK 0x4800 @@ -197,6 +200,15 @@ void SwFieldRefPage::Reset(const SfxItemSet* ) if (!pSh) return; + // tdf#148432 in LTR UI override the navigator treeview direction based on + // the first page directionality + if (!AllSettings::GetLayoutRTL()) + { + const SwPageDesc& rDesc = pSh->GetPageDesc(0); + const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrameDir(); + m_xSelectionToolTipLB->set_direction(rFrameDir.GetValue() == SvxFrameDirection::Horizontal_RL_TB); + } + const size_t nFieldTypeCnt = pSh->GetFieldTypeCount(SwFieldIds::SetExp); OSL_ENSURE( nFieldTypeCnt < o3tl::make_unsigned(REFFLDFLAG), "<SwFieldRefPage::Reset> - Item index will overlap flags!" ); |