diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-08 11:49:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-08 11:49:13 +0200 |
commit | a42f582e0e8ee4118415632795184620c6b8058c (patch) | |
tree | 5cc105f23c42ae55c6ef6212b40b49eeb9744df0 /desktop | |
parent | 06d253ef3a3339300eff4fd38db728301516bf4d (diff) |
sc tiled rendering: implement LOK_CALLBACK_SEARCH_RESULT_SELECTION
Change-Id: Iaca2c1807a6e92cf7a87b0843000d65aea45fe7b
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 3e00e597c314..e77bc8984bbf 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -73,6 +73,7 @@ public: uno::Reference<lang::XComponent> mxComponent; OString m_aTextSelection; + std::vector<OString> m_aSearchResultSelection; }; LibLODocument_Impl* DesktopLOKTest::loadDoc(const char* pName, LibreOfficeKitDocumentType eType) @@ -123,6 +124,16 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload) m_aTextSelection = pPayload; } break; + case LOK_CALLBACK_SEARCH_RESULT_SELECTION: + { + m_aSearchResultSelection.clear(); + boost::property_tree::ptree aTree; + std::stringstream aStream(pPayload); + boost::property_tree::read_json(aStream, aTree); + for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("searchResultSelection")) + m_aSearchResultSelection.push_back(rValue.second.data().c_str()); + } + break; } } @@ -256,6 +267,8 @@ void DesktopLOKTest::testSearchCalc() } while (nIndex >= 0); // This was 1, find-all only found one match. CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), aSelections.size()); + // Make sure that we get exactly as many rectangle lists as matches. + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), m_aSearchResultSelection.size()); closeDoc(); comphelper::LibreOfficeKit::setActive(false); |