svx/source/svdraw/svdmrkv.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 4eaf7e4bf2bd1b1b3d3e7b0c987c472cdd836dc6 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Thu Jun 24 12:38:45 2021 +0530 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jul 21 09:39:02 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. [tml: In this branch, this commit also includes a fix from Miklos.] Change-Id: Iff8181a7d43712e3c9a23cee43a8b6b98ba032d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119299 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 0d5b332592ad..d396b521f2c9 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1088,7 +1088,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S 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 58a57fcd1df9..e68c91710f43 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> @@ -2051,10 +2052,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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits