summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2022-01-06 15:12:16 +0530
committerAndras Timar <andras.timar@collabora.com>2022-01-11 11:18:10 +0100
commitc2cbe0dbe4c9e4ce8014e881ba3663add77f7aca (patch)
treed960093ef2f674d4e15d3ac7c74e6a82ab0acc6b /sc
parent04bb404bffa9fe19568655e81bcd5db21f153cbc (diff)
lokCalcRTL: trim invalidation rect to ensure +ve X
Change-Id: Ifecb52167e3cddee036e1e1e9bd5782a1138b654
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index cb085fcc6e64..087f08271a5a 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1627,6 +1627,15 @@ void ScGridWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
pResultRectangle = &aRectangle;
}
+ // Trim invalidation rectangle overlapping negative X region in RTL mode.
+ if (pResultRectangle && pResultRectangle->Left() < 0
+ && mrViewData.GetDocument().IsLayoutRTL(mrViewData.GetTabNo()))
+ {
+ pResultRectangle->SetLeft(0);
+ if (pResultRectangle->Right() < 0)
+ pResultRectangle->SetRight(0);
+ }
+
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
SfxLokHelper::notifyInvalidation(pViewShell, pResultRectangle);
}