diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-22 18:14:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-22 17:50:36 +0000 |
commit | 056fbbf93b45bf948911df11ba5273131844f9cc (patch) | |
tree | b0b8f18fd5e9f44c2c626840d3b593b5c2038e59 | |
parent | chart2: missing header <iterator> reportedly breaks MSVC2015 (diff) | |
download | core-056fbbf93b45bf948911df11ba5273131844f9cc.tar.gz core-056fbbf93b45bf948911df11ba5273131844f9cc.zip |
Fix --disable-pdfimport build
Change-Id: Ida06b892aea92cfe26fd62372e21ca611d8838d3
Reviewed-on: https://gerrit.libreoffice.org/27447
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | config_host/config_features.h.in | 5 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 2 | ||||
-rw-r--r-- | svtools/qa/unit/GraphicObjectTest.cxx | 2 | ||||
-rw-r--r-- | svx/qa/unit/xoutdev.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 3 |
6 files changed, 15 insertions, 0 deletions
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in index 108bfcac85fc..bae2ecd4dfa3 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 8d0e785ae398..b9e7217e30af 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 ad1b16803f95..8d195f2cf56a 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 c785fadd4890..f17aeca1a4df 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 c053b26b2598..ff2e8bcf507a 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 1e8febf87b45..56d2d2a6529a 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") { |