summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-22 10:52:45 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-23 09:34:46 +0200
commit53c803cf560f9b6bd4f1d5c72241755688adbf03 (patch)
tree9e05ac0d260a56936d621fff184d501ff6b40db5 /sw/qa/extras
parent0c5d3abd55ce8385642065aa28ad5d56a9fb62dd (diff)
sw: move LOK_CALLBACK_VIEW_CURSOR_VISIBLE to SwCursorShell
That's where the non-view variant is emitted, and SwVisibleCursor said visibility=false even if the cursor was expected to be visible. Also fix the test callback that checked if the payload is equal to the "true" literal, but actually the payload was a JSON. (cherry picked from commit e387193eab0e4729d02b6ffd2c972c3d71942947) Conflicts: sw/source/core/crsr/crsrsh.cxx Change-Id: Ifa0e23eb274925e8ab8ef5e7c21370ad2cd22282
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index f6fb64fe6652..b61a11013d12 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -707,7 +707,10 @@ public:
break;
case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
{
- m_bViewCursorVisible = OString("true") == pPayload;
+ std::stringstream aStream(pPayload);
+ boost::property_tree::ptree aTree;
+ boost::property_tree::read_json(aStream, aTree);
+ m_bViewCursorVisible = aTree.get_child("visible").get_value<std::string>() == "true";
}
break;
case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
@@ -871,6 +874,8 @@ void SwTiledRenderingTest::testViewCursorVisibility()
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ViewCallback aView2;
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2);
+ // This failed, initially the view cursor in the second view wasn't visible.
+ CPPUNIT_ASSERT(aView2.m_bViewCursorVisible);
// Click on the shape in the second view.
aView1.m_bViewCursorVisible = true;
@@ -1374,6 +1379,7 @@ void SwTiledRenderingTest::testCreateViewGraphicSelection()
SdrView* pView = pWrtShell->GetDrawView();
aView1.m_bGraphicSelection = true;
pView->MarkObj(pObject, pView->GetSdrPageView());
+ pWrtShell->HideCursor();
CPPUNIT_ASSERT(aView1.m_bGraphicSelection);
// Create a second view.