summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-04-05 22:23:28 +0200
committerAron Budea <aron.budea@collabora.com>2018-04-20 11:25:01 +0200
commit19a2c9ca42bab45f1e4e258d1023b62557f8f1fe (patch)
treed99bfff7d826479dd3f6220601f2717c7cd9720e /comphelper
parent2e396d37d96e1bc535da75cfc5f2afeac6b68d25 (diff)
sw lok: View jumps to cursor position even if it is moved by an other view.
Scrolling is done twice. Once in SwCursorShell::UpdateCursor() by SCROLLWIN flag. Here we can check the actual viewid and avoid scrolling if the cursor is move by an other user. The second instance in the LO online code, for it we need to pass the viewid identifying the view which moved the cursor. Change-Id: I033274f88ce41acbb632e2aeb0d986ab11cd2d52 Reviewed-on: https://gerrit.libreoffice.org/52220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 83b7bfc0efefb3c77e5c59553320e98539250c62) sw lok: followup commit for change about scrolling to visible cursor Revert small part of this commit: 83b7bfc0efefb3c77e5c59553320e98539250c62 Thanks Jan Holesovsky to catching it. Change-Id: I885c9f3da622052685d1e46f6358783fc7f8cb9a Reviewed-on: https://gerrit.libreoffice.org/52684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 508013d799358bb1c92b5cfea5257fe53c695cee) Reviewed-on: https://gerrit.libreoffice.org/53178 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/lok.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 589f57b61bce..05a991dad074 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -29,6 +29,8 @@ static bool g_bTiledAnnotations(true);
static bool g_bRangeHeaders(false);
+static bool g_bViewIdForVisCursorInvalidation(false);
+
static bool g_bLocalRendering(false);
static LanguageTag g_aLanguageTag("en-US", true);
@@ -88,6 +90,16 @@ void setRangeHeaders(bool bRangeHeaders)
g_bRangeHeaders = bRangeHeaders;
}
+void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation)
+{
+ g_bViewIdForVisCursorInvalidation = bViewIdForVisCursorInvalidation;
+}
+
+bool isViewIdForVisCursorInvalidation()
+{
+ return g_bViewIdForVisCursorInvalidation;
+}
+
bool isRangeHeaders()
{
return g_bRangeHeaders;