Commit Graph
149 Commits
Author SHA1 Message Date
Rene Engelhard cbc8eebc1f only conditionally enable the parquet filter
commit b14583ba37 initially added the
parquet filter with saying

    Note that this change makes it possible to load Apache Parquet files
    if and only if orcus has been built with the parquet import filter
    enabled.  Using orcus without the parquet import filter enabled will
    not break the build or run-time behavior; you just can't load parquet
    files.

This is bad since silently failing like this doesn't tell people what
the problem is. Not having the option at all is clearer and more deterministic.

And the internal liborcus in a "standard" LibreOffice build didn't build with parquet
enabled at all anyway, thus leaving LibreOffice offering the option without even able to
load the files.

This patch adds
 a) an explicit --with-parquet-filter configure flag on which the config
    is built or not
 b) based on that flag also gives --with-parquet-filter to liborcus'
    configure. (which then of course will make that liborcus linked
    against libparquet. But if people explicitely specify it..)
 c) fixes the build of liborcus against arrow 23 (see
    https://gitlab.com/orcus/orcus/-/commit/bae0e6e659cf4df2590288f566004eef7096dee4 -
    that incidentially also fixed the liborcus build against 22 for me

This is a generalized version of a local patch I carry in Debian - which
I added some time after I made liborcus in Debian *do*
--with-parquet-filter :)

Change-Id: I72b15893fe4fa8e08a556f27b2d6ab942c9858cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204685
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
2026-05-07 06:15:17 +02:00
Kohei Yoshida 4094a3fdad Upgrade mdds to 3.2.0
Downloaded from https://gitlab.com/api/v4/projects/mdds%2Fmdds/packages/generic/source/3.2.0/mdds-3.2.0.tar.xz

Change-Id: If2a6fff0a8d7bce04e36be0b92097405cc30a899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195691
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Tested-by: Jenkins
2025-12-17 00:12:18 +01:00
Thorsten Behrens b9ab692883 Cleanup BOOST_SYSTEM_LIB after upgrade to boost 1.89
Fixup after 421a66fc52 which left some
BOOST_SYSTEM_LIB usage, breaking system-boost builds.

Change-Id: I64bdcc163a954927684a83bf1c1ef98238acf9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191078
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
Tested-by: Jenkins
2025-09-17 15:00:35 +02:00
Kohei Yoshida d48fddcd20 Upgrade liborcus to 0.21.0
Change-Id: I39bd6d94d03ba7f7c4ce6a2bdd1fb12c1078b42e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191011
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2025-09-16 23:46:00 +02:00
Xisco Fauli 421a66fc52 boost: upgrade to 1_89_0
libs/system/src/error_code.cpp no longer exists in boost so the static
boost_system library can be removed

<https://dev-www.libreoffice.org/src/boost_1_89_0.tar.xz> has been generated (on
Debian 12) with

> $ wget https://archives.boost.io/release/1.89.0/source/boost_1_89_0.tar.bz2
> $ printf '85a33fa22621b4f314f8e85e1a5e2a9363d22e4f4992925d4bb3bc631b5a0c7a boost_1_89_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_89_0.html>
> boost_1_89_0.tar.bz2: OK
> $ external/boost/repack_tarball.sh boost_1_89_0.tar.bz2
> Unpacking boost_1_89_0.tar.bz2 ...
> Removing unnecessary files ...
> Creating boost_1_89_0.tar.xz ...
> Cleaning up ...
> b3a976c659961f1d7fae9a8e58d6729a11f5473abaf2ef0e623f53777c86475d  boost_1_89_0.tar.xz
> Done.

Change-Id: I1278e7f301b083c692539165293ca5ee7f0ab5ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189876
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-09-11 09:48:34 +02:00
Kohei Yoshida cd347097f7 Automatically map generic JSON and XML documents to Calc
This includes one bug fix where orcus_xml did not call
import_factory's finalize() interface method per interface
contract.  With it properly fixed in liborcus itself, it
is no longer necessary to manually call it at the end of
ScOrcusXMLContextImpl::importXML().

