[Libreoffice-commits] core.git: sd/qa

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 23 03:07:32 UTC 2019


 sd/qa/unit/import-tests.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 2aa76522881bd92ddc4daeaabcb30a6938291afc
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Dec 22 21:01:42 2019 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Mon Dec 23 04:06:33 2019 +0100

    sd: explain ENABLE_PDFIMPORT-guarded tests
    
    Change-Id: I60a27cf1c994a157f23bf140fc0b9aca8bb8caa9
    Reviewed-on: https://gerrit.libreoffice.org/85725
    Tested-by: Jenkins
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 773e86cdc5a7..1fbde60d3cb1 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1222,6 +1222,23 @@ void SdImportTest::testBnc862510_7()
 }
 
 #if ENABLE_PDFIMPORT
+// These tests use the old PDF-importing logic, which imports PDF elements as
+// SD elements. This suffered many issues, and therefore wasn't ideal.
+// The old PDF importer relied on an open-source project (xpdf) with an
+// incompatible license (gpl), which has to be interfaced via an out-of-process
+// library wrapper process. The resulting imported document was inaccurate
+// and often very slow and with large memory footprint.
+// Instead, PDFium offers state-of-the-art PDF importing logic,
+// which is well-maintained and renders PDFs into images with high accuracy.
+// So, the idea is to import PDFs as images using PDFium, which has a very
+// high quality (and is much faster) than importing individual editable elements.
+// So that's the "new" way of importing.
+// The user then breaks the image to editable elements (which is not perfect,
+// but very close to the old way), only :wif they need editing ability.
+// PDFium should overall be better, and where it isn't, we just need to improve it.
+// So these tests aren't really useful anymore. They should be modified to do
+// import+break and then check the results. But that isn't straight-forward and
+// currently await volunteering time to implement.
 
 #if HAVE_FEATURE_PDFIUM
 void SdImportTest::testPDFImportShared()


More information about the Libreoffice-commits mailing list