summaryrefslogtreecommitdiff
path: root/sdext/source
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-03-06 22:06:35 -0500
committerAndras Timar <andras.timar@collabora.com>2019-06-15 11:01:56 +0200
commit296389eab0263e88a311856c10813cd2bec54d1d (patch)
tree8008966358a673b9d243099f224c215b1a3feaa1 /sdext/source
parent6af55390f1ef542e408e32e9c273075a2671b81b (diff)
build: support disabling poppler
This adds --enable-poppler configure option. Poppler can be enabled/disabled by setting this parameter to yes or no. Change-Id: I42ba2d27de7b5014d28523394310616d20073b71 Reviewed-on: https://gerrit.libreoffice.org/68602 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sdext/source')
-rw-r--r--sdext/source/pdfimport/test/tests.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index 48e262ec2280..1f730887b3bf 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <zlib.h>
#include "outputwrap.hxx"
@@ -452,6 +453,7 @@ namespace
public:
void testXPDFParser()
{
+#if HAVE_FEATURE_POPPLER
std::shared_ptr<TestSink> pSink( new TestSink() );
CPPUNIT_ASSERT(
pdfi::xpdf_ImportFromFile(
@@ -461,10 +463,12 @@ namespace
OUString(),
getComponentContext(), "" ) );
pSink->check();
+#endif
}
void testOdfDrawExport()
{
+#if HAVE_FEATURE_POPPLER
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
xAdaptor->setTreeVisitorFactory( createDrawTreeVisitorFactory() );
@@ -476,10 +480,12 @@ namespace
new OutputWrap(tempFileURL),
nullptr ));
osl::File::remove( tempFileURL );
+#endif
}
void testOdfWriterExport()
{
+#if HAVE_FEATURE_POPPLER
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
xAdaptor->setTreeVisitorFactory( createWriterTreeVisitorFactory() );
@@ -491,10 +497,12 @@ namespace
new OutputWrap(tempFileURL),
nullptr ));
osl::File::remove( tempFileURL );
+#endif
}
void testTdf96993()
{
+#if HAVE_FEATURE_POPPLER
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
xAdaptor->setTreeVisitorFactory(createDrawTreeVisitorFactory());
@@ -505,10 +513,12 @@ namespace
nullptr));
// This ensures that the imported image arrives properly flipped
CPPUNIT_ASSERT(aOutput.indexOf("draw:transform=\"matrix(18520.8333333333 0 0 26281.9444444444 0 0)\"") != -1);
+#endif
}
void testTdf98421()
{
+#if HAVE_FEATURE_POPPLER
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
xAdaptor->setTreeVisitorFactory(createWriterTreeVisitorFactory());
@@ -520,10 +530,12 @@ namespace
// This ensures that the imported image arrives properly flipped
CPPUNIT_ASSERT(aOutput.indexOf("draw:transform=\"scale( 1.0 -1.0 ) translate( 0mm 0mm )\"") != -1);
CPPUNIT_ASSERT(aOutput.indexOf("svg:height=\"-262.82mm\"") != -1);
+#endif
}
void testTdf105536()
{
+#if HAVE_FEATURE_POPPLER
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
xAdaptor->setTreeVisitorFactory(createDrawTreeVisitorFactory());
@@ -534,6 +546,7 @@ namespace
nullptr));
// This ensures that the imported image arrives properly flipped
CPPUNIT_ASSERT(aOutput.indexOf("draw:transform=\"matrix(-21488.4 0 0 -27978.1 21488.4 27978.1)\"") != -1);
+#endif
}
CPPUNIT_TEST_SUITE(PDFITest);