path: root/sw/source/uibase/uiview/viewdraw.cxx
diff options
authorMiklos Vajna <>2016-07-22 16:39:47 +0200
committerMiklos Vajna <>2016-07-22 15:13:07 +0000
commit897189cfc6b3f6f3a9a0148b060ea25e5f8d9eaa (patch)
treed0323d739785025c1ac3296a2212c350159ce7c9 /sw/source/uibase/uiview/viewdraw.cxx
parent4da8378302093dd3e3dc3e201ac5e188c55f8009 (diff)
sw: add new LOK_CALLBACK_VIEW_LOCK callback
When we're after SdrBeginTextEdit(), but before SdrEndTextEdit(), and have multiple views, then only the active view paints the edited text, the other views look like the shape has no text at all. Add a new callback that exposes the position and size of the rectangle where the shape text will be painted after text edit ended, so clients can draw some kind of locking indicator there. This way the rendered result can differ in the "shape has no text" and the "shape text is edited in an other view" cases. Change-Id: I6096479a8a05c2547d15222e6d997b848af02945 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins <>
Diffstat (limited to 'sw/source/uibase/uiview/viewdraw.cxx')
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index d5dcb932337e..011afcb3299c 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -68,6 +68,9 @@
#include <svx/svdpagv.hxx>
#include <svx/extrusionbar.hxx>
#include <vcl/svapp.hxx>
+#include <comphelper/lok.hxx>
+#include <sfx2/lokhelper.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace ::com::sun::star;
@@ -573,6 +576,12 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
if (pView)
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ OString sRect = pView->GetOutputArea().toString();
+ SfxLokHelper::notifyOtherViews(this, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRect);
+ }