diff options
-rw-r--r-- | sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 56f087a1c84e..c72a961e83d6 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -1210,6 +1210,7 @@ void SwTiledRenderingTest::testShapeTextUndoGroupShells() ViewCallback aView2; aView2.m_aViewCursor = Rectangle(); aView2.m_bViewSelectionSet = false; + aView2.m_bViewLock = false; SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2); // Difference was 935 twips, the new view didn't see the editeng cursor of // the old one. The new difference should be <1px, but here we deal with twips. @@ -1217,6 +1218,9 @@ void SwTiledRenderingTest::testShapeTextUndoGroupShells() // This was false, editeng text selection of the first view wasn't noticed // by the second view. CPPUNIT_ASSERT(aView2.m_bViewSelectionSet); + // This was false, the new view wasn't aware of the shape text lock created + // by the old view. + CPPUNIT_ASSERT(aView2.m_bViewLock); mxComponent->dispose(); mxComponent.clear(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 3a9ebe96ecf8..99f75a4058c3 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1237,6 +1237,13 @@ void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const rEditView.RegisterOtherShell(nullptr); // Text selection, if any. rEditView.DrawSelection(pOtherShell); + + // Shape text lock. + if (OutlinerView* pOutlinerView = pView->GetTextEditOutlinerView()) + { + OString sRect = pOutlinerView->GetOutputArea().toString(); + SfxLokHelper::notifyOtherView(GetSfxViewShell(), pOtherShell, LOK_CALLBACK_VIEW_LOCK, "rectangle", sRect); + } } else { |