summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-06-24 12:38:45 +0530
committerMiklos Vajna <vmiklos@collabora.com>2021-07-19 12:33:47 +0200
commite180e8048c973ef63d2b9e9769168ee6e86929a4 (patch)
tree0fa582895f6e43a4c7393c3ee0a5e1535a3158d0 /sw
parent7ab86b835fbb244e50fc50d8bb4af08d58630fc0 (diff)
lok: fix incorrect multi-view table selection updates
Use the correct writer shell to fetch selected table info, else the active view's table selection data is sent to all views which is incorrect. Also avoid interference from draw empty table updates in SdrMarkView::SetMarkHandlesForLOKit() if we are in writer. [tml: In this branch, this commit also includes a fix from Miklos.] Change-Id: Iff8181a7d43712e3c9a23cee43a8b6b98ba032d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118000 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118941
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 861c1f4ea714..5b4971035c81 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -72,6 +72,7 @@
#include <tabcol.hxx>
#include <wrtsh.hxx>
#include <undobj.hxx>
+#include <view.hxx>
#include <boost/property_tree/json_parser.hpp>
#include <hints.hxx>
@@ -2044,10 +2045,12 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
void SwCursorShell::sendLOKCursorUpdates()
{
- SwWrtShell* pShell = GetDoc()->GetDocShell()->GetWrtShell();
- if (!pShell)
+ SwView* pView = static_cast<SwView*>(GetSfxViewShell());
+ if (!pView || !pView->GetWrtShellPtr())
return;
+ SwWrtShell* pShell = &pView->GetWrtShell();
+
SwFrame* pCurrentFrame = GetCurrFrame();
SelectionType eType = pShell->GetSelectionType();