diff options
-rw-r--r-- | Makefile.fetch | 1 | ||||
-rw-r--r-- | RepositoryExternal.mk | 2 | ||||
-rw-r--r-- | download.lst | 2 | ||||
-rw-r--r-- | external/poppler/ExternalPackage_poppler_data.mk | 297 | ||||
-rw-r--r-- | external/poppler/Module_poppler.mk | 2 | ||||
-rw-r--r-- | external/poppler/UnpackedTarball_poppler_data.mk | 13 | ||||
-rw-r--r-- | readlicense_oo/license/license.xml | 33 | ||||
-rw-r--r-- | sdext/Executable_xpdfimport.mk | 7 | ||||
-rw-r--r-- | sdext/source/pdfimport/test/testTdf141709.pdf | bin | 0 -> 11119 bytes | |||
-rw-r--r-- | sdext/source/pdfimport/test/tests.cxx | 29 | ||||
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 23 | ||||
-rw-r--r-- | solenv/flatpak-manifest.in | 7 |
12 files changed, 413 insertions, 3 deletions
diff --git a/Makefile.fetch b/Makefile.fetch index 550a9603c6bd..3c5b7ed1ee01 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -203,6 +203,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \ $(call fetch_Optional,PDFIUM,PDFIUM_TARBALL) \ $(call fetch_Optional,POPPLER,POPPLER_TARBALL) \ + $(call fetch_Optional,POPPLER,POPPLER_DATA_TARBALL) \ $(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \ $(call fetch_Optional,PYTHON,PYTHON_TARBALL) \ $(call fetch_Optional,QXP,QXP_TARBALL) \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 36c74ee95985..e79c9393828b 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -2808,7 +2808,7 @@ else # !SYSTEM_POPPLER define gb_LinkTarget__use_poppler $(call gb_LinkTarget_use_external_project,$(1),poppler,full) - +$(call gb_LinkTarget_use_package,$(1),poppler_data) $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,poppler) \ -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \ diff --git a/download.lst b/download.lst index 3352c6fbc3c7..503c666b1ce6 100644 --- a/download.lst +++ b/download.lst @@ -216,6 +216,8 @@ export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f export LIBPNG_TARBALL := libpng-1.6.37.tar.xz export POPPLER_SHA256SUM := 016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3 export POPPLER_TARBALL := poppler-21.01.0.tar.xz +export POPPLER_DATA_SHA256SUM := 6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30 +export POPPLER_DATA_TARBALL := poppler-data-0.4.10.tar.gz export POSTGRESQL_SHA256SUM := 12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2 export PYTHON_SHA256SUM := bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d000078e6ed1df3d767b6 diff --git a/external/poppler/ExternalPackage_poppler_data.mk b/external/poppler/ExternalPackage_poppler_data.mk new file mode 100644 index 000000000000..78024d3fec8b --- /dev/null +++ b/external/poppler/ExternalPackage_poppler_data.mk @@ -0,0 +1,297 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,poppler_data,poppler_data)) + +poppler_unicode-map-files = \ + unicodeMap/Big5 \ + unicodeMap/Big5ascii \ + unicodeMap/EUC-CN \ + unicodeMap/EUC-JP \ + unicodeMap/GBK \ + unicodeMap/ISO-2022-CN \ + unicodeMap/ISO-2022-JP \ + unicodeMap/ISO-2022-KR \ + unicodeMap/ISO-8859-6 \ + unicodeMap/ISO-8859-7 \ + unicodeMap/ISO-8859-8 \ + unicodeMap/ISO-8859-9 \ + unicodeMap/KOI8-R \ + unicodeMap/Latin2 \ + unicodeMap/Shift-JIS \ + unicodeMap/TIS-620 \ + unicodeMap/Windows-1255 + + +poppler_cmap-files = \ + cMap/Adobe-CNS1/Adobe-CNS1-0 \ + cMap/Adobe-CNS1/Adobe-CNS1-1 \ + cMap/Adobe-CNS1/Adobe-CNS1-2 \ + cMap/Adobe-CNS1/Adobe-CNS1-3 \ + cMap/Adobe-CNS1/Adobe-CNS1-4 \ + cMap/Adobe-CNS1/Adobe-CNS1-5 \ + cMap/Adobe-CNS1/Adobe-CNS1-6 \ + cMap/Adobe-CNS1/Adobe-CNS1-7 \ + cMap/Adobe-CNS1/Adobe-CNS1-B5pc \ + cMap/Adobe-CNS1/Adobe-CNS1-ETen-B5 \ + cMap/Adobe-CNS1/Adobe-CNS1-H-CID \ + cMap/Adobe-CNS1/Adobe-CNS1-H-Host \ + cMap/Adobe-CNS1/Adobe-CNS1-H-Mac \ + cMap/Adobe-CNS1/Adobe-CNS1-UCS2 \ + cMap/Adobe-CNS1/B5-H \ + cMap/Adobe-CNS1/B5pc-H \ + cMap/Adobe-CNS1/B5pc-UCS2 \ + cMap/Adobe-CNS1/B5pc-UCS2C \ + cMap/Adobe-CNS1/B5pc-V \ + cMap/Adobe-CNS1/B5-V \ + cMap/Adobe-CNS1/CNS1-H \ + cMap/Adobe-CNS1/CNS1-V \ + cMap/Adobe-CNS1/CNS2-H \ + cMap/Adobe-CNS1/CNS2-V \ + cMap/Adobe-CNS1/CNS-EUC-H \ + cMap/Adobe-CNS1/CNS-EUC-V \ + cMap/Adobe-CNS1/ETen-B5-H \ + cMap/Adobe-CNS1/ETen-B5-UCS2 \ + cMap/Adobe-CNS1/ETen-B5-V \ + cMap/Adobe-CNS1/ETenms-B5-H \ + cMap/Adobe-CNS1/ETenms-B5-V \ + cMap/Adobe-CNS1/ETHK-B5-H \ + cMap/Adobe-CNS1/ETHK-B5-V \ + cMap/Adobe-CNS1/HKdla-B5-H \ + cMap/Adobe-CNS1/HKdla-B5-V \ + cMap/Adobe-CNS1/HKdlb-B5-H \ + cMap/Adobe-CNS1/HKdlb-B5-V \ + cMap/Adobe-CNS1/HKgccs-B5-H \ + cMap/Adobe-CNS1/HKgccs-B5-V \ + cMap/Adobe-CNS1/HKm314-B5-H \ + cMap/Adobe-CNS1/HKm314-B5-V \ + cMap/Adobe-CNS1/HKm471-B5-H \ + cMap/Adobe-CNS1/HKm471-B5-V \ + cMap/Adobe-CNS1/HKscs-B5-H \ + cMap/Adobe-CNS1/HKscs-B5-V \ + cMap/Adobe-CNS1/UCS2-B5pc \ + cMap/Adobe-CNS1/UCS2-ETen-B5 \ + cMap/Adobe-CNS1/UniCNS-UCS2-H \ + cMap/Adobe-CNS1/UniCNS-UCS2-V \ + cMap/Adobe-CNS1/UniCNS-UTF16-H \ + cMap/Adobe-CNS1/UniCNS-UTF16-V \ + cMap/Adobe-CNS1/UniCNS-UTF32-H \ + cMap/Adobe-CNS1/UniCNS-UTF32-V \ + cMap/Adobe-CNS1/UniCNS-UTF8-H \ + cMap/Adobe-CNS1/UniCNS-UTF8-V \ + cMap/Adobe-GB1/Adobe-GB1-0 \ + cMap/Adobe-GB1/Adobe-GB1-1 \ + cMap/Adobe-GB1/Adobe-GB1-2 \ + cMap/Adobe-GB1/Adobe-GB1-3 \ + cMap/Adobe-GB1/Adobe-GB1-4 \ + cMap/Adobe-GB1/Adobe-GB1-5 \ + cMap/Adobe-GB1/Adobe-GB1-GBK-EUC \ + cMap/Adobe-GB1/Adobe-GB1-GBpc-EUC \ + cMap/Adobe-GB1/Adobe-GB1-H-CID \ + cMap/Adobe-GB1/Adobe-GB1-H-Host \ + cMap/Adobe-GB1/Adobe-GB1-H-Mac \ + cMap/Adobe-GB1/Adobe-GB1-UCS2 \ + cMap/Adobe-GB1/GB-EUC-H \ + cMap/Adobe-GB1/GB-EUC-V \ + cMap/Adobe-GB1/GB-H \ + cMap/Adobe-GB1/GBK2K-H \ + cMap/Adobe-GB1/GBK2K-V \ + cMap/Adobe-GB1/GBK-EUC-H \ + cMap/Adobe-GB1/GBK-EUC-UCS2 \ + cMap/Adobe-GB1/GBK-EUC-V \ + cMap/Adobe-GB1/GBKp-EUC-H \ + cMap/Adobe-GB1/GBKp-EUC-V \ + cMap/Adobe-GB1/GBpc-EUC-H \ + cMap/Adobe-GB1/GBpc-EUC-UCS2 \ + cMap/Adobe-GB1/GBpc-EUC-UCS2C \ + cMap/Adobe-GB1/GBpc-EUC-V \ + cMap/Adobe-GB1/GBT-EUC-H \ + cMap/Adobe-GB1/GBT-EUC-V \ + cMap/Adobe-GB1/GBT-H \ + cMap/Adobe-GB1/GBTpc-EUC-H \ + cMap/Adobe-GB1/GBTpc-EUC-V \ + cMap/Adobe-GB1/GBT-V \ + cMap/Adobe-GB1/GB-V \ + cMap/Adobe-GB1/UCS2-GBK-EUC \ + cMap/Adobe-GB1/UCS2-GBpc-EUC \ + cMap/Adobe-GB1/UniGB-UCS2-H \ + cMap/Adobe-GB1/UniGB-UCS2-V \ + cMap/Adobe-GB1/UniGB-UTF16-H \ + cMap/Adobe-GB1/UniGB-UTF16-V \ + cMap/Adobe-GB1/UniGB-UTF32-H \ + cMap/Adobe-GB1/UniGB-UTF32-V \ + cMap/Adobe-GB1/UniGB-UTF8-H \ + cMap/Adobe-GB1/UniGB-UTF8-V \ + cMap/Adobe-Japan1/78-EUC-H \ + cMap/Adobe-Japan1/78-EUC-V \ + cMap/Adobe-Japan1/78-H \ + cMap/Adobe-Japan1/78ms-RKSJ-H \ + cMap/Adobe-Japan1/78ms-RKSJ-V \ + cMap/Adobe-Japan1/78-RKSJ-H \ + cMap/Adobe-Japan1/78-RKSJ-V \ + cMap/Adobe-Japan1/78-V \ + cMap/Adobe-Japan1/83pv-RKSJ-H \ + cMap/Adobe-Japan1/90msp-RKSJ-H \ + cMap/Adobe-Japan1/90msp-RKSJ-V \ + cMap/Adobe-Japan1/90ms-RKSJ-H \ + cMap/Adobe-Japan1/90ms-RKSJ-UCS2 \ + cMap/Adobe-Japan1/90ms-RKSJ-V \ + cMap/Adobe-Japan1/90pv-RKSJ-H \ + cMap/Adobe-Japan1/90pv-RKSJ-UCS2 \ + cMap/Adobe-Japan1/90pv-RKSJ-UCS2C \ + cMap/Adobe-Japan1/90pv-RKSJ-V \ + cMap/Adobe-Japan1/Add-H \ + cMap/Adobe-Japan1/Add-RKSJ-H \ + cMap/Adobe-Japan1/Add-RKSJ-V \ + cMap/Adobe-Japan1/Add-V \ + cMap/Adobe-Japan1/Adobe-Japan1-0 \ + cMap/Adobe-Japan1/Adobe-Japan1-1 \ + cMap/Adobe-Japan1/Adobe-Japan1-2 \ + cMap/Adobe-Japan1/Adobe-Japan1-3 \ + cMap/Adobe-Japan1/Adobe-Japan1-4 \ + cMap/Adobe-Japan1/Adobe-Japan1-5 \ + cMap/Adobe-Japan1/Adobe-Japan1-6 \ + cMap/Adobe-Japan1/Adobe-Japan1-7 \ + cMap/Adobe-Japan1/Adobe-Japan1-90ms-RKSJ \ + cMap/Adobe-Japan1/Adobe-Japan1-90pv-RKSJ \ + cMap/Adobe-Japan1/Adobe-Japan1-H-CID \ + cMap/Adobe-Japan1/Adobe-Japan1-H-Host \ + cMap/Adobe-Japan1/Adobe-Japan1-H-Mac \ + cMap/Adobe-Japan1/Adobe-Japan1-PS-H \ + cMap/Adobe-Japan1/Adobe-Japan1-PS-V \ + cMap/Adobe-Japan1/Adobe-Japan1-UCS2 \ + cMap/Adobe-Japan1/EUC-H \ + cMap/Adobe-Japan1/EUC-V \ + cMap/Adobe-Japan1/Ext-H \ + cMap/Adobe-Japan1/Ext-RKSJ-H \ + cMap/Adobe-Japan1/Ext-RKSJ-V \ + cMap/Adobe-Japan1/Ext-V \ + cMap/Adobe-Japan1/H \ + cMap/Adobe-Japan1/Hankaku \ + cMap/Adobe-Japan1/Hiragana \ + cMap/Adobe-Japan1/Hojo-EUC-H \ + cMap/Adobe-Japan1/Hojo-EUC-V \ + cMap/Adobe-Japan1/Hojo-H \ + cMap/Adobe-Japan1/Hojo-V \ + cMap/Adobe-Japan1/Katakana \ + cMap/Adobe-Japan1/NWP-H \ + cMap/Adobe-Japan1/NWP-V \ + cMap/Adobe-Japan1/RKSJ-H \ + cMap/Adobe-Japan1/RKSJ-V \ + cMap/Adobe-Japan1/Roman \ + cMap/Adobe-Japan1/UCS2-90ms-RKSJ \ + cMap/Adobe-Japan1/UCS2-90pv-RKSJ \ + cMap/Adobe-Japan1/UniHojo-UCS2-H \ + cMap/Adobe-Japan1/UniHojo-UCS2-V \ + cMap/Adobe-Japan1/UniHojo-UTF16-H \ + cMap/Adobe-Japan1/UniHojo-UTF16-V \ + cMap/Adobe-Japan1/UniHojo-UTF32-H \ + cMap/Adobe-Japan1/UniHojo-UTF32-V \ + cMap/Adobe-Japan1/UniHojo-UTF8-H \ + cMap/Adobe-Japan1/UniHojo-UTF8-V \ + cMap/Adobe-Japan1/UniJIS2004-UTF16-H \ + cMap/Adobe-Japan1/UniJIS2004-UTF16-V \ + cMap/Adobe-Japan1/UniJIS2004-UTF32-H \ + cMap/Adobe-Japan1/UniJIS2004-UTF32-V \ + cMap/Adobe-Japan1/UniJIS2004-UTF8-H \ + cMap/Adobe-Japan1/UniJIS2004-UTF8-V \ + cMap/Adobe-Japan1/UniJISPro-UCS2-HW-V \ + cMap/Adobe-Japan1/UniJISPro-UCS2-V \ + cMap/Adobe-Japan1/UniJISPro-UTF8-V \ + cMap/Adobe-Japan1/UniJIS-UCS2-H \ + cMap/Adobe-Japan1/UniJIS-UCS2-HW-H \ + cMap/Adobe-Japan1/UniJIS-UCS2-HW-V \ + cMap/Adobe-Japan1/UniJIS-UCS2-V \ + cMap/Adobe-Japan1/UniJIS-UTF16-H \ + cMap/Adobe-Japan1/UniJIS-UTF16-V \ + cMap/Adobe-Japan1/UniJIS-UTF32-H \ + cMap/Adobe-Japan1/UniJIS-UTF32-V \ + cMap/Adobe-Japan1/UniJIS-UTF8-H \ + cMap/Adobe-Japan1/UniJIS-UTF8-V \ + cMap/Adobe-Japan1/UniJISX02132004-UTF32-H \ + cMap/Adobe-Japan1/UniJISX02132004-UTF32-V \ + cMap/Adobe-Japan1/UniJISX0213-UTF32-H \ + cMap/Adobe-Japan1/UniJISX0213-UTF32-V \ + cMap/Adobe-Japan1/V \ + cMap/Adobe-Japan1/WP-Symbol \ + cMap/Adobe-Japan2/Adobe-Japan2-0 \ + cMap/Adobe-Korea1/Adobe-Korea1-0 \ + cMap/Adobe-Korea1/Adobe-Korea1-1 \ + cMap/Adobe-Korea1/Adobe-Korea1-2 \ + cMap/Adobe-Korea1/Adobe-Korea1-H-CID \ + cMap/Adobe-Korea1/Adobe-Korea1-H-Host \ + cMap/Adobe-Korea1/Adobe-Korea1-H-Mac \ + cMap/Adobe-Korea1/Adobe-Korea1-KSCms-UHC \ + cMap/Adobe-Korea1/Adobe-Korea1-KSCpc-EUC \ + cMap/Adobe-Korea1/Adobe-Korea1-UCS2 \ + cMap/Adobe-Korea1/KSC-EUC-H \ + cMap/Adobe-Korea1/KSC-EUC-V \ + cMap/Adobe-Korea1/KSC-H \ + cMap/Adobe-Korea1/KSC-Johab-H \ + cMap/Adobe-Korea1/KSC-Johab-V \ + cMap/Adobe-Korea1/KSCms-UHC-H \ + cMap/Adobe-Korea1/KSCms-UHC-HW-H \ + cMap/Adobe-Korea1/KSCms-UHC-HW-V \ + cMap/Adobe-Korea1/KSCms-UHC-UCS2 \ + cMap/Adobe-Korea1/KSCms-UHC-V \ + cMap/Adobe-Korea1/KSCpc-EUC-H \ + cMap/Adobe-Korea1/KSCpc-EUC-UCS2 \ + cMap/Adobe-Korea1/KSCpc-EUC-UCS2C \ + cMap/Adobe-Korea1/KSCpc-EUC-V \ + cMap/Adobe-Korea1/KSC-V \ + cMap/Adobe-Korea1/UCS2-KSCms-UHC \ + cMap/Adobe-Korea1/UCS2-KSCpc-EUC \ + cMap/Adobe-Korea1/UniKS-UCS2-H \ + cMap/Adobe-Korea1/UniKS-UCS2-V \ + cMap/Adobe-Korea1/UniKS-UTF16-H \ + cMap/Adobe-Korea1/UniKS-UTF16-V \ + cMap/Adobe-Korea1/UniKS-UTF32-H \ + cMap/Adobe-Korea1/UniKS-UTF32-V \ + cMap/Adobe-Korea1/UniKS-UTF8-H \ + cMap/Adobe-Korea1/UniKS-UTF8-V \ + cMap/Adobe-KR/Adobe-KR-0 \ + cMap/Adobe-KR/Adobe-KR-1 \ + cMap/Adobe-KR/Adobe-KR-2 \ + cMap/Adobe-KR/Adobe-KR-3 \ + cMap/Adobe-KR/Adobe-KR-4 \ + cMap/Adobe-KR/Adobe-KR-5 \ + cMap/Adobe-KR/Adobe-KR-6 \ + cMap/Adobe-KR/Adobe-KR-7 \ + cMap/Adobe-KR/Adobe-KR-8 \ + cMap/Adobe-KR/Adobe-KR-9 \ + cMap/Adobe-KR/Adobe-KR-UCS2 \ + cMap/Adobe-KR/UniAKR-UTF16-H \ + cMap/Adobe-KR/UniAKR-UTF32-H \ + cMap/Adobe-KR/UniAKR-UTF8-H + +poppler_name-to-unicode-files = \ + nameToUnicode/Bulgarian \ + nameToUnicode/Greek \ + nameToUnicode/Thai + +poppler_cid-to-unicode-files = \ + cidToUnicode/Adobe-CNS1 \ + cidToUnicode/Adobe-GB1 \ + cidToUnicode/Adobe-Japan1 \ + cidToUnicode/Adobe-Korea1 + +poppler_DISTFILES = \ + README \ + COPYING \ + COPYING.adobe \ + COPYING.gpl2 \ + $(poppler_unicode-map-files) \ + $(poppler_cmap-files) \ + $(poppler_name-to-unicode-files) \ + $(poppler_cid-to-unicode-files) + +$(eval $(call gb_ExternalPackage_add_unpacked_files_with_dir,poppler_data,$(LIBO_SHARE_FOLDER)/xpdfimport/poppler_data,\ + $(poppler_DISTFILES))) + +# vim: set noet sw=4 ts=4: diff --git a/external/poppler/Module_poppler.mk b/external/poppler/Module_poppler.mk index ebae6e7aaddd..a35bae436a6d 100644 --- a/external/poppler/Module_poppler.mk +++ b/external/poppler/Module_poppler.mk @@ -12,6 +12,8 @@ $(eval $(call gb_Module_Module,poppler)) $(eval $(call gb_Module_add_targets,poppler,\ StaticLibrary_poppler \ UnpackedTarball_poppler \ + ExternalPackage_poppler_data \ + UnpackedTarball_poppler_data \ )) # vim: set noet sw=4 ts=4: diff --git a/external/poppler/UnpackedTarball_poppler_data.mk b/external/poppler/UnpackedTarball_poppler_data.mk new file mode 100644 index 000000000000..e0357df5a182 --- /dev/null +++ b/external/poppler/UnpackedTarball_poppler_data.mk @@ -0,0 +1,13 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler_data)) + +$(eval $(call gb_UnpackedTarball_set_tarball,poppler_data,$(POPPLER_DATA_TARBALL),,poppler_data)) +# vim: set noet sw=4 ts=4: diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml index bb64fedc05de..02a91d7c1daf 100644 --- a/readlicense_oo/license/license.xml +++ b/readlicense_oo/license/license.xml @@ -1641,6 +1641,39 @@ <p>The following software may be included in this product: poppler. Use of any of this software is governed by the terms of the license below:</p> <p><a href="#a__GPL_version_2">Jump to GPL Version 2</a></p> + <p>The cidToUnicode, nameToUnicode and unicodeMap data files + installed by the poppler-data package are Copyright Glyph & Cog, LLC + and are licensed under the GNU General Public License (GPL), <a href="#a__GPL_version_2">version 2</a> + or <a href="#a__GPL_version_3">version 3</a>.</p> + <p>The cMap data files installed by the poppler-data package are governed by the terms of the license below:</p> + <p>Copyright 1990-2019 Adobe.</p> + <p>All rights reserved.</p> + <p>Redistribution and use in source and binary forms, with or + without modification, are permitted provided that the + following conditions are met:</p> + <p>Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer.</p> + <p>Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution.</p> + <p>Neither the name of Adobe nor the names of its contributors + may be used to endorse or promote products derived from + this software without specific prior written permission.</p> + <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> </div> <div class="POSTGRES"> <h2>PostgreSQL</h2> diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk index 360358d450d2..495671a4ecae 100644 --- a/sdext/Executable_xpdfimport.mk +++ b/sdext/Executable_xpdfimport.mk @@ -24,4 +24,11 @@ $(eval $(call gb_Executable_add_exception_objects,xpdfimport,\ $(eval $(call gb_Executable_add_default_nativeres,xpdfimport)) +ifneq ($(SYSTEM_POPPLER),) +# Using system poppler +$(eval $(call gb_Executable_add_defs,xpdfimport,\ + -DSYSTEM_POPPLER \ +)) +endif + # vim:set noet sw=4 ts=4: diff --git a/sdext/source/pdfimport/test/testTdf141709.pdf b/sdext/source/pdfimport/test/testTdf141709.pdf Binary files differnew file mode 100644 index 000000000000..3198782faa73 --- /dev/null +++ b/sdext/source/pdfimport/test/testTdf141709.pdf diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 6caa07cb2354..7611511aa92a 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -549,6 +549,34 @@ namespace #endif } + void testTdf141709() + { +#if HAVE_FEATURE_POPPLER + rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext())); + xAdaptor->setTreeVisitorFactory(createDrawTreeVisitorFactory()); + + OString aOutput; + CPPUNIT_ASSERT_MESSAGE("Exporting to ODF", + xAdaptor->odfConvert(m_directories.getURLFromSrc(u"/sdext/source/pdfimport/test/testTdf141709.pdf"), + new OutputWrapString(aOutput), + nullptr)); + std::cout << aOutput << std::endl; + // This ensures that the imported text contains all of the characters + CPPUNIT_ASSERT(aOutput.indexOf("敏") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("捷") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("的") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("狐") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("狸") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("跨") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("过") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("慵") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("懒") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("的") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("狗") != -1); + CPPUNIT_ASSERT(aOutput.indexOf("。") != -1); +#endif + } + CPPUNIT_TEST_SUITE(PDFITest); CPPUNIT_TEST(testXPDFParser); CPPUNIT_TEST(testOdfWriterExport); @@ -556,6 +584,7 @@ namespace CPPUNIT_TEST(testTdf96993); CPPUNIT_TEST(testTdf98421); CPPUNIT_TEST(testTdf105536); + CPPUNIT_TEST(testTdf141709); CPPUNIT_TEST_SUITE_END(); }; diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index b1a54bd09c5f..ad6320139473 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -22,6 +22,11 @@ # include <io.h> # include <fcntl.h> /*_O_BINARY*/ #endif +#ifndef SYSTEM_POPPLER +#include <string> // std::string +#include <cstddef> // std::size_t +#include <config_folders.h> //LIBO_SHARE_FOLDER +#endif FILE* g_binary_out=stderr; @@ -67,11 +72,25 @@ int main(int argc, char **argv) ++k; } + /* Get data directory location */ +#ifdef SYSTEM_POPPLER + const char* datadir = nullptr; +#else + /* Creates an absolute path to the poppler_data directory, by taking the path + * to the xpdfimport executable (provided in argv[0], and concatenating a + * relative path to the poppler_data directory from the program directory. */ + const std::string execPath = argv[0]; + const std::size_t filenameStartPos = execPath.find_last_of("/\\")+1; + const std::string programPath = execPath.substr(0,filenameStartPos); + const std::string popplerDataPath = programPath + "../" LIBO_SHARE_FOLDER "/xpdfimport/poppler_data"; + const char* datadir = popplerDataPath.c_str(); +#endif + // read config file #if POPPLER_CHECK_VERSION(0, 83, 0) - globalParams = std::make_unique<GlobalParams>(); + globalParams = std::make_unique<GlobalParams>(datadir); #else - globalParams = new GlobalParams(); + globalParams = new GlobalParams(datadir); #endif globalParams->setErrQuiet(true); #if defined(_MSC_VER) diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 0cce3253b3a8..7fe9650e8474 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -439,6 +439,13 @@ "dest-filename": "poppler-21.01.0.tar.xz" }, { + "url": "https://dev-www.libreoffice.org/src/poppler-data-0.4.10.tar.gz", + "sha256": "6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30", + "type": "file", + "dest": "external/tarballs", + "dest-filename": "poppler-data-0.4.10.tar.gz" + }, + { "url": "https://dev-www.libreoffice.org/src/postgresql-13.1.tar.bz2", "sha256": "12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f", "type": "file", |