Also moving up the type detection order for the generic
HTML type to be before the generic XML type since something
like

<html><body>some text</body></html>

can be detected as a valid XML if it is checked first.
A (well-formed) HTML can be considered a speciazlied XML,
so it should come before XML.

Change-Id: I20f24706421104181ad3dc8250d93f78d6b611e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190042
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2025-08-23 15:41:11 +02:00
Kohei Yoshida 2e5e6c6ef3 Upgrade liborcus to 0.20.2
For Windows build, explicitly define HAVE_FILESYSTEM which forces
orcus to use std::filesystem for all filesystem related operations.

Also, pass to the ctor of orcus::file_content a filepath as
std::u16string_view on Windows to hopefully correctly handle unicode
filepaths.

Change-Id: Ie6f5403212e73c81f1a36db0413133d26a3a67f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189892
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Tested-by: Jenkins
2025-08-20 05:50:12 +02:00
Caolán McNamara 7754492f1a const up orcus
Change-Id: I3fc8dc76cdb609510deb4d35ca8a88fb6d3bb599
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188056
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-19 00:47:30 +02:00
Kohei Yoshida 3d0e85d7f2 Put Mike's original fix back
Per conversation here: https://gerrit.libreoffice.org/c/core/+/187762
and some offline communcation.

Change-Id: If66b74299dd965d237f368c6c901057241226458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187779
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2025-07-12 19:48:34 +02:00
Kohei Yoshida f1ad49f998 tdf#150247: Copy the content to temp file and use its path
Hopefully this is a more reliable fix for loading a file that contains
a unicode segment on Windows.

Change-Id: Iabe3ea849858290e782123840d8756ed07159dec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187762
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Tested-by: Jenkins
2025-07-12 06:37:47 +02:00
Christian Lohmaier 41ebd4c123 add --enable-gcov configure flag (instaed of manually setting flags)
there was already parts of that in the makefile that would require
running "make gb_GCOV=YES" - but that alone was not enough, you were
also kinda expected to set LDFLAGS on the commandline (or at least it
had bitrotted to this state) - so just make it into a proper configure
switch.
Building with lto fails at least on baseline with
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3befe0)
: undefined reference to `.L1'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3befe8)
: undefined reference to `.L1'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3bf018)
: undefined reference to `.L2'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3bf020)
: undefined reference to `.L2'
[…many more of those with incrementing references…]
So for now warn if both are used.

Change-Id: I2c3427b48174de77a6894293a5e784df8ee24bd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186821
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-06-23 15:15:58 +02:00
Kohei Yoshida 2ad7444110 Upgrade liborcus to 0.20.1
Change-Id: I34edb1608eb9ada252646d528d56079f069013fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185726
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Tested-by: Jenkins
2025-05-24 23:44:31 +02:00
Xisco Fauli 3709789a58 gbuild: set default patchlevel to 1
Change-Id: I195dbafff63e21a22edf438f5b9ed5beee4dac03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183784
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-04-08 09:24:08 +02:00
Kohei Yoshida 08c9e64c0b Import autofilter via orcus interface
This should address tdf#154311.

Change-Id: I84401ad7a9982eaa868e68d7ae612debf09ecf9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182606
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2025-03-08 03:40:19 +01:00
Kohei Yoshida 89285dd322 Upgrade mdds to 3.0.0 and liborcus to 0.20.0
The portion of this change related to the mdds upgrade has been done by Xisco
Fauli via https://gerrit.libreoffice.org/c/core/+/180862

mdds 3.0.0

* external/mdds/0001-cid-1546160-COPY_INSTEAD_OF_MOVE.patch.1 is fixed upstream
* external/mdds/use-after-free.patch is fixed upstream

Downloaded from https://gitlab.com/api/v4/projects/mdds%2Fmdds/packages/generic/source/3.0.0/mdds-3.0.0.tar.xz

liborcus 0.20.0

* Pick up superscript and subscript text attributes.
* Update the import of the font underline attributes as well as the
  strikethrough attributes applied to the cells.
