summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx4
-rw-r--r--sw/source/core/crsr/crsrsh.cxx9
2 files changed, 10 insertions, 3 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 048ade6c634b..ada126f2723c 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1304,10 +1304,14 @@ void SwTiledRenderingTest::testCreateViewGraphicSelection()
// Make sure that the hidden text cursor isn't visible in the second view, either.
ViewCallback aView2;
aView2.m_bViewCursorVisible = true;
+ aView2.m_bGraphicViewSelection = false;
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2);
// This was true, the second view didn't get the visibility of the text
// cursor of the first view.
CPPUNIT_ASSERT(!aView2.m_bViewCursorVisible);
+ // This was false, the second view didn't get the graphic selection of the
+ // first view.
+ CPPUNIT_ASSERT(aView2.m_bGraphicViewSelection);
mxComponent->dispose();
mxComponent.clear();
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 72ed33c446d6..d88d21c52c02 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1224,12 +1224,15 @@ OUString SwCursorShell::getPageRectangles()
return OUString::fromUtf8(comphelper::string::join("; ", v).getStr());
}
-void SwCursorShell::NotifyCursor(SfxViewShell* pViewShell) const
+void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const
{
// Cursor position and visibility.
- m_pVisibleCursor->_SetPosAndShow(pViewShell);
+ m_pVisibleCursor->_SetPosAndShow(pOtherShell);
// Text selection.
- m_pCurrentCursor->Show(pViewShell);
+ m_pCurrentCursor->Show(pOtherShell);
+ // Graphic selection.
+ auto pView = const_cast<SdrView*>(GetDrawView());
+ pView->AdjustMarkHdl(pOtherShell);
}
/// go to the next SSelection