summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-12-06 13:42:27 +0530
committerDennis Francis <dennis.francis@collabora.com>2022-02-02 10:10:07 +0100
commit2c250e8f5007e756afb794944f0be791e2d535f4 (patch)
treeea3e41eeb2cb11a2386caded95021ccbcd469e41 /sc/source/ui
parent9903e1f4957cf14039f4a3cef096cf7a08aedcc0 (diff)
lokCalcRTL: shapes: do not send negative(X) invalidations
LOK client expects tile invalidations in positive document coordinates irrespective of RTL flags. For this introduce a flag mbNegativeX in svx class SdrMarkView to indicate the case when all x coordinates are negated (this happens only for the LOK + Calc + RTL mode). Use this flag to counter negate the x coordinates before sending invalidation rectangles. Conflicts: sc/source/ui/view/drawvie3.cxx Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951 (cherry picked from commit 5e37acbaaa0b0891829907331ecacd2d3b67526d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129195 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
-rw-r--r--sc/source/ui/view/drawvie3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
3 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 80ac5e29db7e..2525b360d1a3 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -578,7 +578,13 @@ void ScModelObj::setPart( int nPart, bool /*bAllowChangeFocus*/ )
ScTabView* pTabView = pViewData->GetView();
if (pTabView)
+ {
+ if (SdrView* pDrawView = pViewData->GetViewShell()->GetScDrawView())
+ pDrawView->SetNegativeX(comphelper::LibreOfficeKit::isActive() &&
+ pViewData->GetDocument().IsLayoutRTL(nPart));
+
pTabView->SelectTabPage(nPart + 1);
+ }
}
int ScModelObj::getParts()
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 88c74b442bfe..ce4d132b87e4 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -25,6 +25,7 @@
#include <svx/svdoole2.hxx>
#include <svx/ImageMapInfo.hxx>
#include <sfx2/viewfrm.hxx>
+#include <comphelper/lok.hxx>
#include <svtools/optionsdrawinglayer.hxx>
#include <strings.hrc>
@@ -49,6 +50,7 @@ ScDrawView::ScDrawView(
pDropMarkObj( nullptr ),
bInConstruct( true )
{
+ SetNegativeX(comphelper::LibreOfficeKit::isActive() && rDoc.IsLayoutRTL(nTab));
// #i73602# Use default from the configuration
SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_Calc());
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 5a21738bb9c3..42ce441e53d1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1609,6 +1609,8 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
new FmFormView(
*pModel,
&rDevice));
+
+ mpLOKDrawView->SetNegativeX(bLayoutRTL);
mpLOKDrawView->ShowSdrPage(mpLOKDrawView->GetModel()->GetPage(nTab));
aOutputData.SetDrawView(mpLOKDrawView.get());
aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get());