* Pick up the underline and strikethrough attributes in rich text
  strings.
* Implementation for the previous auto filter interface has been
  removed for now.

Downloaded from https://gitlab.com/api/v4/projects/orcus%2Forcus/packages/generic/source/0.20.0/liborcus-0.20.0.tar.xz

Change-Id: I93f6e5ab961d707a2bae03a4eca1466c541f086e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181282
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2025-02-08 19:09:57 +01:00
Xisco Fauli 5c88efbcfa external: remove a couple of gcc9 patches
Baseline uses GCC 12 now

Change-Id: Id9a0f79aa801aa342fd943cebeb0f528f4964d84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173235
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-09-12 08:30:34 +02:00
Christian Lohmaier 875a1bf2e1 makefile simplification: replace $(call gb_UnpackedTarball_get_dir,foo)
…by a simple/static $(gb_UnpackedTarball_workdir)/foo
see also 0c4c84a14b

Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-05-06 11:40:45 +02:00
Kohei Yoshida e890b0f0a9 Upgrade orcus to 0.19.2
Change-Id: I2cbf5f93c3b8b2235828affdef7309c3611b19b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159258
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-11-10 15:35:47 +01:00
Kohei Yoshida b5d194d1d3 Upgrade liborcus to 0.19.1
Change-Id: I2190419e88323bbf000602a7762e850a33b5dfdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158409
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-10-25 01:33:12 +02:00
Kohei Yoshida cba8c933d1 Set grammar type to gnumeric before loading the content
Without this, the document model side would not know what grammer
to use to parse formula expressions.

Change-Id: I7e921f9c0f9b088fb98fe126ad4a84db006c8747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157413
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-09-30 00:52:06 +02:00
Kohei Yoshida e9a0c97de9 Set the correct version number of orcus
Ideally we should fix the Windows build properly, but cmake isn't
available to us.

Change-Id: I3f612604195212ba3a699c0b76785b5aa5f7925b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157391
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-09-29 03:50:42 +02:00
Kohei Yoshida a593e018d4 Upgrade liborcus to 0.19.0
Change-Id: I57b92a86a155f244742fd70b1ab9a1acbc206a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157345
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-09-29 01:46:30 +02:00
Kohei Yoshida 3c988ef450 Update liborcus to 0.18.1
Change-Id: I0439640789e59e4dd6e92d7f2975538de2f42f53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146826
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-02-11 23:04:29 +00:00
Kohei Yoshida 27653feb30 Just use std::variant and std::get
Change-Id: If467225fae07a9d33e324cac9ff32300d6c56534
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146151
Tested-by: Kohei Yoshida <kohei@libreoffice.org>
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-01-26 13:52:54 +00:00
Kohei Yoshida 516bc904e9 Upgrade mdds and orcus to 2.1.0 and 0.18.0, respectively
Change-Id: I288b5b54bd07d951bcc68afda7514bde730193dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146107
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2023-01-26 02:27:57 +00:00
Tor Lillqvist 5c355dbae8 Don't bother building the liborcus benchmark
It causes a problem when building with Emscripten and
--enable-wasm-exceptions. Instead of fixing that problem, just don't
bother building executables we won't run anyway. (Ideally liborcus
should have some --disable-benchmark configure options, ping Kohei.)

Change-Id: Ic8c1d51513793bba85dc2833cc8fd9ec5b97ce76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145645
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-17 07:56:42 +00:00
Balazs Varga 97ee126d69 WASM add Calc as optional build result, make it build & run
Adding new config option: --with-main-module=<writer/calc>
With this switcher we can build only WASM writer module or
calc module. The default value is 'writer'.

This commit also reverts: 26603bc9ef
(WASM fix orcus native exception handling (NEH))
Because Calc import is using liborcus for loading styles.xml.

