diff options
author | Henry Castro <hcastro@collabora.com> | 2023-04-19 09:50:56 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-05-21 00:35:40 +0200 |
commit | b7ed0f2366f6ba09ab5c3f1af169020effe59a9e (patch) | |
tree | 85d14632c227a52ae0482c617a04c96a66e99e49 /editeng | |
parent | 1ede9695bbbddaaf1561364d7c2d2b5c30c207d3 (diff) |
lok: sc: fix layout RTL
The function "IsRightToLeft" fails in Hebrew language
when Calc has a layout RTL, add additional condition
to check the layout.
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: If3972b80770a7aa6073881487e411a34cc6871d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150758
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151973
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index c8d0b56a4245..b66c0629a689 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -524,7 +524,8 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, bool bStartHandleVisible = false; bool bEndHandleVisible = false; - bool bLOKCalcRTL = mpLOKSpecialPositioning && pEditEngine->IsRightToLeft(nStartPara); + bool bLOKCalcRTL = mpLOKSpecialPositioning && + (mpLOKSpecialPositioning->IsLayoutRTL() || pEditEngine->IsRightToLeft(nStartPara)); auto DrawHighlight = [&, nStartLine = sal_Int32(0), nEndLine = sal_Int32(0)]( const ImpEditEngine::LineAreaInfo& rInfo) mutable { @@ -1355,7 +1356,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) Point aRefPointLogical = GetOutputArea().TopLeft(); // Get the relative coordinates w.r.t refpoint in display hmm. aCursorRectPureLogical.Move(-aRefPointLogical.X(), -aRefPointLogical.Y()); - if (pEditEngine->IsRightToLeft(nPara)) + if (pEditEngine->IsRightToLeft(nPara) || mpLOKSpecialPositioning->IsLayoutRTL()) { tools::Long nMirrorW = GetOutputArea().GetWidth(); tools::Long nLeft = aCursorRectPureLogical.Left(), nRight = aCursorRectPureLogical.Right(); |