diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-08-12 22:48:31 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-13 06:21:45 +0200 |
commit | adf65471e889676a600a9c6d0454c75cbd549ad3 (patch) | |
tree | 7f9a3e48345a737dbb5a81b2daf105c0e600255a /sw/qa/extras/indexing | |
parent | be710c72a6302829bf7f632c8ad6dc72be51fd95 (diff) |
indexing: allow for multiple entries in search indexing data
Change-Id: Idb9bbbaa940b7cd48423c6cc65b9c7d0b94f57dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120396
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/qa/extras/indexing')
-rw-r--r-- | sw/qa/extras/indexing/SearchResultLocatorTest.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/qa/extras/indexing/SearchResultLocatorTest.cxx b/sw/qa/extras/indexing/SearchResultLocatorTest.cxx index 99f33422a065..99ee267e4e02 100644 --- a/sw/qa/extras/indexing/SearchResultLocatorTest.cxx +++ b/sw/qa/extras/indexing/SearchResultLocatorTest.cxx @@ -56,11 +56,10 @@ void SearchResultLocatorTest::testSearchResultLocator() CPPUNIT_ASSERT(pDoc); sw::search::SearchResultLocator aLocator(pDoc); - sw::search::SearchIndexData aData; - aData.eType = sw::search::NodeType::WriterNode; - aData.nNodeIndex = 14; + std::vector<sw::search::SearchIndexData> aDataVector; + aDataVector.emplace_back(sw::search::NodeType::WriterNode, 14); - sw::search::LocationResult aResult = aLocator.find(aData); + sw::search::LocationResult aResult = aLocator.find(aDataVector); CPPUNIT_ASSERT_EQUAL(size_t(1), aResult.maRectangles.size()); // skip asserting exact values for macOS and Windows because of @@ -84,12 +83,10 @@ void SearchResultLocatorTest::testSearchResultLocatorForSdrObjects() CPPUNIT_ASSERT(pDoc); sw::search::SearchResultLocator aLocator(pDoc); - sw::search::SearchIndexData aData; - aData.eType = sw::search::NodeType::SdrObject; - aData.aObjectName = u"Circle"; - aData.nNodeIndex = 1; + std::vector<sw::search::SearchIndexData> aDataVector; + aDataVector.emplace_back(sw::search::NodeType::SdrObject, 1, u"Circle"); - sw::search::LocationResult aResult = aLocator.find(aData); + sw::search::LocationResult aResult = aLocator.find(aDataVector); CPPUNIT_ASSERT_EQUAL(size_t(1), aResult.maRectangles.size()); // skip asserting exact values for macOS and Windows because of |