summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-04-05 22:23:28 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-04-07 08:05:04 +0200
commit83b7bfc0efefb3c77e5c59553320e98539250c62 (patch)
tree1d23842491eb9f7bd12d315fa83ec85a9bf1cfff /include
parent602774aef7d8b2f03914939dd230dd1c67d0093b (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>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h8
-rw-r--r--include/comphelper/lok.hxx6
-rw-r--r--include/sfx2/lokhelper.hxx2
3 files changed, 15 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 300d91e1c8c4..74d49fa15824 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -84,7 +84,13 @@ typedef enum
/**
* Enable range based header data
*/
- LOK_FEATURE_RANGE_HEADERS = (1ULL << 4)
+ LOK_FEATURE_RANGE_HEADERS = (1ULL << 4),
+
+ /**
+ * Request to have the active view's Id as the 1st value in the
+ * LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR payload.
+ */
+ LOK_FEATURE_VIEWID_IN_VISCURSOR_INVALIDATION_CALLBACK = (1ULL << 5)
}
LibreOfficeKitOptionalFeatures;
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index 9759bb524541..e0bd65690261 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -67,6 +67,12 @@ COMPHELPER_DLLPUBLIC void setRangeHeaders(bool bTiledAnnotations);
/// Check if range based header data is enabled
COMPHELPER_DLLPUBLIC bool isRangeHeaders();
+
+/// Check whether clients want viewId in visible cursor invalidation payload.
+COMPHELPER_DLLPUBLIC bool isViewIdForVisCursorInvalidation();
+/// Set whether clients want viewId in visible cursor invalidation payload.
+COMPHELPER_DLLPUBLIC void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation);
+
/// Update the current LOK's language.
COMPHELPER_DLLPUBLIC void setLanguageTag(const LanguageTag& languageTag);
/// Get the current LOK's language.
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index b2307eb428a6..08424a90f770 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -50,6 +50,8 @@ public:
const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>());
/// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload);
+ /// Emits a LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, but tweaks it according to setOptionalFeatures() if needed.
+ static void notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle);
/// Notifies all views with the given type and payload.
static void notifyAllViews(int nType, const OString& rPayload);
/// A special value to signify 'infinity'.