From a593e018d4e3033ae95353a5ac3063a8c651a158 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 27 Sep 2023 22:15:22 -0400 Subject: 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 --- external/liborcus/Library_orcus-parser.mk | 1 - external/liborcus/Library_orcus.mk | 10 ++++-- external/liborcus/UnpackedTarball_liborcus.mk | 2 +- external/liborcus/fix-pch.patch.0 | 11 ------ external/liborcus/msvc-int-narrowing.patch.1 | 50 +++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 15 deletions(-) delete mode 100644 external/liborcus/fix-pch.patch.0 create mode 100644 external/liborcus/msvc-int-narrowing.patch.1 (limited to 'external') diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk index f26657756273..b7b459f36b7f 100644 --- a/external/liborcus/Library_orcus-parser.mk +++ b/external/liborcus/Library_orcus-parser.mk @@ -54,7 +54,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\ UnpackedTarball/liborcus/src/parser/json_parser_thread \ UnpackedTarball/liborcus/src/parser/parser_base \ UnpackedTarball/liborcus/src/parser/parser_global \ - UnpackedTarball/liborcus/src/parser/pstring \ UnpackedTarball/liborcus/src/parser/sax_parser_base \ UnpackedTarball/liborcus/src/parser/sax_token_parser \ UnpackedTarball/liborcus/src/parser/sax_token_parser_thread \ diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk index 785cd440aab1..28ef13612260 100644 --- a/external/liborcus/Library_orcus.mk +++ b/external/liborcus/Library_orcus.mk @@ -62,11 +62,15 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ UnpackedTarball/liborcus/src/liborcus/gnumeric_cell_context \ UnpackedTarball/liborcus/src/liborcus/gnumeric_context \ UnpackedTarball/liborcus/src/liborcus/gnumeric_detection_handler \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_filter_context \ UnpackedTarball/liborcus/src/liborcus/gnumeric_handler \ - UnpackedTarball/liborcus/src/liborcus/gnumeric_helper \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_names_context \ UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \ UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_styles_context \ UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_types \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_value_format_parser \ UnpackedTarball/liborcus/src/liborcus/info \ UnpackedTarball/liborcus/src/liborcus/interface \ UnpackedTarball/liborcus/src/liborcus/json_document_tree \ @@ -75,6 +79,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ UnpackedTarball/liborcus/src/liborcus/json_structure_tree \ UnpackedTarball/liborcus/src/liborcus/json_util \ UnpackedTarball/liborcus/src/liborcus/measurement \ + UnpackedTarball/liborcus/src/liborcus/number_utils \ UnpackedTarball/liborcus/src/liborcus/odf_document_styles_context \ UnpackedTarball/liborcus/src/liborcus/odf_helper \ UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \ @@ -114,7 +119,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ UnpackedTarball/liborcus/src/liborcus/string_helper \ UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_drawing_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_handler \ UnpackedTarball/liborcus/src/liborcus/xlsx_helper \ @@ -126,7 +130,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \ + UnpackedTarball/liborcus/src/liborcus/xlsx_shared_strings_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_sheet_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_styles_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_table_context \ UnpackedTarball/liborcus/src/liborcus/xlsx_types \ UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \ diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index ca4a40acf4e5..b8c44479765b 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -19,8 +19,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/rpath.patch.0 \ external/liborcus/gcc9.patch.0 \ external/liborcus/libtool.patch.0 \ - external/liborcus/fix-pch.patch.0 \ external/liborcus/liborcus_newline.patch.1 \ + external/liborcus/msvc-int-narrowing.patch.1 \ )) ifeq ($(OS),WNT) diff --git a/external/liborcus/fix-pch.patch.0 b/external/liborcus/fix-pch.patch.0 deleted file mode 100644 index 42a9d52d99f6..000000000000 --- a/external/liborcus/fix-pch.patch.0 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/liborcus/gnumeric_cell_context.cpp.sav 2018-05-27 18:18:56.000000000 +0200 -+++ src/liborcus/gnumeric_cell_context.cpp 2019-10-13 10:43:24.587258400 +0200 -@@ -248,7 +248,7 @@ - range.last.column = col + mp_cell_data->array_cols - 1; - range.last.row = row + mp_cell_data->array_rows - 1; - -- iface::import_array_formula* af = mp_sheet->get_array_formula(); -+ spreadsheet::iface::import_array_formula* af = mp_sheet->get_array_formula(); - if (af) - { - af->set_range(range); diff --git a/external/liborcus/msvc-int-narrowing.patch.1 b/external/liborcus/msvc-int-narrowing.patch.1 new file mode 100644 index 000000000000..1075cebfdef3 --- /dev/null +++ b/external/liborcus/msvc-int-narrowing.patch.1 @@ -0,0 +1,50 @@ +Fix + + error C2398: Element '2': conversion from 'int' to 'const std::basic_string_view>::size_type' + requires a narrowing conversion + +diff --git a/src/liborcus/gnumeric_value_format_parser.cpp b/src/liborcus/gnumeric_value_format_parser.cpp +index 822c1ba1..014068e9 100644 +--- a/src/liborcus/gnumeric_value_format_parser.cpp ++++ b/src/liborcus/gnumeric_value_format_parser.cpp +@@ -12,6 +12,10 @@ + #include + #include + ++#include ++ ++using boost::numeric_cast; ++ + namespace orcus { + + std::size_t gnumeric_value_format_parser::get_pos() const +@@ -41,7 +45,8 @@ void gnumeric_value_format_parser::segment() + if (pos != 2) + throw parse_error("value format segment is not formatted properly", get_pos()); + +- std::string_view s{p0, std::distance(p0, m_cur)}; ++ auto n = std::distance(p0, m_cur); ++ std::string_view s{p0, numeric_cast(n)}; + if (s.empty()) + throw parse_error("segment value is empty", get_pos()); + +@@ -51,7 +56,8 @@ void gnumeric_value_format_parser::segment() + } + case '=': + { +- std::string_view s{p0, std::distance(p0, m_cur)}; ++ auto n = std::distance(p0, m_cur); ++ std::string_view s{p0, numeric_cast(n)}; + seg.type = to_gnumeric_value_format_type(s); + if (seg.type == gnumeric_value_format_type::unknown) + { +@@ -65,7 +71,8 @@ void gnumeric_value_format_parser::segment() + } + case ':': + { +- std::string_view s{p0, std::distance(p0, m_cur)}; ++ auto n = std::distance(p0, m_cur); ++ std::string_view s{p0, numeric_cast(n)}; + + switch (pos) + { -- cgit