Change-Id: I4c330ef8eea7d08214bf357531ee0bf7383ab788
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137946
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2022-10-14 09:21:30 +02:00
Mike Kaganski c2e86396b7 tdf#150247: patch orcus to use UTF-16 paths on Windows
This adds UTF8->UTF16 conversion of the paths passed to ctor of
file_content on Windows, since both boost::filesystem::file_size
and boost::interprocess::file_mapping take UTF-16 strings on this
platform. So the assumption is that 8-bit path strings passed to
orcus are UTF-8-encoded.

This partially reverts commit 75252e58d9
(it keeps use of osl_getThreadTextEncoding for platforms other than
Windows).

Change-Id: Ie467f71a65945f4f07ff432136ea06b811c3f794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137759
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-08-04 06:31:36 +02:00
Stephan Bergmann 8a456cc5e3 Fix typo
...that was present since 173214d920 "Fix liborcus
build for Android" (but doesn't seem to have caused issues all those years)

Change-Id: I70161f20a94655e8f485cd49bec9ce461c7507f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136563
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-28 15:45:54 +02:00
Stephan Bergmann 4178d7b221 Mark external/liborcus/overrun.patch.0 as upstreamed
Change-Id: Ibc77db49c7b584df1f5f3c086ecd479a28eb7797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136484
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-27 15:18:02 +02:00
Stephan Bergmann 3f17a643d0 external/liborcus: Fix heap-buffer-overflow
...as seen during CppunitTest_vcl_pdfexport:

> ==573913==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62b0001dba0e at pc 0x560576627186 bp 0x7ffeab9fa730 sp 0x7ffeab9f9ef0
> READ of size 26624 at 0x62b0001dba0e thread T0
>  #0 in StrtolFixAndCheck(void*, char const*, char**, char*, int) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:3629:3
>  #1 in strtol at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:485:3
>  #2 in orcus::sax_token_handler_wrapper_base::attribute(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) at workdir/UnpackedTarball/liborcus/src/parser/sax_token_parser.cpp:344:22
>  #3 in orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper::attribute(orcus::sax::parser_attribute const&) at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_ns_parser.hpp:212:27
>  #4 in orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::attribute() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:570:15
>  #5 in orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::declaration(char const*) at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:389:9
>  #6 in orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:242:13
>  #7 in orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::body() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:214:13
>  #8 in orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::parse() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_parser.hpp:182:5
>  #9 in orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::parse() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_ns_parser.hpp:277:14
>  #10 in orcus::sax_token_parser<orcus::xml_stream_handler>::parse() at workdir/UnpackedTarball/liborcus/src/liborcus/../../include/orcus/sax_token_parser.hpp:215:14
>  #11 in orcus::xml_stream_parser::parse() at workdir/UnpackedTarball/liborcus/src/liborcus/xml_stream_parser.cpp:68:9
>  #12 in orcus::orcus_xls_xml::detect(unsigned char const*, unsigned long) at workdir/UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml.cpp:94:16
>  #13 in orcus::detect(unsigned char const*, unsigned long) at workdir/UnpackedTarball/liborcus/src/liborcus/format_detection.cpp:68:9
>  #14 in (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) at sc/source/filter/orcus/filterdetect.cxx:83:31
> 0x62b0001dba0e is located 0 bytes to the right of 26638-byte region [0x62b0001d5200,0x62b0001dba0e)
> allocated by thread T0 here:
>  #0 in operator new[](unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:98:3
>  #1 in SvMemoryStream::AllocateMemory(unsigned long) at tools/source/stream/stream.cxx:1698:12
>  #2 in SvMemoryStream::SvMemoryStream(unsigned long, unsigned long) at tools/source/stream/stream.cxx:1544:9
>  #3 in (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) at sc/source/filter/orcus/filterdetect.cxx:71:20

This started to occur now after a95c585433 "Pump
XInputStream into an SvMemoryStream rather than an OStringBuffer" no longer
guarantees that the memory range passed into

  orcus::detect(const unsigned char* buffer, size_t length)

is followed by a null byte at buffer[length].  (There appears to be no
documentation for that function, but it looks unreasonable to me that it should
require callers to provide a buffer thus terminated, and I rather assume that
what is observed here is an orcus bug.)

