[Libreoffice-commits] core.git: config_host/config_features.h.in configure.ac sd/qa svtools/qa svx/qa sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 22 17:51:05 UTC 2016
config_host/config_features.h.in | 5 +++++
configure.ac | 1 +
sd/qa/unit/export-tests.cxx | 2 ++
svtools/qa/unit/GraphicObjectTest.cxx | 2 ++
svx/qa/unit/xoutdev.cxx | 2 ++
sw/qa/extras/odfexport/odfexport.cxx | 3 +++
6 files changed, 15 insertions(+)
New commits:
commit 056fbbf93b45bf948911df11ba5273131844f9cc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jul 22 18:14:40 2016 +0200
Fix --disable-pdfimport build
Change-Id: Ida06b892aea92cfe26fd62372e21ca611d8838d3
Reviewed-on: https://gerrit.libreoffice.org/27447
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 108bfca..bae2ecd 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -174,4 +174,9 @@
*/
#define HAVE_FEATURE_UI 1
+/*
+ * Whether PDF import is available
+ */
+#define HAVE_FEATURE_PDFIMPORT 0
+
#endif
diff --git a/configure.ac b/configure.ac
index 8d0e785..b9e7217 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10623,6 +10623,7 @@ ENABLE_PDFIMPORT=
if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
AC_MSG_RESULT([yes])
ENABLE_PDFIMPORT=TRUE
+ AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
dnl ===================================================================
dnl Check for system poppler
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index ad1b168..8d195f2 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -517,6 +517,7 @@ void SdExportTest::testTdf62176()
void SdExportTest::testEmbeddedPdf()
{
+#if HAVE_FEATURE_PDFIMPORT
sd::DrawDocShellRef xShell = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/embedded-pdf.odp"), ODP);
xShell = saveAndReload(xShell, ODP);
uno::Reference<drawing::XDrawPage> xPage = getPage(0, xShell);
@@ -525,6 +526,7 @@ void SdExportTest::testEmbeddedPdf()
xShape->getPropertyValue("ReplacementGraphicURL") >>= aReplacementGraphicURL;
CPPUNIT_ASSERT(!aReplacementGraphicURL.isEmpty());
xShell->DoClose();
+#endif
}
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx
index c785fad..f17aeca 100644
--- a/svtools/qa/unit/GraphicObjectTest.cxx
+++ b/svtools/qa/unit/GraphicObjectTest.cxx
@@ -311,6 +311,7 @@ void GraphicObjectTest::testTdf88935()
void GraphicObjectTest::testPdf()
{
+#if HAVE_FEATURE_PDFIMPORT
uno::Reference<lang::XComponent> xComponent = loadFromDesktop(m_directories.getURLFromSrc("svtools/qa/unit/data/pdf.odt"), "com.sun.star.text.TextDocument");
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument*>(xComponent.get());
CPPUNIT_ASSERT(pTxtDoc);
@@ -339,6 +340,7 @@ void GraphicObjectTest::testPdf()
CPPUNIT_ASSERT(pGraphicObject->GetGraphic().getPdfData().hasElements());
xComponent->dispose();
+#endif
}
CPPUNIT_TEST_SUITE_REGISTRATION(GraphicObjectTest);
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index c053b26..ff2e8bc 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -32,6 +32,7 @@ public:
void XOutdevTest::testPdfGraphicExport()
{
+#if HAVE_FEATURE_PDFIMPORT
// Import the graphic.
Graphic aGraphic;
test::Directories aDirectories;
@@ -58,6 +59,7 @@ void XOutdevTest::testPdfGraphicExport()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>('D'), sFirstBytes[2]);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>('F'), sFirstBytes[3]);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>('-'), sFirstBytes[4]);
+#endif
}
CPPUNIT_TEST_SUITE_REGISTRATION(XOutdevTest);
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 1e8febf..56d2d2a 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -8,6 +8,7 @@
*/
#include <swmodeltestbase.hxx>
+#include <config_features.h>
#include <initializer_list>
@@ -810,12 +811,14 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3");
}
+#if HAVE_FEATURE_PDFIMPORT
DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
{
uno::Reference<drawing::XShape> xShape = getShape(1);
// This failed, pdf+svm replacement graphics pair didn't survive an ODT roundtrip.
CPPUNIT_ASSERT(!getProperty<OUString>(xShape, "ReplacementGraphicURL").isEmpty());
}
+#endif
DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt")
{
More information about the Libreoffice-commits
mailing list