diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-14 15:39:07 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-14 15:39:07 +0200 |
commit | ad280b67f8fda8f832a6a83bc5665df448c6ad00 (patch) | |
tree | e029285dafeba4276bb66c224ecc734b54367a97 /desktop/qa | |
parent | dd1fc2242a64a0b9ae8031a5edc7ecfcde4ec3df (diff) |
LOK: include part numbers in CALLBACK_SEARCH_RESULT_SELECTION payload
Without that, the result in Calc/Impress is ambiguous.
Change-Id: I8dfd8dafc996102ed583688fddd721c7600dc48c
Diffstat (limited to 'desktop/qa')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 6302ac484a67..28948099b5e3 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -74,6 +74,7 @@ public: uno::Reference<lang::XComponent> mxComponent; OString m_aTextSelection; std::vector<OString> m_aSearchResultSelection; + std::vector<int> m_aSearchResultPart; }; LibLODocument_Impl* DesktopLOKTest::loadDoc(const char* pName, LibreOfficeKitDocumentType eType) @@ -131,7 +132,10 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload) 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()); + { + m_aSearchResultSelection.push_back(rValue.second.get<std::string>("rectangles").c_str()); + m_aSearchResultPart.push_back(std::atoi(rValue.second.get<std::string>("part").c_str())); + } } break; } @@ -269,6 +273,8 @@ void DesktopLOKTest::testSearchCalc() 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()); + // Result is on the first sheet. + CPPUNIT_ASSERT_EQUAL(0, m_aSearchResultPart[0]); closeDoc(); comphelper::LibreOfficeKit::setActive(false); |