The problematic calls of std::strtol were used in code apparently meant to parse
strings matching the XML VersionNum grammar production, and then store the two
dot-separated numbers each as uint8_t.  The new code using a local readUint8
accepts a different set of strings now than the original code using std::strtol,
but the new set is arguably closer to what the actual XML VersionNum grammar
production accepts (which is '1.' [0-9]+ for XML 1.0 and '1.1' for XML 1.1), so
this change should be OK.

Change-Id: I1668542c96ced64667cb9f251e79126e1a54ac30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136405
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-24 21:36:34 +02:00
Stephan Bergmann 1e51a325a8 Missing #include <stdint.h> in various external code
...which is a problem presumably since GCC 13 trunk
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6f038efd93593da6e661b829d1bd3877e75550f1>
"libstdc++: Avoid including <cstdint> for std::char_traits".  (All the broken
C++ code used unqualified uintptr_t etc. rather than std::uintptr_t etc., so I
deemed it more appropriate to include <stdint.h> rather than <cstdint>.)

Change-Id: Id9dfc383c5986126a425971c4557b90ac45ac963
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134760
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-23 12:08:30 +02:00
Luboš Luňák 1ffd6897dd try to use also proper debug LDFLAGS for externals libraries
This is basically ea68de2968 but
for LDFLAGS. A number of external libs cannot use this because
their libtool mishandles -fuse-ld.

Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-01 05:47:22 +02:00
Caolán McNamara 0b9892fee9 forcepoint#95 read past end of malformed document
Change-Id: I8b2c558c733af3d7662f668af47e962e252ee339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132311
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30 16:19:53 +02:00
Caolán McNamara 87259aef31 forcepoint#88 temp std::string assigned to std::string_view
Change-Id: I128a60b68a3af988e3a4bdb06994f43d9b18d67e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132102
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-25 14:48:43 +01:00
Caolán McNamara 32019baffa forcepoint#87 Assertion 'mp_char <= mp_end' failed
Change-Id: I434928cb2425a2e8eb9440dff67f52cda241b2d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132097
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-25 14:48:28 +01:00
Caolán McNamara 2323fa2961 forcepoint#83 forcepoint#84 update to upstream fix
Change-Id: I5add09b4379a1f86a720af75b758389424f4f50b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132055
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24 17:26:39 +01:00
Caolán McNamara d6a02a99ea forcepoint#84 Invalid read of size 1
Change-Id: I1d0d74940cfa78a3c88cee737c9535acf03e0f19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131991
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-24 10:28:43 +01:00
Caolán McNamara ee3e6c66ee forcepoint#83 Invalid read of size 1
Change-Id: I1576dfd8c9731d943107764aeb66bb1c2294ad5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131983
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-23 21:10:32 +01:00
Jan-Marek Glogowski 26603bc9ef WASM fix orcus native exception handling (NEH)
While this fixes the build with --enable-wasm-exceptions, the
resulting binary generates an "indirect call signature mismatch",
which doesn't happen with the non-NEH build.

The Chrome DWARF backtrace points to CallbackTaskScheduling().
Further debugging reveals, it's actually the UpdateMinPeriod
call for the "desktop::Desktop m_firstRunTimer" Timer.
Disturbingly the debug dynamic_cast<Timer> at the start of the
job loop fails, and the fallback generic job output is
chosen, AKA:

info:vcl.schedule: 6516 0x3871618  i: 0 a: 1 p: 1 \
    desktop::Desktop m_firstRunTimer

m_firstRunTimer is a Timer member in the Desktop class, so this
looks like some memory corruption or toolchain problem.

The size difference is more then 10% and it's supposed to be
faster too. FWIW the optimized link time is still high and needs
32GB+ memory compared to the 13GB non-optimized memory usage.

Change-Id: I06d37ecece09000fd3b72a73e7bf40f0b0f61457
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130216
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-02-20 20:43:57 +01:00
Jan-Marek Glogowski 4537886ec1 externals: always provide platform configure flags
No idea why we just provided the platform flags when cross-
compiling. In the curious case, where the host platform is
detected as x86_64-pc-mingw32 per default and we actually
want to override it with x86_64-pc-cygwin, we don't do a
cross compile, but must override the host platform.

