svx/source/svdraw/svdmrkv.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 935563fddce9e0cb8a7fccc6f1901150dab31a00 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Thu Jun 24 12:38:45 2021 +0530 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jul 5 08:55:39 2021 +0200 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits