sc/source/ui/cctrl/checklistmenu.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 709111b40441294a0b48cb71feb7d6cf8b299656
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Wed Nov 24 17:44:30 2021 +0530
Commit:     Dennis Francis <dennis.fran...@collabora.com>
CommitDate: Mon Jan 31 06:52:43 2022 +0100

    lokCalcRTL: fix autofilter popup position
    
    Change-Id: Iecf41c286e28f849f77da47a0c5f73cbbc02986a
    (cherry picked from commit be329f241ee4953a039ab4bb22f46a5ac0ad5859)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128904
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 52f53a34838e..290a6468d1d2 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1414,8 +1414,17 @@ void ScCheckListMenuControl::launch(weld::Widget* 
pWidget, const tools::Rectangl
     if (maConfig.mbRTL)
     {
         // In RTL mode, the logical "left" is visual "right".
-        tools::Long nLeft = aRect.Left() - aRect.GetWidth();
-        aRect.SetLeft( nLeft );
+        if (!comphelper::LibreOfficeKit::isActive())
+        {
+            tools::Long nLeft = aRect.Left() - aRect.GetWidth();
+            aRect.SetLeft( nLeft );
+        }
+        else
+        {
+            // in LOK mode, rRect is in document pixel coordinates, so width 
has to be added
+            // to place the popup next to the (visual) left aligned button.
+            aRect.Move(aRect.GetWidth(), 0);
+        }
     }
     else if (mnWndWidth < aRect.GetWidth())
     {

Reply via email to