summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index bfcd000eba01..736952757ecb 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -142,4 +142,15 @@ void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rP
pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aPayload.getStr());
}
+void SfxLokHelper::notifyAllViewsHeaderInvalidation(const OString& rPayload)
+{
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+ while (pViewShell)
+ {
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_HEADER, rPayload.getStr());
+
+ pViewShell = SfxViewShell::GetNext(*pViewShell);
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */