diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-03-13 19:03:48 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-03-14 09:36:32 +0000 |
commit | 986ab0b771e8e921d132059fda4971b18064c1aa (patch) | |
tree | 044cc7d4ab75abd857e7a970077a4397d791f028 /sd/qa | |
parent | 65dcd1d8195069c8c8acb3a188b8e5616c51029c (diff) |
sd lok: Don't search on master pages & notes in Impress.
Change-Id: I43ed9f53618dca09e0289bffadc2c05056e0eebb
Reviewed-on: https://gerrit.libreoffice.org/35149
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sd/qa')
-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 10fb24bfc3ad..58e146acdf60 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -72,6 +72,7 @@ public: void testSearchAllSelections(); void testSearchAllNotifications(); void testSearchAllFollowedBySearch(); + void testDontSearchInMasterPages(); void testInsertDeletePage(); void testInsertTable(); void testPartHash(); @@ -106,6 +107,7 @@ public: CPPUNIT_TEST(testSearchAllSelections); CPPUNIT_TEST(testSearchAllNotifications); CPPUNIT_TEST(testSearchAllFollowedBySearch); + CPPUNIT_TEST(testDontSearchInMasterPages); CPPUNIT_TEST(testInsertDeletePage); CPPUNIT_TEST(testInsertTable); CPPUNIT_TEST(testPartHash); @@ -624,6 +626,21 @@ void SdTiledRenderingTest::testSearchAllFollowedBySearch() CPPUNIT_ASSERT_EQUAL(OString("match"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat)); } +void SdTiledRenderingTest::testDontSearchInMasterPages() +{ + comphelper::LibreOfficeKit::setActive(); + SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp"); + sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); + pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this); + + // This should trigger the not-found callback ("date" is present only on + // the master page) + lcl_search("date"); + CPPUNIT_ASSERT_EQUAL(false, m_bFound); + + comphelper::LibreOfficeKit::setActive(false); +} + namespace { |