[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - sd/qa vcl/qa

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 06:11:48 UTC 2020


 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx |   16 ++++++++++++++++
 vcl/qa/cppunit/VectorGraphicSearchTest.cxx    |    6 ++++++
 2 files changed, 22 insertions(+)

New commits:
commit 3e20ddab50de57f8a4f915791bbb56710c4936e3
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 12:31:34 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Jun 10 08:11:29 2020 +0200

    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 at gmail.com>
    (cherry picked from commit 25da71b489228b866f20d8ea6d1926128168d1fa)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95949
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
index 8c2a41eeca9e..91b5ecbc8473 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>
@@ -140,6 +142,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();
@@ -148,6 +151,7 @@ SdrObject* lclGetSelectedObject(sd::ViewShell* pViewShell)
     SdrObject* pObject = rMarkList.GetMark(0)->GetMarkedSdrObj();
     return pObject;
 }
+#endif
 
 } // end anonymous namespace
 
@@ -262,6 +266,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);
@@ -285,10 +290,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);
@@ -332,10 +339,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);
@@ -422,10 +431,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);
@@ -520,12 +531,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);
@@ -606,11 +619,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);
@@ -770,6 +785,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);
commit e3d0dd8172d3e5214a7d996b8b7888cb2dfcc185
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Jun 3 12:23:57 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Jun 10 08:11:14 2020 +0200

    vcl: disable VectorGraphicSearchTest if we don't have PDFium
    
    enclose with HAVE_FEATURE_PDFIUM
    
    Change-Id: I46f8d6b19c46dbdf313b6192dddf85741ceb301f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95462
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit e848e95faa5cea1f258c9f97d99ffc91614e5a3b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95948
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
index 8dbdcac0e2e1..00febce16e71 100644
--- a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
+++ b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
@@ -7,6 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <config_features.h>
+
+#if HAVE_FEATURE_PDFIUM
+
 #include <cppunit/TestAssert.h>
 #include <cppunit/extensions/HelperMacros.h>
 
@@ -195,4 +199,6 @@ void VectorGraphicSearchTest::testSearchStringChange()
 
 CPPUNIT_TEST_SUITE_REGISTRATION(VectorGraphicSearchTest);
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list