summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-03-30 21:13:13 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-03-31 08:58:01 +0200
commit1fcc3d13d624b2a97f54063d7ffce13254b06373 (patch)
treed6c912a6b5e484b5c409d950263cacd014a96c0a /sd/qa/unit/import-tests.cxx
parent6034f0993111f7b6ee459eec5ad31d0c4ea78eec (diff)
sd: clean up not needed HAVE_FEATURE_PDFIUM ifdefs
Towards completely avoiding the HAVE_FEATURE_PDFIUM ifdef forest. Change-Id: I490c64a724729086d6156dc815f89d4e0d1ec709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113390 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r--sd/qa/unit/import-tests.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 1b36fc2ba866..22431385ea17 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -9,7 +9,6 @@
#include <sal/config.h>
-#include <config_features.h>
#include <config_poppler.h>
#include <memory>
#include <ostream>
@@ -96,6 +95,7 @@
#include <vcl/BitmapReadAccess.hxx>
#include <vcl/dibtools.hxx>
#include <svx/svdograf.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
using namespace ::com::sun::star;
@@ -154,9 +154,7 @@ public:
void testBnc862510_6();
void testBnc862510_7();
#if ENABLE_PDFIMPORT
-#if HAVE_FEATURE_PDFIUM
void testPDFImportShared();
-#endif
#if defined(IMPORT_PDF_ELEMENTS)
void testPDFImport();
void testPDFImportSkipImages();
@@ -273,9 +271,7 @@ public:
CPPUNIT_TEST(testBnc862510_6);
CPPUNIT_TEST(testBnc862510_7);
#if ENABLE_PDFIMPORT
-#if HAVE_FEATURE_PDFIUM
CPPUNIT_TEST(testPDFImportShared);
-#endif
#if defined(IMPORT_PDF_ELEMENTS)
CPPUNIT_TEST(testPDFImport);
CPPUNIT_TEST(testPDFImportSkipImages);
@@ -1398,9 +1394,14 @@ void SdImportTest::testBnc862510_7()
// import+break and then check the results. But that isn't straight-forward and
// currently await volunteering time to implement.
-#if HAVE_FEATURE_PDFIUM
void SdImportTest::testPDFImportShared()
{
+ auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPdfium)
+ {
+ return;
+ }
+
comphelper::LibreOfficeKit::setActive();
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pdf/multipage.pdf"), PDF);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
@@ -1459,7 +1460,6 @@ void SdImportTest::testPDFImportShared()
xDocShRef->DoClose();
comphelper::LibreOfficeKit::setActive(false);
}
-#endif
#if defined(IMPORT_PDF_ELEMENTS)