You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
3.2 KiB
92 lines
3.2 KiB
From ced9702c9fcba0c702f0b910c3f1f5dae69a4f5a Mon Sep 17 00:00:00 2001
|
|
From: Stephan Bergmann <sbergman@redhat.com>
|
|
Date: Tue, 17 Dec 2019 08:24:39 +0100
|
|
Subject: [PATCH] SdImportTest::testPDFImportShared fails for --disable-pdfium
|
|
|
|
...with
|
|
|
|
> Test name: SdImportTest::testPDFImportShared
|
|
> assertion failed
|
|
> - Expression: false
|
|
> - failed to load file:///.../sd/qa/unit/data/pdf/multipage.pdf
|
|
|
|
during CppunitTest_sd_import_tests, because vcl::ImportPDFUnloaded always
|
|
returns false then which gets propagated down to
|
|
|
|
> #0 in vcl::ImportPDFUnloaded(rtl::OUString const&, std::__debug::vector<std::pair<Graphic, Size>, std::allocator<std::pair<Graphic, Size> > >&, double) at vcl/source/filter/ipdf/pdfread.cxx:358
|
|
> #1 in SdPdfFilter::Import() at sd/source/filter/pdf/sdpdffilter.cxx:58
|
|
> #2 in sd::DrawDocShell::ConvertFrom(SfxMedium&) at sd/source/ui/docshell/docshel4.cxx:485
|
|
> #3 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:768
|
|
> #4 in SdModelTestBase::loadURL(rtl::OUString const&, int, std::unique_ptr<SfxAllItemSet, std::default_delete<SfxAllItemSet> >) at sd/qa/unit/sdmodeltestbase.hxx:183
|
|
> #5 in SdImportTest::testPDFImportShared() at sd/qa/unit/import-tests.cxx:1218
|
|
|
|
(If the tests currently disabled with IMPORT_PDF_ELEMENTS were enabled, see the
|
|
mail thread starting at
|
|
<https://lists.freedesktop.org/archives/libreoffice/2019-December/084003.html>
|
|
"sd: disable pdf import tests", then they would work fine with --disable-pdfium
|
|
as I just checked, so they don't need to be covered by the new #if.)
|
|
|
|
(Found with <https://ci.libreoffice.org//job/lo_tb_random_config_linux/2100/>.)
|
|
|
|
Change-Id: I96e83f478c344123af0c5bcd0b5a82af01b1b9da
|
|
Reviewed-on: https://gerrit.libreoffice.org/85259
|
|
Tested-by: Jenkins
|
|
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
---
|
|
sd/qa/unit/import-tests.cxx | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
|
|
index 600f16ad4957..91840ee1b0cd 100644
|
|
--- a/sd/qa/unit/import-tests.cxx
|
|
+++ b/sd/qa/unit/import-tests.cxx
|
|
@@ -7,6 +7,9 @@
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
+#include <sal/config.h>
|
|
+
|
|
+#include <config_features.h>
|
|
#include <config_poppler.h>
|
|
#include <ostream>
|
|
#include <sdpage.hxx>
|
|
@@ -145,7 +148,9 @@ 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();
|
|
@@ -249,7 +254,9 @@ 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);
|
|
@@ -1212,6 +1219,7 @@ void SdImportTest::testBnc862510_7()
|
|
|
|
#if ENABLE_PDFIMPORT
|
|
|
|
+#if HAVE_FEATURE_PDFIUM
|
|
void SdImportTest::testPDFImportShared()
|
|
{
|
|
comphelper::LibreOfficeKit::setActive();
|
|
@@ -1268,6 +1276,7 @@ void SdImportTest::testPDFImportShared()
|
|
xDocShRef->DoClose();
|
|
comphelper::LibreOfficeKit::setActive(false);
|
|
}
|
|
+#endif
|
|
|
|
#if defined(IMPORT_PDF_ELEMENTS)
|
|
|
|
--
|
|
2.24.1
|
|
|