[Libreoffice-commits] core.git: config_host/config_poppler.h.in configure.ac sd/qa

Tor Lillqvist tml at collabora.com
Tue Apr 28 13:02:40 PDT 2015


 config_host/config_poppler.h.in |    2 ++
 configure.ac                    |    1 +
 sd/qa/unit/import-tests.cxx     |   10 ++++++++++
 3 files changed, 13 insertions(+)

New commits:
commit b3acc2944862ff9def6c19c2687a6209a4a191bb
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Apr 28 22:51:10 2015 +0300

    Fix --disable-pdfimport build
    
    Change-Id: I932f584ef3c054abe738d59e9957c3a40be1d2c9

diff --git a/config_host/config_poppler.h.in b/config_host/config_poppler.h.in
index 458c49b..934aec1 100644
--- a/config_host/config_poppler.h.in
+++ b/config_host/config_poppler.h.in
@@ -5,6 +5,8 @@ Settings for poppler header file dection
 #ifndef CONFIG_POPPLER_H
 #define CONFIG_POPPLER_H
 
+#define ENABLE_PDFIMPORT 0
+
 #define HAVE_POPPLER_VERSION_H 0
 
 #endif
diff --git a/configure.ac b/configure.ac
index d2a7aba..26071dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10453,6 +10453,7 @@ if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_
         BUILD_TYPE="$BUILD_TYPE POPPLER"
         AC_DEFINE([HAVE_POPPLER_VERSION_H], 1)
     fi
+    AC_DEFINE([ENABLE_PDFIMPORT],1)
 else
     AC_MSG_RESULT([no])
 fi
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8da93fb..c2f00b9 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <config_poppler.h>
+
 #include "sdmodeltestbase.hxx"
 
 #include <svl/stritem.hxx>
@@ -94,8 +96,10 @@ public:
     void testShapeLineStyle();
     void testBnc862510_6();
     void testBnc862510_7();
+#if ENABLE_PDFIMPORT
     void testPDFImport();
     void testPDFImportSkipImages();
+#endif
     void testBulletSuffix();
     void testBnc910045();
 
@@ -130,8 +134,10 @@ public:
     CPPUNIT_TEST(testShapeLineStyle);
     CPPUNIT_TEST(testBnc862510_6);
     CPPUNIT_TEST(testBnc862510_7);
+#if ENABLE_PDFIMPORT
     CPPUNIT_TEST(testPDFImport);
     CPPUNIT_TEST(testPDFImportSkipImages);
+#endif
     CPPUNIT_TEST(testBulletSuffix);
     CPPUNIT_TEST(testBnc910045);
 
@@ -1081,6 +1087,8 @@ void SdImportTest::testBnc862510_7()
     xDocShRef->DoClose();
 }
 
+#if ENABLE_PDFIMPORT
+
 void SdImportTest::testPDFImport()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pdf/txtpic.pdf"), PDF);
@@ -1118,6 +1126,8 @@ void SdImportTest::testPDFImportSkipImages()
     xDocShRef->DoClose();
 }
 
+#endif
+
 void SdImportTest::testBulletSuffix()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n83889.pptx"), PPTX );


More information about the Libreoffice-commits mailing list