summaryrefslogtreecommitdiffstats
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-05 08:55:39 +0200
commit935563fddce9e0cb8a7fccc6f1901150dab31a00 (patch)
treee8f255b824bd3012bfa1dbb6632db8906b61c836
parentBump version to 6.4-43 (diff)
downloadcore-935563fddce9e0cb8a7fccc6f1901150dab31a00.tar.gz
core-935563fddce9e0cb8a7fccc6f1901150dab31a00.zip
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. 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>
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx7
2 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 61f7d472ecd6..738faec6175f 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1108,7 +1108,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
boost::property_tree::write_json(aStream, aTableJsonTree);
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, aStream.str().c_str());
}
- else
+ else if (!getSdrModelFromSdrView().IsWriter())
{
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, "{}");
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7d3b70dbf363..7a3c3ec421b8 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>
using namespace com::sun::star;
@@ -2033,10 +2034,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)
return;
+ SwWrtShell* pShell = &pView->GetWrtShell();
+
SwFrame* pCurrentFrame = GetCurrFrame();
SelectionType eType = pShell->GetSelectionType();