But there is additional special handling needed for the omitted
cross-platform build in the special case of --host=i686-pc-cygwin
and --build=x86_64-pc-cygwin, where we deliberatly ignore cross
building; Windows is already a slow build, so try to keep this
optimization (AMD64 can execute x86 binaries).

There is the theoretical case, where the externals config.guess
would have detected something else and that "magically" even
worked, while the LO detected triplet would fail, but this
should be fixed in the external in any way.

Change-Id: Ib7a9719e0e406fe90334b7611dc3f01b51692bfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129153
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-31 10:31:04 +01:00
Kohei Yoshida aadbac5467 Update liborcus to 0.17.2.
Change-Id: I76c0d57da63c1e35f80b13071793dbbb27cb218a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126655
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2021-12-16 04:45:04 +01:00
Caolán McNamara 037d5454a3 crashtesting: crash on passing null to std::string_view
with many documents, e.g. moz377878-1.xhtml

https: //gitlab.com/orcus/orcus/-/merge_requests/113
Change-Id: I085543ebb28c02a1c0ec487b357f6e0a83004363
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125378
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-17 13:43:22 +01:00
Stephan Bergmann 7158acde77 Consolidate -D_GLIBCXX_DEBUG for --enable-dbgutil builds against libstdc++
(this was meant as a prerequisite for enabling its -D_LIBCPP_DEBUG=1 counterpart
when building against libc++ on macOS, but which got stalled for now after
running into the issue described at
<https://lists.llvm.org/pipermail/libcxx-dev/2021-October/001222.html>
"[libcxx-dev] Building a program with -D_LIBCPP_DEBUG=1 against a libc++ that is
not itself built with that define")

Change-Id: If466dce595a9311b2afbae41d5ddcaecc6f3c57b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124678
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-04 12:49:44 +01:00
Kohei Yoshida eb07a0e76f Upgrade mdds and liborcus to 2.0.0 and 0.17.0, respectively.
Change-Id: I9e856fc2d61f1789a6f1702514837860539a0f49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124573
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2021-11-03 21:17:18 +01:00
Jan-Marek Glogowski 8a4173987e WASM: add initial support for Emscripten cross build
- configure with:
- --host=wasm64-local-emscripten
- had to make a few externals optional, so adding:
  - --disable-nss
  - --disable-cmis
  - --disable-curl

Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-05 21:14:54 +02:00
Michael Stahl 1e7a8b7ff6 liborcus,zxing: add link to GCC bug
Change-Id: I9420e786c4050a9ae79f1deab76a43e62c3b15fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115031
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-03 13:21:15 +02:00
Michael Stahl aa38eede9d liborcus: newline problem with GCC 11 -E -fdirectives-only
ooxml_tokens.inl:3524:32: error: stray '#' in program

Change-Id: Ib7f50e1798e8c985f31a0338944ae1e9b439e98f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114975
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-01 20:42:35 +02:00
Luboš Luňák 6b7c2fa65e allow utf-8 in xml names (liborcus) (tdf#141672)
Change-Id: Ib150d55b588a572e4352396f18de2331983b2aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114892
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-30 11:23:36 +02:00
Stephan Bergmann a9976a958b external/liborcus: Missing includes
...as seen with recent GCC 11 trunk libstdc++:

> orcus_xlsx.cpp: In function ‘size_t orcus::{anonymous}::get_schema_rank(orcus::schema_t)’:
> orcus_xlsx.cpp:313:59: error: incomplete type ‘std::numeric_limits<long unsigned int>’ used in nested name specifier
>   313 |     return it == rank_map.end() ? numeric_limits<size_t>::max() : it->second;
>       |                                                           ^~~

etc.

Change-Id: If92cfb565ed9344b2ec1403793d7aeff8bd019ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104074
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-08 14:27:39 +02:00