diff options
Diffstat (limited to 'sd/qa/unit/tiledrendering/tiledrendering.cxx')
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 264f492f142f..5c88c537c586 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -62,6 +62,7 @@ public: void testSearchAll(); void testSearchAllSelections(); void testSearchAllNotifications(); + void testSearchAllFollowedBySearch(); #endif CPPUNIT_TEST_SUITE(SdTiledRenderingTest); @@ -77,6 +78,7 @@ public: CPPUNIT_TEST(testSearchAll); //CPPUNIT_TEST(testSearchAllSelections); CPPUNIT_TEST(testSearchAllNotifications); + CPPUNIT_TEST(testSearchAllFollowedBySearch); #endif CPPUNIT_TEST_SUITE_END(); @@ -481,6 +483,21 @@ void SdTiledRenderingTest::testSearchAllNotifications() comphelper::LibreOfficeKit::setActive(false); } +void SdTiledRenderingTest::testSearchAllFollowedBySearch() +{ + comphelper::LibreOfficeKit::setActive(); + SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp"); + pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this); + + lcl_search("third", /*bFindAll=*/true); + lcl_search("match", /*bFindAll=*/false); + + OString aUsedFormat; + // This used to give wrong result: 'search' after 'search all' still + // returned 'third' + CPPUNIT_ASSERT_EQUAL(OString("match"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat)); +} + #endif CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest); |