diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/data/search-all.odp | bin | 10744 -> 10938 bytes | |||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/data/search-all.odp b/sd/qa/unit/tiledrendering/data/search-all.odp Binary files differindex cb3cb31cf5c7..0fd069ce6c0b 100644 --- a/sd/qa/unit/tiledrendering/data/search-all.odp +++ b/sd/qa/unit/tiledrendering/data/search-all.odp diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 586263e61471..0af3bf9a9594 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -421,12 +421,19 @@ void SdTiledRenderingTest::testSearch() void SdTiledRenderingTest::testSearchAll() { SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp"); + pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this); lcl_search("match", /*bFindAll=*/true); OString aUsedFormat; // This was empty: find-all did not highlight the first match. CPPUNIT_ASSERT_EQUAL(OString("match"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat)); + + // We're on the first slide, search for something on the second slide and make sure we get a SET_PART. + m_nPart = 0; + lcl_search("second", /*bFindAll=*/true); + // This was 0: no SET_PART was emitted. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), m_nPart); } #endif diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 581d9d28b639..ab7fc9c1c3e8 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -673,6 +673,14 @@ bool Outliner::SearchAndReplaceAll() } RestoreStartPosition (); + + if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && pViewShell->GetDoc()->isTiledRendering() && !bRet) + { + // Find-all, tiled rendering and we have at least one match. + OString aPayload = OString::number(mnStartPageIndex); + pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr()); + } + mnStartPageIndex = (sal_uInt16)-1; return bRet; |