summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-24 17:44:30 +0530
committerAndras Timar <andras.timar@collabora.com>2022-01-11 11:18:08 +0100
commitbe329f241ee4953a039ab4bb22f46a5ac0ad5859 (patch)
treefba746890bc3e1057bc9d9dfc4c500e1e950a2af
parent2eb5f597c3b1c5a680d6e0f9d0719f9f6977e1a3 (diff)
lokCalcRTL: fix autofilter popup position
Change-Id: Iecf41c286e28f849f77da47a0c5f73cbbc02986a
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index efd8688dc649..c80c896f832f 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1381,8 +1381,17 @@ void ScCheckListMenuControl::launch(const tools::Rectangle& rRect)
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())
{