diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-03 12:31:34 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-07-31 09:24:08 +0200 |
commit | 656c79d0dcc790434308ce519fbdefa269be1996 (patch) | |
tree | f06d86fb60dd5a7c4a6f6029684b27689983ca7f /sd | |
parent | 19d40825b71ac57c60e8c0537b1e6f6487586a02 (diff) |
sd: disable LOKitSearchTest that test PDF search if no PDFium
enclose the tests with HAVE_FEATURE_PDFIUM
Change-Id: I1ce97fe090cef2cc2ab2f25fd1d2698bcaf28222
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95463
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 25da71b489228b866f20d8ea6d1926128168d1fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95949
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 3e20ddab50de57f8a4f915791bbb56710c4936e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99818
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/tiledrendering/LOKitSearchTest.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx index 5b079144f21c..ea5ff5a0104f 100644 --- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx +++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx @@ -8,6 +8,8 @@ */ #include "../sdmodeltestbase.hxx" +#include <config_features.h> + #include "CallbackRecorder.hxx" #include <test/bootstrapfixture.hxx> @@ -142,6 +144,7 @@ void lcl_search(const OUString& rKey, bool bFindAll = false, bool bBackwards = f Scheduler::ProcessEventsToIdle(); } +#if HAVE_FEATURE_PDFIUM SdrObject* lclGetSelectedObject(sd::ViewShell* pViewShell) { SdrView* pSdrView = pViewShell->GetView(); @@ -150,6 +153,7 @@ SdrObject* lclGetSelectedObject(sd::ViewShell* pViewShell) SdrObject* pObject = rMarkList.GetMark(0)->GetMarkedSdrObj(); return pObject; } +#endif } // end anonymous namespace @@ -264,6 +268,7 @@ void LOKitSearchTest::testDontSearchInMasterPages() void LOKitSearchTest::testSearchInPDFNonExisting() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("PDFSearch.pdf"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -287,10 +292,12 @@ void LOKitSearchTest::testSearchInPDFNonExisting() lcl_search("NonExisting"); CPPUNIT_ASSERT_EQUAL(false, mpCallbackRecorder->m_bFound); +#endif } void LOKitSearchTest::testSearchInPDF() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("PDFSearch.pdf"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -334,10 +341,12 @@ void LOKitSearchTest::testSearchInPDF() mpCallbackRecorder->m_aSearchResultSelection[0]); CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(3763, 1331), Size(1433, 484)), mpCallbackRecorder->m_aSelection[0]); +#endif } void LOKitSearchTest::testSearchInPDFInMultiplePages() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("PDFSearch.pdf"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -424,10 +433,12 @@ void LOKitSearchTest::testSearchInPDFInMultiplePages() CPPUNIT_ASSERT_EQUAL(0, mpCallbackRecorder->m_aSearchResultPart[0]); CPPUNIT_ASSERT_EQUAL(OString("9463, 3382, 1099, 499"), mpCallbackRecorder->m_aSearchResultSelection[0]); +#endif } void LOKitSearchTest::testSearchInPDFInMultiplePagesBackwards() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("PDFSearch.pdf"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -522,12 +533,14 @@ void LOKitSearchTest::testSearchInPDFInMultiplePagesBackwards() CPPUNIT_ASSERT_EQUAL(0, mpCallbackRecorder->m_aSearchResultPart[0]); CPPUNIT_ASSERT_EQUAL(OString("5592, 5038, 1100, 499"), mpCallbackRecorder->m_aSearchResultSelection[0]); +#endif } // Test searching in document with mixed objects. // We have 2 objects: 1. Text Object, 2. Graphic Object with PDF void LOKitSearchTest::testSearchIn2MixedObjects() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("MixedTest1.odg"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -608,11 +621,13 @@ void LOKitSearchTest::testSearchIn2MixedObjects() CPPUNIT_ASSERT_EQUAL(OString("3546, 3174, 738, 402"), mpCallbackRecorder->m_aSearchResultSelection[0]); +#endif } // Test searching in document with mixed objects. We have 6 objects. void LOKitSearchTest::testSearchIn6MixedObjects() { +#if HAVE_FEATURE_PDFIUM SdXImpressDocument* pXImpressDocument = createDoc("MixedTest2.odg"); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); CPPUNIT_ASSERT(pViewShell); @@ -772,6 +787,7 @@ void LOKitSearchTest::testSearchIn6MixedObjects() CPPUNIT_ASSERT_EQUAL(size_t(1), mpCallbackRecorder->m_aSearchResultSelection.size()); CPPUNIT_ASSERT_EQUAL(size_t(1), mpCallbackRecorder->m_aSearchResultPart.size()); CPPUNIT_ASSERT_EQUAL(pPage->GetObj(0), lclGetSelectedObject(pViewShell)); +#endif } CPPUNIT_TEST_SUITE_REGISTRATION(LOKitSearchTest); |