summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-04-19 22:37:13 +0200
committerJan Holesovsky <kendy@collabora.com>2017-04-21 15:42:57 +0200
commit8b929a7124ae42d019ea902a4a54f9911f0b2867 (patch)
tree92e5f835c46901ab0382a2c91691ff95d339e717 /include
parent14b9d20090b9ecb75c13d1f5667b14df652cf027 (diff)
LOK - Calc: header, cursor and selection misplaced by other view actions
The row header, the cell cursor and the currect cell selection become misplaced when another user inserts, deletes or resizes a row. The same is true for columns. This patch provides to invalidate cached position values in all views when one of the listed action is performed in any view. It also introduce 2 new LOK callbacks for informing the client that the row/col header is no more valid and needs to be updated. Finally, when a new row/col is inserted or removed in one view, the cell cursor position and the current selection (if any) in other views may need to be shifted lower by one row/col. Change-Id: I7002a9adf971929b3e38ff58fa0429e792a1e7c4 Reviewed-on: https://gerrit.libreoffice.org/36716 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h10
-rw-r--r--include/sfx2/lokhelper.hxx3
2 files changed, 11 insertions, 2 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 8a59b4cc8ad1..dffc728eb641 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -492,7 +492,15 @@ typedef enum
* - 'action' can be 'Add', 'Remove' or 'Modify' depending on whether
* comment has been added, removed or modified.
*/
- LOK_CALLBACK_COMMENT = 32
+ LOK_CALLBACK_COMMENT = 32,
+
+ /**
+ * The column/row header is no more valid because of a column/row insertion
+ * or a similar event. Clients must query a new column/row header set.
+ *
+ * The payload says if we are invalidating a row or column header.
+ */
+ LOK_CALLBACK_INVALIDATE_HEADER = 33
}
LibreOfficeKitCallbackType;
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index a6de41cb880d..4f7b45065fd5 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -42,7 +42,8 @@ public:
static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload);
/// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
static void notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload);
-
+ /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views.
+ static void notifyAllViewsHeaderInvalidation(const OString& rPayload);
/// A special value to signify 'infinity'.
/// This value is chosen such that sal_Int32 will not overflow when manipulated.
static const long MaxTwips = 1e9;