archrelease: copy trunk to testing-x86_64
[arch-packages.git] / libreoffice-still / trunk / mdds-2.0-and-orcus-0.17.diff
blob32fb4b7b7f2593822f36ca6d8b29b8a5a4a83e1c
1 From eb07a0e76fe240a184348d96a6cebf7c0a229ac0 Mon Sep 17 00:00:00 2001
2 From: Kohei Yoshida <kohei@libreoffice.org>
3 Date: Mon, 1 Nov 2021 14:01:22 -0400
4 Subject: Upgrade mdds and liborcus to 2.0.0 and 0.17.0, respectively.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Change-Id: I9e856fc2d61f1789a6f1702514837860539a0f49
10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124573
11 Tested-by: Jenkins
12 Tested-by: René Engelhard <rene@debian.org>
13 Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
14 ---
15 RepositoryExternal.mk | 4 +-
16 bin/oss-fuzz-setup.sh | 2 +-
17 configure.ac | 4 +-
18 cui/source/dialogs/AdditionsDialog.cxx | 62 +-
19 download.lst | 8 +-
20 external/liborcus/ExternalPackage_liborcus.mk | 8 +-
21 external/liborcus/ExternalProject_liborcus.mk | 4 +-
22 external/liborcus/Library_orcus-parser.mk | 1 +
23 external/liborcus/UnpackedTarball_liborcus.mk | 9 +-
24 external/liborcus/allow-utf-8-in-xml-names.patch | 301 -----
25 external/liborcus/boost-filesystem.patch.1 | 41 +
26 .../liborcus/inc/pch/precompiled_orcus-parser.hxx | 1 -
27 external/liborcus/inc/pch/precompiled_orcus.hxx | 1 -
28 external/liborcus/include.patch.0 | 30 -
29 external/liborcus/remove-unused-parameters.patch.1 | 1209 ++++++++++++++++++++
30 external/liborcus/std-get-busted.patch.1 | 418 +++++++
31 external/liborcus/unused-variables.patch.1 | 24 +
32 external/mdds/UnpackedTarball_mdds.mk | 6 +-
33 external/mdds/Wunused-but-set-variable.patch | 46 -
34 .../mdds/remove-more-unused-parameters.patch.1 | 42 +
35 external/mdds/remove-unused-parameters.patch.1 | 93 ++
36 sc/inc/mtvelements.hxx | 22 +-
37 sc/source/filter/inc/orcusinterface.hxx | 50 +-
38 sc/source/filter/orcus/interface.cxx | 97 +-
39 sc/source/filter/orcus/orcusfiltersimpl.cxx | 8 +-
40 sc/source/filter/orcus/xmlcontext.cxx | 10 +-
41 sfx2/source/control/emojiview.cxx | 11 +-
42 solenv/flatpak-manifest.in | 12 +-
43 28 files changed, 1973 insertions(+), 551 deletions(-)
44 delete mode 100644 external/liborcus/allow-utf-8-in-xml-names.patch
45 create mode 100644 external/liborcus/boost-filesystem.patch.1
46 delete mode 100644 external/liborcus/include.patch.0
47 create mode 100644 external/liborcus/remove-unused-parameters.patch.1
48 create mode 100644 external/liborcus/std-get-busted.patch.1
49 create mode 100644 external/liborcus/unused-variables.patch.1
50 delete mode 100644 external/mdds/Wunused-but-set-variable.patch
51 create mode 100644 external/mdds/remove-more-unused-parameters.patch.1
52 create mode 100644 external/mdds/remove-unused-parameters.patch.1
54 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
55 index c28b049caef8..a2a7212aa837 100644
56 --- a/RepositoryExternal.mk
57 +++ b/RepositoryExternal.mk
58 @@ -3329,7 +3329,7 @@ $(call gb_LinkTarget_set_include,$(1),\
61 $(call gb_LinkTarget_add_libs,$(1),\
62 - -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
63 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.17 \
66 $(if $(SYSTEM_BOOST), \
67 @@ -3348,7 +3348,7 @@ $(call gb_LinkTarget_set_include,$(1),\
70 $(call gb_LinkTarget_add_libs,$(1),\
71 - -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
72 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.17 \
75 endef
76 diff --git a/configure.ac b/configure.ac
77 index b8b3793b6204..a2a831da535a 100644
78 --- a/configure.ac
79 +++ b/configure.ac
80 @@ -10299,7 +10299,7 @@ AC_SUBST(SYSTEM_BOOST)
81 dnl ===================================================================
82 dnl Check for system mdds
83 dnl ===================================================================
84 -libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.5 >= 1.5.0], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
85 +libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-2.0 >= 2.0.0], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
87 dnl ===================================================================
88 dnl Check for system glm
89 @@ -10643,7 +10643,7 @@ AC_SUBST(ENABLE_FUZZERS)
90 dnl ===================================================================
91 dnl Orcus
92 dnl ===================================================================
93 -libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.16 >= 0.16.0])
94 +libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.17 >= 0.17.0])
95 if test "$with_system_orcus" != "yes"; then
96 if test "$SYSTEM_BOOST" = "TRUE"; then
97 # ===========================================================
98 diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx
99 index ac633177ef36..ec173740bc63 100644
100 --- a/cui/source/dialogs/AdditionsDialog.cxx
101 +++ b/cui/source/dialogs/AdditionsDialog.cxx
102 @@ -54,7 +54,6 @@
103 #include <orcus/json_document_tree.hpp>
104 #include <orcus/json_parser.hpp>
105 #include <orcus/config.hpp>
106 -#include <orcus/pstring.hpp>
108 #define PAGE_SIZE 30
110 @@ -158,62 +157,37 @@ void parseResponse(const std::string& rResponse, std::vector<AdditionInfo>& aAdd
113 AdditionInfo aNewAddition = {
114 - OStringToOUString(std::string_view(arrayElement.child("id").string_value().get()),
115 + OStringToOUString(arrayElement.child("id").string_value(), RTL_TEXTENCODING_UTF8),
116 + OStringToOUString(arrayElement.child("name").string_value(), RTL_TEXTENCODING_UTF8),
117 + OStringToOUString(arrayElement.child("author").string_value(),
118 RTL_TEXTENCODING_UTF8),
119 - OStringToOUString(std::string_view(arrayElement.child("name").string_value().get()),
120 + OStringToOUString(arrayElement.child("url").string_value(), RTL_TEXTENCODING_UTF8),
121 + OStringToOUString(arrayElement.child("screenshotURL").string_value(),
122 RTL_TEXTENCODING_UTF8),
123 - OStringToOUString(
124 - std::string_view(arrayElement.child("author").string_value().get()),
125 - RTL_TEXTENCODING_UTF8),
126 - OStringToOUString(std::string_view(arrayElement.child("url").string_value().get()),
127 + OStringToOUString(arrayElement.child("extensionIntroduction").string_value(),
128 + RTL_TEXTENCODING_UTF8),
129 + OStringToOUString(arrayElement.child("extensionDescription").string_value(),
130 RTL_TEXTENCODING_UTF8),
131 OStringToOUString(
132 - std::string_view(arrayElement.child("screenshotURL").string_value().get()),
133 + arrayElement.child("releases").child(0).child("compatibility").string_value(),
134 RTL_TEXTENCODING_UTF8),
135 OStringToOUString(
136 - std::string_view(
137 - arrayElement.child("extensionIntroduction").string_value().get()),
138 + arrayElement.child("releases").child(0).child("releaseName").string_value(),
139 RTL_TEXTENCODING_UTF8),
140 OStringToOUString(
141 - std::string_view(
142 - arrayElement.child("extensionDescription").string_value().get()),
143 + arrayElement.child("releases").child(0).child("license").string_value(),
144 RTL_TEXTENCODING_UTF8),
145 - OStringToOUString(std::string_view(arrayElement.child("releases")
146 - .child(0)
147 - .child("compatibility")
148 - .string_value()
149 - .get()),
150 + OStringToOUString(arrayElement.child("commentNumber").string_value(),
151 RTL_TEXTENCODING_UTF8),
152 - OStringToOUString(std::string_view(arrayElement.child("releases")
153 - .child(0)
154 - .child("releaseName")
155 - .string_value()
156 - .get()),
157 + OStringToOUString(arrayElement.child("commentURL").string_value(),
158 RTL_TEXTENCODING_UTF8),
159 - OStringToOUString(std::string_view(arrayElement.child("releases")
160 - .child(0)
161 - .child("license")
162 - .string_value()
163 - .get()),
164 + OStringToOUString(arrayElement.child("rating").string_value(),
165 + RTL_TEXTENCODING_UTF8),
166 + OStringToOUString(arrayElement.child("downloadNumber").string_value(),
167 RTL_TEXTENCODING_UTF8),
168 OStringToOUString(
169 - std::string_view(arrayElement.child("commentNumber").string_value().get()),
170 - RTL_TEXTENCODING_UTF8),
171 - OStringToOUString(
172 - std::string_view(arrayElement.child("commentURL").string_value().get()),
173 - RTL_TEXTENCODING_UTF8),
174 - OStringToOUString(
175 - std::string_view(arrayElement.child("rating").string_value().get()),
176 - RTL_TEXTENCODING_UTF8),
177 - OStringToOUString(
178 - std::string_view(arrayElement.child("downloadNumber").string_value().get()),
179 - RTL_TEXTENCODING_UTF8),
180 - OStringToOUString(std::string_view(arrayElement.child("releases")
181 - .child(0)
182 - .child("downloadURL")
183 - .string_value()
184 - .get()),
185 - RTL_TEXTENCODING_UTF8)
186 + arrayElement.child("releases").child(0).child("downloadURL").string_value(),
187 + RTL_TEXTENCODING_UTF8)
190 aAdditions.push_back(aNewAddition);
191 diff --git a/download.lst b/download.lst
192 index 561d4e5f5908..fc95d14dcc95 100644
193 --- a/download.lst
194 +++ b/download.lst
195 @@ -178,8 +178,8 @@ export LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
196 export LXML_TARBALL := lxml-4.1.1.tgz
197 export MARIADB_CONNECTOR_C_SHA256SUM := 431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
198 export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
199 -export MDDS_SHA256SUM := a66a2a8293a3abc6cd9baff7c236156e2666935cbfb69a15d64d38141638fecf
200 -export MDDS_TARBALL := mdds-1.7.0.tar.bz2
201 +export MDDS_SHA256SUM := 5a0fb2dd88a6420e0a69ec4c7259bcd1fe8f4a80b232c150e11f3da4c68236d7
202 +export MDDS_TARBALL := mdds-2.0.0.tar.bz2
203 export MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
204 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
205 export MSPUB_SHA256SUM := ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
206 @@ -204,8 +204,8 @@ export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
207 export OPENLDAP_TARBALL := openldap-2.4.59.tgz
208 export OPENSSL_SHA256SUM := 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
209 export OPENSSL_TARBALL := openssl-1.1.1l.tar.gz
210 -export ORCUS_SHA256SUM := c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f90a298587a4
211 -export ORCUS_TARBALL := liborcus-0.16.1.tar.bz2
212 +export ORCUS_SHA256SUM := 2ef9d2b5ee374c683cf631b78356b110510ab895788a68d778e225d8c4176d1b
213 +export ORCUS_TARBALL := liborcus-0.17.0.tar.bz2
214 export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
215 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
216 export PDFIUM_SHA256SUM := 26a03dd60e5ed0979cdaba9cc848242895110ddfdf347d40989ce2f14020f304
217 diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
218 index 747691809d2e..13d61a8fecbd 100644
219 --- a/external/liborcus/ExternalPackage_liborcus.mk
220 +++ b/external/liborcus/ExternalPackage_liborcus.mk
221 @@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
222 $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
224 ifeq ($(OS),MACOSX)
225 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.16.0.dylib,src/liborcus/.libs/liborcus-0.16.0.dylib))
226 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.16.0.dylib,src/parser/.libs/liborcus-parser-0.16.0.dylib))
227 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.17.0.dylib,src/liborcus/.libs/liborcus-0.17.0.dylib))
228 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.17.0.dylib,src/parser/.libs/liborcus-parser-0.17.0.dylib))
229 else ifeq ($(DISABLE_DYNLOADING),)
230 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.16.so.0,src/liborcus/.libs/liborcus-0.16.so.0.0.0))
231 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.16.so.0,src/parser/.libs/liborcus-parser-0.16.so.0.0.0))
232 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.17.so.0,src/liborcus/.libs/liborcus-0.17.so.0.0.0))
233 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.17.so.0,src/parser/.libs/liborcus-parser-0.17.so.0.0.0))
234 endif
236 # vim: set noet sw=4 ts=4:
237 diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
238 index c7dd76ebfee5..76a2a6afb1f2 100644
239 --- a/external/liborcus/ExternalProject_liborcus.mk
240 +++ b/external/liborcus/ExternalProject_liborcus.mk
241 @@ -123,8 +123,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
242 $(MAKE) \
243 $(if $(filter MACOSX,$(OS)),\
244 && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
245 - $(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.16.0.dylib \
246 - $(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.16.0.dylib \
247 + $(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.17.0.dylib \
248 + $(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.17.0.dylib \
251 $(call gb_Trace_EndRange,liborcus,EXTERNAL)
252 diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
253 index 4e46591b98fe..f26657756273 100644
254 --- a/external/liborcus/Library_orcus-parser.mk
255 +++ b/external/liborcus/Library_orcus-parser.mk
256 @@ -62,6 +62,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
257 UnpackedTarball/liborcus/src/parser/string_pool \
258 UnpackedTarball/liborcus/src/parser/tokens \
259 UnpackedTarball/liborcus/src/parser/types \
260 + UnpackedTarball/liborcus/src/parser/utf8 \
261 UnpackedTarball/liborcus/src/parser/xml_namespace \
262 UnpackedTarball/liborcus/src/parser/xml_writer \
263 UnpackedTarball/liborcus/src/parser/yaml_parser_base \
264 diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
265 index 710d126a8c17..3d2cec42e55e 100644
266 --- a/external/liborcus/UnpackedTarball_liborcus.mk
267 +++ b/external/liborcus/UnpackedTarball_liborcus.mk
268 @@ -29,12 +29,11 @@
269 external/liborcus/gcc9.patch.0 \
270 external/liborcus/libtool.patch.0 \
271 external/liborcus/fix-pch.patch.0 \
272 - external/liborcus/include.patch.0 \
273 external/liborcus/liborcus_newline.patch.1 \
276 -$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
277 - external/liborcus/allow-utf-8-in-xml-names.patch \
278 + external/liborcus/remove-unused-parameters.patch.1 \
279 + external/liborcus/unused-variables.patch.1 \
280 + external/liborcus/boost-filesystem.patch.1 \
281 + external/liborcus/std-get-busted.patch.1 \
282 external/liborcus/forcepoint-83.patch.1 \
283 external/liborcus/forcepoint-84.patch.1 \
284 external/liborcus/forcepoint-87.patch.1 \
285 diff --git a/external/liborcus/allow-utf-8-in-xml-names.patch b/external/liborcus/allow-utf-8-in-xml-names.patch
286 deleted file mode 100644
287 index e3430881053d..000000000000
288 --- a/external/liborcus/allow-utf-8-in-xml-names.patch
289 +++ /dev/null
290 @@ -1,301 +0,0 @@
291 -From fa9b6845ed583f5486372c6ffbc59e02a140d303 Mon Sep 17 00:00:00 2001
292 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@centrum.cz>
293 -Date: Thu, 29 Apr 2021 19:12:20 +0200
294 -Subject: [PATCH] allow utf-8 in xml names (#137)
296 -https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-NameStartChar
297 -has a list of all allowed characters.
298 ----
299 - include/orcus/sax_parser_base.hpp | 3 +
300 - src/orcus_test_xml.cpp | 1 +
301 - src/parser/sax_parser_base.cpp | 201 ++++++++++++++++++++++++++++--
302 - test/xml/non-ascii/check.txt | 4 +
303 - test/xml/non-ascii/input.xml | 4 +
304 - 5 files changed, 201 insertions(+), 12 deletions(-)
305 - create mode 100644 test/xml/non-ascii/check.txt
306 - create mode 100644 test/xml/non-ascii/input.xml
308 -diff --git a/include/orcus/sax_parser_base.hpp b/include/orcus/sax_parser_base.hpp
309 -index 9939e133..8394c07b 100644
310 ---- a/include/orcus/sax_parser_base.hpp
311 -+++ b/include/orcus/sax_parser_base.hpp
312 -@@ -218,6 +218,9 @@ protected:
313 - void element_name(parser_element& elem, std::ptrdiff_t begin_pos);
314 - void attribute_name(pstring& attr_ns, pstring& attr_name);
315 - void characters_with_encoded_char(cell_buffer& buf);
317 -+ int is_name_char();
318 -+ int is_name_start_char();
319 - };
321 - }}
322 -diff --git a/src/orcus_test_xml.cpp b/src/orcus_test_xml.cpp
323 -index 8a864d68..35f3dea7 100644
324 ---- a/src/orcus_test_xml.cpp
325 -+++ b/src/orcus_test_xml.cpp
326 -@@ -77,6 +77,7 @@ const char* sax_parser_test_dirs[] = {
327 - SRCDIR"/test/xml/no-decl-1/",
328 - SRCDIR"/test/xml/underscore-identifier/",
329 - SRCDIR"/test/xml/self-closing-root/",
330 -+ SRCDIR"/test/xml/non-ascii/",
331 - };
333 - const char* sax_parser_parse_only_test_dirs[] = {
334 -diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
335 -index 97aa34ec..db51ff94 100644
336 ---- a/src/parser/sax_parser_base.cpp
337 -+++ b/src/parser/sax_parser_base.cpp
338 -@@ -328,20 +328,182 @@ bool parser_base::value(pstring& str, bool decode)
339 - return transient_stream();
342 -+// https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-NameStartChar
343 -+// Return length of the character in bytes, otherwise 0.
344 -+template< bool only_start_name >
345 -+static
346 -+int is_name_char_helper(const char* mp_char, const char* mp_end)
348 -+ const unsigned char first = mp_char[0];
349 -+ // Note that ':' technically is an allowed name character, but it is handled separately
350 -+ // e.g. in element_name(), so here pretend it isn't.
351 -+ if (/*first == ':' ||*/ first == '_' || (first >= 'A' && first <= 'Z') || (first >= 'a' && first <= 'z'))
352 -+ return 1;
353 -+ if (!only_start_name && (first == '-' || first == '.' || (first >= '0' && first <= '9')))
354 -+ return 1;
356 -+ if (first < 0x7f) // other ascii characters are not allowed
357 -+ return 0;
358 -+ if (mp_end < mp_char + 1)
359 -+ return 0;
360 -+ const unsigned char second = mp_char[1];
362 -+ // 0xb7 = 0xc2 0xb7 utf-8
363 -+ if (!only_start_name && first == 0xc2 && second == 0xb7)
364 -+ return 2;
366 -+ // [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF]
367 -+ // 0xc0 = 0xc3 0x80 utf-8
368 -+ if (first < 0xc3)
369 -+ return 0;
370 -+ // xd7 = 0xc3 0x97 utf-8, 0xf7 = 0xc3 0xb7 utf-8
371 -+ if (first == 0xc3)
372 -+ return second >= 0x80 && second <= 0xff && second != 0x97 && second != 0xb7 ? 2 : 0;
373 -+ // 0x2ff = 0xcb 0xbf utf-8, 0x300 = 0xcc 0x80 utf-8
374 -+ if (first >= 0xc4 && first <= 0xcb)
375 -+ return 2;
377 -+ // [#x0300-#x036F]
378 -+ // 0x0300 = 0xcc 0x80 utf-8, 0x36f = 0xcd 0xaf utf-8
379 -+ if (!only_start_name && first == 0xcc)
380 -+ return 2;
381 -+ if (!only_start_name && first == 0xcd && second <= 0xaf)
382 -+ return 2;
384 -+ // [#x370-#x37D] | [#x37F-#x1FFF]
385 -+ // 0x370 = 0xcd 0xb0 utf-8, 0x37e = 0xcd 0xbe
386 -+ if (first < 0xcd)
387 -+ return 0;
388 -+ if (first == 0xcd)
389 -+ return second >= 0xb0 && second != 0xbe ? 2 : 0;
390 -+ // 0x07ff = 0xdf 0xbf utf-8 (the last 2-byte utf-8)
391 -+ if (first <= 0xdf)
392 -+ return 2;
394 -+ if (first < 0xe0)
395 -+ return 0;
396 -+ if (mp_end < mp_char + 2)
397 -+ return 0;
398 -+ const unsigned char third = mp_char[2];
400 -+ // 0x0800 = 0xe0 0xa0 0x80 utf-8, 0x1fff = 0xe1 0xbf 0xbf utf-8, 0x2000 = 0xe2 0x80 0x80
401 -+ if (first == 0xe0 || first == 0xe1)
402 -+ return 3;
404 -+ // [#x200C-#x200D]
405 -+ // 0x200c = 0xe2 0x80 0x8c utf-8, 0x200d = 0xe2 0x80 0x8d utf-8
406 -+ if (first < 0xe2)
407 -+ return 0;
408 -+ if (first == 0xe2 && second == 0x80 && (third == 0x8c || third == 0x8d))
409 -+ return 3;
411 -+ // [#x203F-#x2040]
412 -+ // 0x203f = 0xe2 0x80 0xbf utf-8, 0x2040 = 0xe2 0x81 0x80 utf-8
413 -+ if (!only_start_name && first == 0xe2 && second == 0x80 && third == 0xbf)
414 -+ return 3;
415 -+ if (!only_start_name && first == 0xe2 && second == 0x81 && third == 0x80)
416 -+ return 3;
418 -+ // [#x2070-#x218F]
419 -+ // 0x2070 = 0xe2 0x81 0xb0 utf-8, 0x218f = 0xe2 0x86 0x8f utf-8
420 -+ if (first == 0xe2)
421 -+ {
422 -+ if (second < 0x81)
423 -+ return 0;
424 -+ if (second >= 0x81 && second < 0x86)
425 -+ return 3;
426 -+ if (second == 0x86 && third <= 0x8f)
427 -+ return 3;
428 -+ }
430 -+ // [#x2C00-#x2FEF]
431 -+ // 0x2c00 = 0xe2 0xb0 0x80 utf-8, 0x2fef = 0xe2 0xbf 0xaf utf-8
432 -+ if (first == 0xe2)
433 -+ {
434 -+ if (second < 0xb0)
435 -+ return 0;
436 -+ if (second < 0xbf)
437 -+ return 3;
438 -+ if (second == 0xbf && third <= 0xaf)
439 -+ return 3;
440 -+ }
442 -+ // [#x3001-#xD7FF]
443 -+ // 0x3001 = 0xe3 0x80 0x81 utf-8, 0xd7ff = 0xed 0x9f 0xbf utf-8, 0xd800 = 0xed 0xa0 0x80 utf-8
444 -+ if (first < 0xe3)
445 -+ return 0;
446 -+ if (first < 0xed)
447 -+ return 3;
448 -+ if (first == 0xed && second <= 0x9f)
449 -+ return 3;
451 -+ // [#xF900-#xFDCF]
452 -+ // 0xf900 = 0xef 0xa4 0x80 utf-8, 0xfdcf = 0xef 0xb7 0x8f utf-8
453 -+ if (first == 0xef)
454 -+ {
455 -+ if (second < 0xa4)
456 -+ return 0;
457 -+ if (second < 0xb7)
458 -+ return 3;
459 -+ if (second == 0xb7 && third <= 0x8f)
460 -+ return 3;
461 -+ }
463 -+ // [#xFDF0-#xFFFD]
464 -+ // 0xfdf0 = 0xef 0xb7 0xb0 utf-8, 0xfffd = 0xef 0xbf 0xbd utf-8
465 -+ if (first == 0xef)
466 -+ {
467 -+ assert(second >= 0xb7);
468 -+ if (second == 0xb7 && third < 0xb0)
469 -+ return 0;
470 -+ if (second < 0xbe)
471 -+ return 3;
472 -+ if (second == 0xbf && third <= 0xbd)
473 -+ return 3;
474 -+ }
476 -+ if (first < 0xf0)
477 -+ return 0;
478 -+ if (mp_end < mp_char + 3)
479 -+ return 0;
480 -+ // const unsigned char fourth = mp_char[3];
482 -+ // [#x10000-#xEFFFF]
483 -+ // 0x10000 = 0xf0 0x90 0x80 0x80 utf-8, 0xeffff = 0xf3 0xaf 0xbf 0xbf utf-8,
484 -+ // 0xf0000 = 0xf3 0xb0 0x80 0x80 utf-8
485 -+ if (first >= 0xf0 && first < 0xf2)
486 -+ return 4;
487 -+ if (first == 0xf3 && second < 0xb0)
488 -+ return 4;
490 -+ return 0;
493 -+int parser_base::is_name_char()
495 -+ return is_name_char_helper<false>(mp_char, mp_end);
498 -+int parser_base::is_name_start_char()
500 -+ return is_name_char_helper<true>(mp_char, mp_end);
503 - void parser_base::name(pstring& str)
505 - const char* p0 = mp_char;
506 -- char c = cur_char();
507 -- if (!is_alpha(c) && c != '_')
508 -+ int skip = is_name_start_char();
509 -+ if (skip == 0)
511 - ::std::ostringstream os;
512 -- os << "name must begin with an alphabet, but got this instead '" << c << "'";
513 -+ os << "name must begin with an alphabet, but got this instead '" << cur_char() << "'";
514 - throw malformed_xml_error(os.str(), offset());
516 -+ next(skip);
518 - #if defined(__ORCUS_CPU_FEATURES) && defined(__SSE4_2__)
520 -- const __m128i match = _mm_loadu_si128((const __m128i*)"azAZ09--__");
521 -+ const __m128i match = _mm_loadu_si128((const __m128i*)"azAZ09--__..");
522 - const int mode = _SIDD_LEAST_SIGNIFICANT | _SIDD_CMP_RANGES | _SIDD_UBYTE_OPS | _SIDD_NEGATIVE_POLARITY;
524 - size_t n_total = available_size();
525 -@@ -351,20 +513,35 @@ void parser_base::name(pstring& str)
526 - __m128i char_block = _mm_loadu_si128((const __m128i*)mp_char);
528 - int n = std::min<size_t>(16u, n_total);
529 -- int r = _mm_cmpestri(match, 10, char_block, n, mode);
530 -+ int r = _mm_cmpestri(match, 12, char_block, n, mode);
531 - mp_char += r; // Move the current char position.
532 -+ n_total -= r;
534 -- if (r < 16)
535 -- // No need to move to the next segment. Stop here.
536 -- break;
537 -+ if (r < 16 && n_total)
538 -+ {
539 -+ // There is a character that does not match the SSE-based ASCII-only check.
540 -+ // It may either by an ascii character that is not allowed, in which case stop,
541 -+ // or it may possibly be an allowed utf-8 character, in which case move over it
542 -+ // using the slow function.
543 -+ skip = is_name_char();
544 -+ if(skip == 0)
545 -+ break;
546 -+ next(skip);
547 -+ n_total -= skip;
548 -+ }
550 -- // Skip 16 chars to the next segment.
551 -- n_total -= 16;
553 -+ cur_char_checked(); // check end of xml stream
555 - #else
556 -- while (is_alpha(c) || is_numeric(c) || is_name_char(c))
557 -- c = next_char_checked();
558 -+ for(;;)
559 -+ {
560 -+ cur_char_checked(); // check end of xml stream
561 -+ skip = is_name_char();
562 -+ if(skip == 0)
563 -+ break;
564 -+ next(skip);
565 -+ }
566 - #endif
568 - str = pstring(p0, mp_char-p0);
569 -diff --git a/test/xml/non-ascii/check.txt b/test/xml/non-ascii/check.txt
570 -new file mode 100644
571 -index 00000000..77b7c003
572 ---- /dev/null
573 -+++ b/test/xml/non-ascii/check.txt
574 -@@ -0,0 +1,4 @@
575 -+/Myšička
576 -+/Myšička@jméno="Žužla"
577 -+/Myšička/Nožičky
578 -+/Myšička/Nožičky"4"
579 -diff --git a/test/xml/non-ascii/input.xml b/test/xml/non-ascii/input.xml
580 -new file mode 100644
581 -index 00000000..c516744b
582 ---- /dev/null
583 -+++ b/test/xml/non-ascii/input.xml
584 -@@ -0,0 +1,4 @@
585 -+<?xml version="1.0" encoding="UTF-8"?>
586 -+<Myšička jméno="Žužla">
587 -+ <Nožičky>4</Nožičky>
588 -+</Myšička>
589 ---
590 -2.26.2
592 diff --git a/external/liborcus/boost-filesystem.patch.1 b/external/liborcus/boost-filesystem.patch.1
593 new file mode 100644
594 index 000000000000..14128b4e1c67
595 --- /dev/null
596 +++ b/external/liborcus/boost-filesystem.patch.1
597 @@ -0,0 +1,41 @@
598 +From e44737bad582fa2a05a23820e49d7930db710412 Mon Sep 17 00:00:00 2001
599 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
600 +Date: Tue, 2 Nov 2021 21:33:19 -0400
601 +Subject: [PATCH] Try using boost::filesystem instead of std::filesystem.
603 +std::filesystem still seems unreliable.
604 +---
605 + src/parser/stream.cpp | 6 +++---
606 + 1 file changed, 3 insertions(+), 3 deletions(-)
608 +diff --git a/src/parser/stream.cpp b/src/parser/stream.cpp
609 +index 09855300..00395f59 100644
610 +--- a/src/parser/stream.cpp
611 ++++ b/src/parser/stream.cpp
612 +@@ -17,12 +17,12 @@
613 + #include <locale>
614 + #include <codecvt>
615 + #include <iostream>
616 +-#include <filesystem>
618 ++#include <boost/filesystem.hpp>
619 + #include <boost/interprocess/file_mapping.hpp>
620 + #include <boost/interprocess/mapped_region.hpp>
622 +-namespace fs = std::filesystem;
623 ++namespace fs = boost::filesystem;
624 + namespace bip = boost::interprocess;
626 + namespace orcus {
627 +@@ -162,7 +162,7 @@ struct file_content::impl
628 + impl() : content_size(0), content(nullptr) {}
630 + impl(std::string_view filepath) :
631 +- content_size(fs::file_size(filepath)),
632 ++ content_size(fs::file_size(std::string{filepath}.c_str())),
633 + mapped_file(std::string{filepath}.c_str(), bip::read_only),
634 + mapped_region(mapped_file, bip::read_only, 0, content_size),
635 + content(nullptr)
636 +--
637 +2.25.1
639 diff --git a/external/liborcus/inc/pch/precompiled_orcus-parser.hxx b/external/liborcus/inc/pch/precompiled_orcus-parser.hxx
640 index 1427148445d1..a8047d5c9e0a 100644
641 --- a/external/liborcus/inc/pch/precompiled_orcus-parser.hxx
642 +++ b/external/liborcus/inc/pch/precompiled_orcus-parser.hxx
643 @@ -69,7 +69,6 @@
644 #include <orcus/json_parser_thread.hpp>
645 #include <orcus/parser_base.hpp>
646 #include <orcus/parser_global.hpp>
647 -#include <orcus/pstring.hpp>
648 #include <orcus/sax_parser_base.hpp>
649 #include <orcus/sax_token_parser.hpp>
650 #include <orcus/sax_token_parser_thread.hpp>
651 diff --git a/external/liborcus/inc/pch/precompiled_orcus.hxx b/external/liborcus/inc/pch/precompiled_orcus.hxx
652 index 9edb13aec79b..9543b44eb7c5 100644
653 --- a/external/liborcus/inc/pch/precompiled_orcus.hxx
654 +++ b/external/liborcus/inc/pch/precompiled_orcus.hxx
655 @@ -81,7 +81,6 @@
656 #include <orcus/orcus_xml.hpp>
657 #include <orcus/parser_base.hpp>
658 #include <orcus/parser_global.hpp>
659 -#include <orcus/pstring.hpp>
660 #include <orcus/sax_ns_parser.hpp>
661 #include <orcus/sax_parser.hpp>
662 #include <orcus/sax_parser_base.hpp>
663 diff --git a/external/liborcus/include.patch.0 b/external/liborcus/include.patch.0
664 deleted file mode 100644
665 index a3275b1b13fa..000000000000
666 --- a/external/liborcus/include.patch.0
667 +++ /dev/null
668 @@ -1,30 +0,0 @@
669 ---- src/liborcus/orcus_xlsx.cpp
670 -+++ src/liborcus/orcus_xlsx.cpp
671 -@@ -32,6 +32,7 @@
673 - #include <cstdlib>
674 - #include <iostream>
675 -+#include <limits>
676 - #include <string>
677 - #include <cstring>
678 - #include <sstream>
679 ---- src/liborcus/xls_xml_context.cpp
680 -+++ src/liborcus/xls_xml_context.cpp
681 -@@ -16,6 +16,7 @@
682 - #include <mdds/sorted_string_map.hpp>
684 - #include <iostream>
685 -+#include <limits>
687 - using namespace std;
688 - namespace ss = orcus::spreadsheet;
689 ---- src/liborcus/xlsx_revision_context.cpp
690 -+++ src/liborcus/xlsx_revision_context.cpp
691 -@@ -16,6 +16,7 @@
692 - #include "orcus/global.hpp"
694 - #include <iostream>
695 -+#include <limits>
697 - using namespace std;
699 diff --git a/external/liborcus/remove-unused-parameters.patch.1 b/external/liborcus/remove-unused-parameters.patch.1
700 new file mode 100644
701 index 000000000000..251ed804acaf
702 --- /dev/null
703 +++ b/external/liborcus/remove-unused-parameters.patch.1
704 @@ -0,0 +1,1209 @@
705 +From 5bb64db5ecfd1dc3be3304092f4bdebff54deae5 Mon Sep 17 00:00:00 2001
706 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
707 +Date: Tue, 2 Nov 2021 19:33:29 -0400
708 +Subject: [PATCH] Remove unused parameter warnings.
710 +---
711 + doc_example/json_parser_1.cpp | 4 +-
712 + ...preadsheet_doc_2_sheets_no_string_pool.cpp | 22 ++++-----
713 + .../spreadsheet_doc_2_sheets_with_formula.cpp | 47 +++++++++----------
714 + ...eadsheet_doc_2_sheets_with_string_pool.cpp | 40 +++++++---------
715 + doc_example/xml_mapping_1.cpp | 2 +-
716 + src/liborcus/css_document_tree.cpp | 3 ++
717 + src/liborcus/dom_tree.cpp | 2 +-
718 + src/liborcus/gnumeric_cell_context_test.cpp | 14 +++---
719 + src/liborcus/json_document_tree.cpp | 6 +--
720 + src/liborcus/json_structure_mapper.cpp | 2 +-
721 + src/liborcus/json_structure_tree.cpp | 4 +-
722 + src/liborcus/mock_spreadsheet.cpp | 14 +++---
723 + src/liborcus/ods_dde_links_context.cpp | 10 ++--
724 + src/liborcus/opc_context.cpp | 16 +++----
725 + src/liborcus/orcus_json.cpp | 4 +-
726 + src/liborcus/orcus_xml_map_def.cpp | 4 +-
727 + src/liborcus/spreadsheet_interface.cpp | 4 +-
728 + src/liborcus/xls_xml_context.cpp | 12 ++---
729 + src/liborcus/xls_xml_detection_handler.cpp | 2 +-
730 + src/liborcus/xlsx_drawing_context.cpp | 2 +-
731 + src/liborcus/xlsx_sheet_context.cpp | 2 +-
732 + src/liborcus/xlsx_sheet_context_test.cpp | 8 ++--
733 + src/liborcus/xlsx_table_context.cpp | 2 +-
734 + src/liborcus/xml_structure_tree.cpp | 6 +--
735 + src/liborcus/xpath_parser_test.cpp | 2 +-
736 + src/orcus_env_dump.cpp | 2 +-
737 + src/orcus_test_json_mapped.cpp | 2 +-
738 + src/orcus_test_xml.cpp | 2 +-
739 + src/orcus_test_xml_mapped.cpp | 2 +-
740 + src/parser/sax_token_parser_test.cpp | 2 +-
741 + src/parser/sax_token_parser_thread.cpp | 2 +-
742 + src/parser/utf8.cpp | 2 +-
743 + src/parser/utf8_test.cpp | 2 +-
744 + src/parser/xml_writer_test.cpp | 2 +-
745 + src/python/cell.cpp | 2 +-
746 + src/python/document.cpp | 4 +-
747 + src/python/formula_tokens.cpp | 2 +-
748 + src/python/global.cpp | 2 +-
749 + src/python/json.cpp | 4 +-
750 + src/python/named_expression.cpp | 2 +-
751 + src/python/named_expressions.cpp | 4 +-
752 + src/python/sheet.cpp | 6 +--
753 + src/python/sheet_rows.cpp | 2 +-
754 + src/spreadsheet/factory_sheet.cpp | 18 +++----
755 + src/spreadsheet/sheet_impl.cpp | 2 +-
756 + 45 files changed, 143 insertions(+), 157 deletions(-)
758 +diff --git a/doc_example/json_parser_1.cpp b/doc_example/json_parser_1.cpp
759 +index 6fc6de12..832e5176 100644
760 +--- a/doc_example/json_parser_1.cpp
761 ++++ b/doc_example/json_parser_1.cpp
762 +@@ -8,12 +8,12 @@ using namespace std;
763 + class json_parser_handler : public orcus::json_handler
765 + public:
766 +- void object_key(const char* p, size_t len, bool transient)
767 ++ void object_key(const char* p, size_t len, bool /*transient*/)
769 + cout << "object key: " << std::string_view(p, len) << endl;
772 +- void string(const char* p, size_t len, bool transient)
773 ++ void string(const char* p, size_t len, bool /*transient*/)
775 + cout << "string: " << std::string_view(p, len) << endl;
777 +diff --git a/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp b/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
778 +index 63ffacc3..0aa86caf 100644
779 +--- a/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
780 ++++ b/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
781 +@@ -64,22 +64,17 @@ public:
784 + // We don't implement these methods for now.
785 +- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
786 ++ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
788 +- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
789 ++ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
791 +- virtual void set_date_time(
792 +- ss::row_t row, ss::col_t col,
793 +- int year, int month, int day, int hour, int minute, double second) override {}
794 ++ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
796 +- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
797 ++ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
799 +- virtual void set_format(
800 +- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
801 +- std::size_t xf_index) override {}
802 ++ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
804 +- virtual void fill_down_cells(
805 +- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
806 ++ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
807 + };
808 + //!code-end: my_sheet
810 +@@ -89,14 +84,13 @@ class my_import_factory : public ss::iface::import_factory
811 + std::vector<std::unique_ptr<my_sheet>> m_sheets;
813 + public:
814 +- virtual ss::iface::import_sheet* append_sheet(
815 +- ss::sheet_t sheet_index, std::string_view name) override
816 ++ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
818 + m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size()));
819 + return m_sheets.back().get();
822 +- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
823 ++ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
825 + // TODO : implement this.
826 + return nullptr;
827 +diff --git a/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp b/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
828 +index 1c3f3d5b..11e1932e 100644
829 +--- a/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
830 ++++ b/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
831 +@@ -87,15 +87,15 @@ public:
832 + m_formula.grammar = grammar;
835 +- virtual void set_shared_formula_index(std::size_t index) override {}
836 ++ virtual void set_shared_formula_index(std::size_t) override {}
838 +- virtual void set_result_string(std::string_view value) override {}
839 ++ virtual void set_result_string(std::string_view) override {}
841 +- virtual void set_result_value(double value) override {}
842 ++ virtual void set_result_value(double) override {}
844 + virtual void set_result_empty() override {}
846 +- virtual void set_result_bool(bool value) override {}
847 ++ virtual void set_result_bool(bool) override {}
849 + virtual void commit() override
851 +@@ -154,22 +154,17 @@ public:
854 + // We don't implement these methods for now.
855 +- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
856 ++ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
858 +- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
859 ++ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
861 +- virtual void set_date_time(
862 +- ss::row_t row, ss::col_t col,
863 +- int year, int month, int day, int hour, int minute, double second) override {}
864 ++ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
866 +- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
867 ++ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
869 +- virtual void set_format(
870 +- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
871 +- std::size_t xf_index) override {}
872 ++ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
874 +- virtual void fill_down_cells(
875 +- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
876 ++ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
878 + virtual ss::iface::import_formula* get_formula() override
880 +@@ -208,21 +203,21 @@ public:
883 + // The following methods are for formatted text segments, which we ignore for now.
884 +- virtual void set_segment_bold(bool b) override {}
885 ++ virtual void set_segment_bold(bool) override {}
887 +- virtual void set_segment_font(std::size_t font_index) override {}
888 ++ virtual void set_segment_font(std::size_t) override {}
890 + virtual void set_segment_font_color(
891 +- ss::color_elem_t alpha,
892 +- ss::color_elem_t red,
893 +- ss::color_elem_t green,
894 +- ss::color_elem_t blue) override {}
895 ++ ss::color_elem_t,
896 ++ ss::color_elem_t,
897 ++ ss::color_elem_t,
898 ++ ss::color_elem_t) override {}
900 +- virtual void set_segment_font_name(std::string_view s) override {}
901 ++ virtual void set_segment_font_name(std::string_view) override {}
903 +- virtual void set_segment_font_size(double point) override {}
904 ++ virtual void set_segment_font_size(double) override {}
906 +- virtual void set_segment_italic(bool b) override {}
907 ++ virtual void set_segment_italic(bool) override {}
909 + virtual void append_segment(std::string_view s) override
911 +@@ -256,14 +251,14 @@ public:
912 + return &m_shared_strings;
915 +- virtual ss::iface::import_sheet* append_sheet(ss::sheet_t sheet_index, std::string_view name) override
916 ++ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
918 + // Pass the string pool to each sheet instance.
919 + m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size(), m_string_pool));
920 + return m_sheets.back().get();
923 +- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
924 ++ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
926 + // TODO : implement this.
927 + return nullptr;
928 +diff --git a/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp b/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
929 +index ff69c835..0153dd08 100644
930 +--- a/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
931 ++++ b/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
932 +@@ -70,22 +70,17 @@ public:
935 + // We don't implement these methods for now.
936 +- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
937 ++ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
939 +- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
940 ++ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
942 +- virtual void set_date_time(
943 +- ss::row_t row, ss::col_t col,
944 +- int year, int month, int day, int hour, int minute, double second) override {}
945 ++ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
947 +- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
948 ++ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
950 +- virtual void set_format(
951 +- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
952 +- std::size_t xf_index) override {}
953 ++ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
955 +- virtual void fill_down_cells(
956 +- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
957 ++ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
958 + };
960 + //!code-start: my_shared_strings
961 +@@ -119,21 +114,21 @@ public:
964 + // The following methods are for formatted text segments, which we ignore for now.
965 +- virtual void set_segment_bold(bool b) override {}
966 ++ virtual void set_segment_bold(bool) override {}
968 +- virtual void set_segment_font(std::size_t font_index) override {}
969 ++ virtual void set_segment_font(std::size_t) override {}
971 + virtual void set_segment_font_color(
972 +- ss::color_elem_t alpha,
973 +- ss::color_elem_t red,
974 +- ss::color_elem_t green,
975 +- ss::color_elem_t blue) override {}
976 ++ ss::color_elem_t,
977 ++ ss::color_elem_t,
978 ++ ss::color_elem_t,
979 ++ ss::color_elem_t) override {}
981 +- virtual void set_segment_font_name(std::string_view s) override {}
982 ++ virtual void set_segment_font_name(std::string_view) override {}
984 +- virtual void set_segment_font_size(double point) override {}
985 ++ virtual void set_segment_font_size(double) override {}
987 +- virtual void set_segment_italic(bool b) override {}
988 ++ virtual void set_segment_italic(bool) override {}
990 + virtual void append_segment(std::string_view s) override
992 +@@ -169,15 +164,14 @@ public:
993 + return &m_shared_strings;
996 +- virtual ss::iface::import_sheet* append_sheet(
997 +- ss::sheet_t sheet_index, std::string_view name) override
998 ++ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
1000 + // Pass the string pool to each sheet instance.
1001 + m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size(), m_string_pool));
1002 + return m_sheets.back().get();
1005 +- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
1006 ++ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
1008 + // TODO : implement this.
1009 + return nullptr;
1010 +diff --git a/doc_example/xml_mapping_1.cpp b/doc_example/xml_mapping_1.cpp
1011 +index f23d620c..33d6ff22 100644
1012 +--- a/doc_example/xml_mapping_1.cpp
1013 ++++ b/doc_example/xml_mapping_1.cpp
1014 +@@ -118,7 +118,7 @@ void run_xmlns_different_ns_same_alias()
1015 + cout << (alias_1 == alias_2 ? "same" : "different") << endl;
1018 +-int main(int argc, char** argv)
1019 ++int main()
1021 + run_xmlns_example();
1022 + run_xmlns_stacked();
1023 +diff --git a/src/liborcus/css_document_tree.cpp b/src/liborcus/css_document_tree.cpp
1024 +index 5f84c013..46bf7e91 100644
1025 +--- a/src/liborcus/css_document_tree.cpp
1026 ++++ b/src/liborcus/css_document_tree.cpp
1027 +@@ -54,6 +54,9 @@ public:
1029 + #if ORCUS_DEBUG_CSS_DOCTREE
1030 + cout << "@" << string(p, n).c_str();
1031 ++#else
1032 ++ (void)p;
1033 ++ (void)n;
1034 + #endif
1037 +diff --git a/src/liborcus/dom_tree.cpp b/src/liborcus/dom_tree.cpp
1038 +index 51db6ef8..64ecf8ef 100644
1039 +--- a/src/liborcus/dom_tree.cpp
1040 ++++ b/src/liborcus/dom_tree.cpp
1041 +@@ -527,7 +527,7 @@ void document_tree::impl::end_element(const sax_ns_parser_element& elem)
1042 + m_elem_stack.pop_back();
1045 +-void document_tree::impl::characters(const pstring& val, bool transient)
1046 ++void document_tree::impl::characters(const pstring& val, bool /*transient*/)
1048 + if (m_elem_stack.empty())
1049 + // No root element has been encountered. Ignore this.
1050 +diff --git a/src/liborcus/gnumeric_cell_context_test.cpp b/src/liborcus/gnumeric_cell_context_test.cpp
1051 +index fc543096..aeec16bd 100644
1052 +--- a/src/liborcus/gnumeric_cell_context_test.cpp
1053 ++++ b/src/liborcus/gnumeric_cell_context_test.cpp
1054 +@@ -41,19 +41,19 @@ public:
1055 + assert(formula == "=arrayFormula");
1058 +- virtual void set_result_bool(row_t row, col_t col, bool value) override
1059 ++ virtual void set_result_bool(row_t, col_t, bool) override
1063 +- virtual void set_result_empty(row_t row, col_t col) override
1064 ++ virtual void set_result_empty(row_t, col_t) override
1068 +- virtual void set_result_string(row_t row, col_t col, std::string_view) override
1069 ++ virtual void set_result_string(row_t, col_t, std::string_view) override
1073 +- virtual void set_result_value(row_t row, col_t col, double value) override
1074 ++ virtual void set_result_value(row_t, col_t, double) override
1078 +@@ -77,11 +77,11 @@ public:
1079 + assert(formula == "=formula");
1082 +- virtual void set_shared_formula_index(size_t index) override
1083 ++ virtual void set_shared_formula_index(size_t) override
1087 +- virtual void set_result_bool(bool value) override
1088 ++ virtual void set_result_bool(bool) override
1092 +@@ -93,7 +93,7 @@ public:
1096 +- virtual void set_result_value(double value) override
1097 ++ virtual void set_result_value(double) override
1101 +diff --git a/src/liborcus/json_document_tree.cpp b/src/liborcus/json_document_tree.cpp
1102 +index 4eedea47..c163a364 100644
1103 +--- a/src/liborcus/json_document_tree.cpp
1104 ++++ b/src/liborcus/json_document_tree.cpp
1105 +@@ -1217,7 +1217,7 @@ array::array(std::initializer_list<detail::init::node> vs)
1106 + array::~array() {}
1108 + object::object() {}
1109 +-object::object(object&& other) {}
1110 ++object::object(object&& /*other*/) {}
1111 + object::~object() {}
1113 + namespace {
1114 +@@ -1388,7 +1388,7 @@ struct node::impl
1115 + m_value_array(std::move(array.m_vs))
1116 + {}
1118 +- impl(json::object obj) :
1119 ++ impl(json::object /*obj*/) :
1120 + m_type(detail::node_t::object) {}
1121 + };
1123 +@@ -1634,7 +1634,7 @@ document_tree::document_tree(array vs) : mp_impl(std::make_unique<impl>())
1127 +-document_tree::document_tree(object obj) : mp_impl(std::make_unique<impl>())
1128 ++document_tree::document_tree(object /*obj*/) : mp_impl(std::make_unique<impl>())
1130 + mp_impl->m_root = mp_impl->m_res.obj_pool.construct(detail::node_t::object);
1131 + mp_impl->m_root->value.object = mp_impl->m_res.obj_pool_jvo.construct();
1132 +diff --git a/src/liborcus/json_structure_mapper.cpp b/src/liborcus/json_structure_mapper.cpp
1133 +index 111d1674..09a9e97e 100644
1134 +--- a/src/liborcus/json_structure_mapper.cpp
1135 ++++ b/src/liborcus/json_structure_mapper.cpp
1136 +@@ -40,7 +40,7 @@ void structure_mapper::push_range()
1137 + m_current_range.row_groups.clear();
1140 +-void structure_mapper::traverse(size_t pos)
1141 ++void structure_mapper::traverse(size_t /*pos*/)
1143 + json::structure_tree::node_properties node = m_walker.get_node();
1145 +diff --git a/src/liborcus/json_structure_tree.cpp b/src/liborcus/json_structure_tree.cpp
1146 +index 5c9d600c..3ae8ecc0 100644
1147 +--- a/src/liborcus/json_structure_tree.cpp
1148 ++++ b/src/liborcus/json_structure_tree.cpp
1149 +@@ -235,12 +235,12 @@ struct structure_tree::impl
1150 + push_value();
1153 +- void string(const char* p, size_t len, bool transient)
1154 ++ void string(const char* /*p*/, size_t /*len*/, bool /*transient*/)
1156 + push_value();
1159 +- void number(double val)
1160 ++ void number(double /*val*/)
1162 + push_value();
1164 +diff --git a/src/liborcus/mock_spreadsheet.cpp b/src/liborcus/mock_spreadsheet.cpp
1165 +index 3bde38ff..4042bdc9 100644
1166 +--- a/src/liborcus/mock_spreadsheet.cpp
1167 ++++ b/src/liborcus/mock_spreadsheet.cpp
1168 +@@ -211,22 +211,22 @@ import_formula::~import_formula()
1172 +-void import_formula::set_position(row_t row, col_t col)
1173 ++void import_formula::set_position(row_t, col_t)
1175 + assert(false);
1178 +-void import_formula::set_formula(formula_grammar_t grammar, std::string_view)
1179 ++void import_formula::set_formula(formula_grammar_t, std::string_view)
1181 + assert(false);
1184 +-void import_formula::set_shared_formula_index(size_t index)
1185 ++void import_formula::set_shared_formula_index(size_t)
1187 + assert(false);
1190 +-void import_formula::set_result_value(double value)
1191 ++void import_formula::set_result_value(double)
1193 + assert(false);
1195 +@@ -236,7 +236,7 @@ void import_formula::set_result_string(std::string_view)
1196 + assert(false);
1199 +-void import_formula::set_result_bool(bool value)
1200 ++void import_formula::set_result_bool(bool)
1202 + assert(false);
1204 +@@ -257,7 +257,7 @@ import_sheet::~import_sheet()
1208 +-void import_sheet::set_auto(row_t, col_t, std::string_view s)
1209 ++void import_sheet::set_auto(row_t, col_t, std::string_view)
1211 + assert(false);
1213 +@@ -292,7 +292,7 @@ void import_sheet::set_format(row_t, col_t, row_t, col_t, size_t)
1214 + assert(false);
1217 +-void import_sheet::fill_down_cells(row_t src_row, col_t src_col, row_t range_size)
1218 ++void import_sheet::fill_down_cells(row_t, col_t, row_t)
1220 + assert(false);
1222 +diff --git a/src/liborcus/ods_dde_links_context.cpp b/src/liborcus/ods_dde_links_context.cpp
1223 +index db7ab672..783b106f 100644
1224 +--- a/src/liborcus/ods_dde_links_context.cpp
1225 ++++ b/src/liborcus/ods_dde_links_context.cpp
1226 +@@ -14,21 +14,21 @@ ods_dde_links_context::ods_dde_links_context(session_context& session_cxt, const
1228 + ods_dde_links_context::~ods_dde_links_context() {}
1230 +-bool ods_dde_links_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
1231 ++bool ods_dde_links_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
1233 + return true;
1236 +-xml_context_base* ods_dde_links_context::create_child_context(xmlns_id_t ns, xml_token_t name)
1237 ++xml_context_base* ods_dde_links_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
1239 + return nullptr;
1242 +-void ods_dde_links_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
1243 ++void ods_dde_links_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
1247 +-void ods_dde_links_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t> &attrs)
1248 ++void ods_dde_links_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
1250 + xml_token_pair_t parent = push_stack(ns, name);
1251 + (void)parent;
1252 +@@ -41,7 +41,7 @@ bool ods_dde_links_context::end_element(xmlns_id_t ns, xml_token_t name)
1253 + return pop_stack(ns, name);
1256 +-void ods_dde_links_context::characters(const pstring &str, bool transient)
1257 ++void ods_dde_links_context::characters(const pstring& /*str*/, bool /*transient*/)
1261 +diff --git a/src/liborcus/opc_context.cpp b/src/liborcus/opc_context.cpp
1262 +index ef1a591f..d3cddabd 100644
1263 +--- a/src/liborcus/opc_context.cpp
1264 ++++ b/src/liborcus/opc_context.cpp
1265 +@@ -90,17 +90,17 @@ opc_content_types_context::~opc_content_types_context()
1269 +-bool opc_content_types_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
1270 ++bool opc_content_types_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
1272 + return true;
1275 +-xml_context_base* opc_content_types_context::create_child_context(xmlns_id_t ns, xml_token_t name)
1276 ++xml_context_base* opc_content_types_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
1278 + return nullptr;
1281 +-void opc_content_types_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
1282 ++void opc_content_types_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
1286 +@@ -153,7 +153,7 @@ bool opc_content_types_context::end_element(xmlns_id_t ns, xml_token_t name)
1287 + return pop_stack(ns, name);
1290 +-void opc_content_types_context::characters(const pstring &str, bool transient)
1291 ++void opc_content_types_context::characters(const pstring& /*str*/, bool /*transient*/)
1295 +@@ -256,17 +256,17 @@ opc_relations_context::~opc_relations_context()
1299 +-bool opc_relations_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
1300 ++bool opc_relations_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
1302 + return true;
1305 +-xml_context_base* opc_relations_context::create_child_context(xmlns_id_t ns, xml_token_t name)
1306 ++xml_context_base* opc_relations_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
1308 + return nullptr;
1311 +-void opc_relations_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
1312 ++void opc_relations_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
1316 +@@ -302,7 +302,7 @@ bool opc_relations_context::end_element(xmlns_id_t ns, xml_token_t name)
1317 + return pop_stack(ns, name);
1320 +-void opc_relations_context::characters(const pstring &str, bool transient)
1321 ++void opc_relations_context::characters(const pstring& /*str*/, bool /*transient*/)
1325 +diff --git a/src/liborcus/orcus_json.cpp b/src/liborcus/orcus_json.cpp
1326 +index 2b5967d5..69672190 100644
1327 +--- a/src/liborcus/orcus_json.cpp
1328 ++++ b/src/liborcus/orcus_json.cpp
1329 +@@ -137,7 +137,7 @@ public:
1330 + push_node(json_map_tree::input_node_type::object);
1333 +- void object_key(const char* p, size_t len, bool transient)
1334 ++ void object_key(const char* p, size_t len, bool /*transient*/)
1336 + m_walker.set_object_key(p, len);
1338 +@@ -168,7 +168,7 @@ public:
1339 + pop_node(json_map_tree::input_node_type::value);
1342 +- void string(const char* p, size_t len, bool transient)
1343 ++ void string(const char* p, size_t len, bool /*transient*/)
1345 + push_node(json_map_tree::input_node_type::value);
1346 + commit_value(json_value(p, len));
1347 +diff --git a/src/liborcus/orcus_xml_map_def.cpp b/src/liborcus/orcus_xml_map_def.cpp
1348 +index 4c70e060..889dbcb0 100644
1349 +--- a/src/liborcus/orcus_xml_map_def.cpp
1350 ++++ b/src/liborcus/orcus_xml_map_def.cpp
1351 +@@ -43,9 +43,9 @@ public:
1352 + xml_map_sax_handler(orcus_xml& app) : m_app(app) {}
1354 + void doctype(const sax::doctype_declaration&) {}
1355 +- void start_declaration(const pstring& name) {}
1356 ++ void start_declaration(const pstring& /*name*/) {}
1358 +- void end_declaration(const pstring& name)
1359 ++ void end_declaration(const pstring& /*name*/)
1361 + m_attrs.clear();
1363 +diff --git a/src/liborcus/spreadsheet_interface.cpp b/src/liborcus/spreadsheet_interface.cpp
1364 +index 87103233..985caf45 100644
1365 +--- a/src/liborcus/spreadsheet_interface.cpp
1366 ++++ b/src/liborcus/spreadsheet_interface.cpp
1367 +@@ -124,13 +124,13 @@ import_reference_resolver* import_factory::get_reference_resolver(formula_ref_co
1370 + import_pivot_cache_definition* import_factory::create_pivot_cache_definition(
1371 +- orcus::spreadsheet::pivot_cache_id_t cache_id)
1372 ++ orcus::spreadsheet::pivot_cache_id_t /*cache_id*/)
1374 + return nullptr;
1377 + import_pivot_cache_records* import_factory::create_pivot_cache_records(
1378 +- orcus::spreadsheet::pivot_cache_id_t cache_id)
1379 ++ orcus::spreadsheet::pivot_cache_id_t /*cache_id*/)
1381 + return nullptr;
1383 +diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp
1384 +index f5b8fe26..b2d6d398 100644
1385 +--- a/src/liborcus/xls_xml_context.cpp
1386 ++++ b/src/liborcus/xls_xml_context.cpp
1387 +@@ -90,17 +90,17 @@ xls_xml_data_context::xls_xml_data_context(
1389 + xls_xml_data_context::~xls_xml_data_context() {}
1391 +-bool xls_xml_data_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
1392 ++bool xls_xml_data_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
1394 + return true;
1397 +-xml_context_base* xls_xml_data_context::create_child_context(xmlns_id_t ns, xml_token_t name)
1398 ++xml_context_base* xls_xml_data_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
1400 + return nullptr;
1403 +-void xls_xml_data_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base* child)
1404 ++void xls_xml_data_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
1408 +@@ -254,7 +254,7 @@ void xls_xml_data_context::reset()
1411 + void xls_xml_data_context::start_element_data(
1412 +- const xml_token_pair_t& parent, const xml_attrs_t& attrs)
1413 ++ const xml_token_pair_t& /*parent*/, const xml_attrs_t& attrs)
1415 + m_cell_type = ct_unknown;
1416 + m_cell_string.clear();
1417 +@@ -776,7 +776,7 @@ xml_context_base* xls_xml_context::create_child_context(xmlns_id_t ns, xml_token
1418 + return nullptr;
1421 +-void xls_xml_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base* child)
1422 ++void xls_xml_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
1426 +@@ -1217,7 +1217,7 @@ void xls_xml_context::characters(const pstring& str, bool /*transient*/)
1430 +-void xls_xml_context::start_element_borders(const xml_token_pair_t& parent, const xml_attrs_t& attrs)
1431 ++void xls_xml_context::start_element_borders(const xml_token_pair_t& parent, const xml_attrs_t& /*attrs*/)
1433 + xml_element_expected(parent, NS_xls_xml_ss, XML_Style);
1434 + m_current_style->borders.clear();
1435 +diff --git a/src/liborcus/xls_xml_detection_handler.cpp b/src/liborcus/xls_xml_detection_handler.cpp
1436 +index aaa1b148..2b18c8ee 100644
1437 +--- a/src/liborcus/xls_xml_detection_handler.cpp
1438 ++++ b/src/liborcus/xls_xml_detection_handler.cpp
1439 +@@ -36,7 +36,7 @@ public:
1440 + return nullptr;
1443 +- virtual void start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& attrs)
1444 ++ virtual void start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
1446 + xml_token_pair_t parent = push_stack(ns, name);
1447 + if (ns == NS_xls_xml_ss)
1448 +diff --git a/src/liborcus/xlsx_drawing_context.cpp b/src/liborcus/xlsx_drawing_context.cpp
1449 +index f7dc31ab..380d7852 100644
1450 +--- a/src/liborcus/xlsx_drawing_context.cpp
1451 ++++ b/src/liborcus/xlsx_drawing_context.cpp
1452 +@@ -41,7 +41,7 @@ void xlsx_drawing_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*na
1456 +-void xlsx_drawing_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& attrs)
1457 ++void xlsx_drawing_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
1459 + xml_token_pair_t parent = push_stack(ns, name);
1461 +diff --git a/src/liborcus/xlsx_sheet_context.cpp b/src/liborcus/xlsx_sheet_context.cpp
1462 +index 669f604f..50018c32 100644
1463 +--- a/src/liborcus/xlsx_sheet_context.cpp
1464 ++++ b/src/liborcus/xlsx_sheet_context.cpp
1465 +@@ -845,7 +845,7 @@ void xlsx_sheet_context::push_raw_cell_value()
1468 + void xlsx_sheet_context::push_raw_cell_result(
1469 +- range_formula_results& res, size_t row_offset, size_t col_offset, xlsx_session_data& session_data) const
1470 ++ range_formula_results& res, size_t row_offset, size_t col_offset, xlsx_session_data& /*session_data*/) const
1472 + if (m_cur_value.empty())
1473 + return;
1474 +diff --git a/src/liborcus/xlsx_sheet_context_test.cpp b/src/liborcus/xlsx_sheet_context_test.cpp
1475 +index 9cb0d2a5..11ec8b71 100644
1476 +--- a/src/liborcus/xlsx_sheet_context_test.cpp
1477 ++++ b/src/liborcus/xlsx_sheet_context_test.cpp
1478 +@@ -64,19 +64,19 @@ public:
1479 + assert(formula == "A1:A2");
1482 +- virtual void set_result_bool(row_t row, col_t col, bool value) override
1483 ++ virtual void set_result_bool(row_t, col_t, bool) override
1487 +- virtual void set_result_empty(row_t row, col_t col) override
1488 ++ virtual void set_result_empty(row_t, col_t) override
1492 +- virtual void set_result_string(row_t row, col_t col, std::string_view) override
1493 ++ virtual void set_result_string(row_t, col_t, std::string_view) override
1497 +- virtual void set_result_value(row_t row, col_t col, double value) override
1498 ++ virtual void set_result_value(row_t, col_t, double) override
1502 +diff --git a/src/liborcus/xlsx_table_context.cpp b/src/liborcus/xlsx_table_context.cpp
1503 +index e135f44d..d8c360df 100644
1504 +--- a/src/liborcus/xlsx_table_context.cpp
1505 ++++ b/src/liborcus/xlsx_table_context.cpp
1506 +@@ -317,7 +317,7 @@ bool xlsx_table_context::end_element(xmlns_id_t ns, xml_token_t name)
1507 + return pop_stack(ns, name);
1510 +-void xlsx_table_context::characters(const pstring& str, bool transient)
1511 ++void xlsx_table_context::characters(const pstring& /*str*/, bool /*transient*/)
1515 +diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp
1516 +index 9eaf3c07..5185049e 100644
1517 +--- a/src/liborcus/xml_structure_tree.cpp
1518 ++++ b/src/liborcus/xml_structure_tree.cpp
1519 +@@ -125,11 +125,11 @@ public:
1521 + void doctype(const sax::doctype_declaration&) {}
1523 +- void start_declaration(const pstring& name)
1524 ++ void start_declaration(const pstring& /*name*/)
1528 +- void end_declaration(const pstring& name)
1529 ++ void end_declaration(const pstring& /*name*/)
1531 + m_attrs.clear();
1533 +@@ -185,7 +185,7 @@ public:
1534 + m_stack.push_back(ref);
1537 +- void end_element(const sax_ns_parser_element& elem)
1538 ++ void end_element(const sax_ns_parser_element& /*elem*/)
1540 + if (m_stack.empty())
1541 + throw general_error("Element stack is empty.");
1542 +diff --git a/src/liborcus/xpath_parser_test.cpp b/src/liborcus/xpath_parser_test.cpp
1543 +index 12242f62..f67c0dc6 100644
1544 +--- a/src/liborcus/xpath_parser_test.cpp
1545 ++++ b/src/liborcus/xpath_parser_test.cpp
1546 +@@ -64,7 +64,7 @@ void test_attributes()
1547 + assert(token.attribute);
1550 +-int main(int argc, char** argv)
1551 ++int main()
1553 + test_elements();
1554 + test_attributes();
1555 +diff --git a/src/orcus_env_dump.cpp b/src/orcus_env_dump.cpp
1556 +index ad60927a..99f53718 100644
1557 +--- a/src/orcus_env_dump.cpp
1558 ++++ b/src/orcus_env_dump.cpp
1559 +@@ -13,7 +13,7 @@
1560 + using std::cout;
1561 + using std::endl;
1563 +-int main(int argc, char** argv)
1564 ++int main()
1566 + cout << "CPU flags:" << endl;
1567 + cout << " SSE 4.2: " << orcus::detail::cpu::has_sse42() << endl;
1568 +diff --git a/src/orcus_test_json_mapped.cpp b/src/orcus_test_json_mapped.cpp
1569 +index ed10a842..c504e156 100644
1570 +--- a/src/orcus_test_json_mapped.cpp
1571 ++++ b/src/orcus_test_json_mapped.cpp
1572 +@@ -88,7 +88,7 @@ void test_invalid_map_definition()
1576 +-int main(int argc, char** argv)
1577 ++int main()
1579 + test_mapped_json_import();
1580 + test_invalid_map_definition();
1581 +diff --git a/src/orcus_test_xml.cpp b/src/orcus_test_xml.cpp
1582 +index 2a44a8ac..de5197cf 100644
1583 +--- a/src/orcus_test_xml.cpp
1584 ++++ b/src/orcus_test_xml.cpp
1585 +@@ -85,7 +85,7 @@ const char* sax_parser_parse_only_test_dirs[] = {
1586 + SRCDIR"/test/xml/parse-only/rss/"
1587 + };
1589 +-void parse_file(dom::document_tree& tree, const char* filepath, string& strm)
1590 ++void parse_file(dom::document_tree& tree, const char* filepath, std::string& /*strm*/)
1592 + cout << "testing " << filepath << endl;
1593 + file_content content(filepath);
1594 +diff --git a/src/orcus_test_xml_mapped.cpp b/src/orcus_test_xml_mapped.cpp
1595 +index b90ea020..8e18cfda 100644
1596 +--- a/src/orcus_test_xml_mapped.cpp
1597 ++++ b/src/orcus_test_xml_mapped.cpp
1598 +@@ -66,7 +66,7 @@ void test_mapped_xml_import()
1599 + { SRCDIR"/test/xml-mapped/nested-repeats-4", false },
1600 + };
1602 +- auto dump_xml_structure = [](string& dump_content, string& strm, const char* filepath, xmlns_context& cxt)
1603 ++ auto dump_xml_structure = [](std::string& dump_content, std::string& /*strm*/, const char* filepath, xmlns_context& cxt)
1605 + file_content content(filepath);
1606 + dom::document_tree tree(cxt);
1607 +diff --git a/src/parser/sax_token_parser_test.cpp b/src/parser/sax_token_parser_test.cpp
1608 +index 2647444c..6ff8c932 100644
1609 +--- a/src/parser/sax_token_parser_test.cpp
1610 ++++ b/src/parser/sax_token_parser_test.cpp
1611 +@@ -146,7 +146,7 @@ void test_unicode_string()
1615 +- void characters(std::string_view val, bool transient)
1616 ++ void characters(std::string_view val, bool /*transient*/)
1618 + std::cout << "charachters:" << std::endl;
1619 + std::cout << val << std::endl;
1620 +diff --git a/src/parser/sax_token_parser_thread.cpp b/src/parser/sax_token_parser_thread.cpp
1621 +index b9166e3c..d21ae6d7 100644
1622 +--- a/src/parser/sax_token_parser_thread.cpp
1623 ++++ b/src/parser/sax_token_parser_thread.cpp
1624 +@@ -86,7 +86,7 @@ struct parser_thread::impl
1625 + m_token_buffer.abort();
1628 +- void declaration(const orcus::xml_declaration_t& decl)
1629 ++ void declaration(const orcus::xml_declaration_t& /*decl*/)
1633 +diff --git a/src/parser/utf8.cpp b/src/parser/utf8.cpp
1634 +index f3b264a7..e02d2244 100644
1635 +--- a/src/parser/utf8.cpp
1636 ++++ b/src/parser/utf8.cpp
1637 +@@ -231,7 +231,7 @@ bool parse_3b_second_char(uint8_t c1, uint8_t c2, uint8_t c3)
1640 + // [#x10000-#xEFFFF]: F0 90 80 80 -> F3 AF BF BF
1641 +-bool parse_4b_char(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4)
1642 ++bool parse_4b_char(uint8_t c1, uint8_t c2, uint8_t /*c3*/, uint8_t /*c4*/)
1644 + // F0 90 80 80 -> F3 AF BF BF
1645 + // - F0 90 xx xx -> F0 xx xx xx
1646 +diff --git a/src/parser/utf8_test.cpp b/src/parser/utf8_test.cpp
1647 +index 78b7656a..88dcd3e8 100644
1648 +--- a/src/parser/utf8_test.cpp
1649 ++++ b/src/parser/utf8_test.cpp
1650 +@@ -159,7 +159,7 @@ void test_xml_name_char()
1651 + assert(res);
1654 +-int main(int argc, char** argv)
1655 ++int main()
1657 + test_xml_name_start_char();
1658 + test_xml_name_char();
1659 +diff --git a/src/parser/xml_writer_test.cpp b/src/parser/xml_writer_test.cpp
1660 +index e5a22357..8687db32 100644
1661 +--- a/src/parser/xml_writer_test.cpp
1662 ++++ b/src/parser/xml_writer_test.cpp
1663 +@@ -28,7 +28,7 @@ void test_encoded_content()
1665 + std::ostringstream os_content;
1667 +- void characters(std::string_view val, bool transient)
1668 ++ void characters(std::string_view val, bool /*transient*/)
1670 + os_content << val;
1672 +diff --git a/src/python/cell.cpp b/src/python/cell.cpp
1673 +index 536b5c4d..16374b8f 100644
1674 +--- a/src/python/cell.cpp
1675 ++++ b/src/python/cell.cpp
1676 +@@ -115,7 +115,7 @@ int tp_init(pyobj_cell* self, PyObject* args, PyObject* kwargs)
1677 + return 0;
1680 +-PyObject* cell_get_formula_tokens(PyObject* self, PyObject* args, PyObject* kwargs)
1681 ++PyObject* cell_get_formula_tokens(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1683 + pyobj_cell* obj = reinterpret_cast<pyobj_cell*>(self);
1684 + cell_data& data = *obj->data;
1685 +diff --git a/src/python/document.cpp b/src/python/document.cpp
1686 +index b06463bc..02a2dc49 100644
1687 +--- a/src/python/document.cpp
1688 ++++ b/src/python/document.cpp
1689 +@@ -69,12 +69,12 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
1690 + return reinterpret_cast<PyObject*>(self);
1693 +-int tp_init(pyobj_document* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1694 ++int tp_init(pyobj_document* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
1696 + return 0;
1699 +-PyObject* doc_get_named_expressions(PyObject* self, PyObject* args, PyObject* kwargs)
1700 ++PyObject* doc_get_named_expressions(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1702 + const ss::document& doc = *t(self)->data->m_doc;
1703 + const ixion::model_context& cxt = doc.get_model_context();
1704 +diff --git a/src/python/formula_tokens.cpp b/src/python/formula_tokens.cpp
1705 +index 569d1a7a..3eece2d4 100644
1706 +--- a/src/python/formula_tokens.cpp
1707 ++++ b/src/python/formula_tokens.cpp
1708 +@@ -56,7 +56,7 @@ void tp_dealloc(pyobj_formula_tokens* self)
1709 + Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
1712 +-int tp_init(pyobj_formula_tokens* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1713 ++int tp_init(pyobj_formula_tokens* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
1715 + return 0;
1717 +diff --git a/src/python/global.cpp b/src/python/global.cpp
1718 +index 7a21f960..f8623e0d 100644
1719 +--- a/src/python/global.cpp
1720 ++++ b/src/python/global.cpp
1721 +@@ -16,7 +16,7 @@ void set_python_exception(PyObject* type, const std::exception& e)
1723 + std::ostringstream os;
1724 + os << "C++ exception caught: " << e.what();
1725 +- PyErr_SetString(PyExc_RuntimeError, os.str().data());
1726 ++ PyErr_SetString(type, os.str().data());
1729 + PyObject* get_python_enum_value(const char* enum_class_name, const char* value_name)
1730 +diff --git a/src/python/json.cpp b/src/python/json.cpp
1731 +index fdeea10c..f22cf666 100644
1732 +--- a/src/python/json.cpp
1733 ++++ b/src/python/json.cpp
1734 +@@ -177,7 +177,7 @@ public:
1738 +- void object_key(const char* p, size_t len, bool transient)
1739 ++ void object_key(const char* p, size_t len, bool /*transient*/)
1741 + parser_stack& cur = m_stack.back();
1742 + cur.key = PyUnicode_FromStringAndSize(p, len);
1743 +@@ -213,7 +213,7 @@ public:
1744 + push_value(Py_None);
1747 +- void string(const char* p, size_t len, bool transient)
1748 ++ void string(const char* p, size_t len, bool /*transient*/)
1750 + push_value(PyUnicode_FromStringAndSize(p, len));
1752 +diff --git a/src/python/named_expression.cpp b/src/python/named_expression.cpp
1753 +index 8edeeacf..1402daa0 100644
1754 +--- a/src/python/named_expression.cpp
1755 ++++ b/src/python/named_expression.cpp
1756 +@@ -81,7 +81,7 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
1757 + return reinterpret_cast<PyObject*>(self);
1760 +-PyObject* ne_get_formula_tokens(PyObject* self, PyObject* args, PyObject* kwargs)
1761 ++PyObject* ne_get_formula_tokens(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1763 + named_exp_data& data = *t(self)->data;
1764 + if (!data.tokens)
1765 +diff --git a/src/python/named_expressions.cpp b/src/python/named_expressions.cpp
1766 +index 235389ac..6faffee5 100644
1767 +--- a/src/python/named_expressions.cpp
1768 ++++ b/src/python/named_expressions.cpp
1769 +@@ -44,7 +44,7 @@ inline pyobj_named_exps* t(PyObject* self)
1770 + return reinterpret_cast<pyobj_named_exps*>(self);
1773 +-PyObject* named_exps_names(PyObject* self, PyObject* args, PyObject* kwargs)
1774 ++PyObject* named_exps_names(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1776 + named_exps_data& data = *t(self)->data;
1777 + PyObject* s = PySet_New(nullptr);
1778 +@@ -64,7 +64,7 @@ void tp_dealloc(pyobj_named_exps* self)
1779 + Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
1782 +-int tp_init(pyobj_named_exps* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1783 ++int tp_init(pyobj_named_exps* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
1785 + return 0;
1787 +diff --git a/src/python/sheet.cpp b/src/python/sheet.cpp
1788 +index 0ccc39bd..38b96241 100644
1789 +--- a/src/python/sheet.cpp
1790 ++++ b/src/python/sheet.cpp
1791 +@@ -85,12 +85,12 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
1792 + return reinterpret_cast<PyObject*>(self);
1795 +-int tp_init(pyobj_sheet* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1796 ++int tp_init(pyobj_sheet* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
1798 + return 0;
1801 +-PyObject* sheet_get_rows(PyObject* self, PyObject* args, PyObject* kwargs)
1802 ++PyObject* sheet_get_rows(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1804 + PyTypeObject* sr_type = get_sheet_rows_type();
1806 +@@ -210,7 +210,7 @@ PyObject* sheet_write(PyObject* self, PyObject* args, PyObject* kwargs)
1807 + return Py_None;
1810 +-PyObject* sheet_get_named_expressions(PyObject* self, PyObject* args, PyObject* kwargs)
1811 ++PyObject* sheet_get_named_expressions(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1813 + const ss::document& doc = *t(self)->data->m_doc;
1814 + ss::sheet_t si = t(self)->data->m_sheet->get_index();
1815 +diff --git a/src/python/sheet_rows.cpp b/src/python/sheet_rows.cpp
1816 +index 7fa869ea..be495894 100644
1817 +--- a/src/python/sheet_rows.cpp
1818 ++++ b/src/python/sheet_rows.cpp
1819 +@@ -49,7 +49,7 @@ PyObject* sheet_rows_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwa
1820 + return reinterpret_cast<PyObject*>(self);
1823 +-int sheet_rows_init(pyobj_sheet_rows* self, PyObject* /*args*/, PyObject* /*kwargs*/)
1824 ++int sheet_rows_init(pyobj_sheet_rows* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
1826 + return 0;
1828 +diff --git a/src/spreadsheet/factory_sheet.cpp b/src/spreadsheet/factory_sheet.cpp
1829 +index 3e04295c..61541174 100644
1830 +--- a/src/spreadsheet/factory_sheet.cpp
1831 ++++ b/src/spreadsheet/factory_sheet.cpp
1832 +@@ -74,19 +74,19 @@ void import_data_table::reset()
1836 +-void import_data_table::set_type(data_table_type_t type)
1837 ++void import_data_table::set_type(data_table_type_t /*type*/)
1841 +-void import_data_table::set_range(const range_t& range)
1842 ++void import_data_table::set_range(const range_t& /*range*/)
1846 +-void import_data_table::set_first_reference(std::string_view ref, bool deleted)
1847 ++void import_data_table::set_first_reference(std::string_view /*ref*/, bool /*deleted*/)
1851 +-void import_data_table::set_second_reference(std::string_view ref, bool deleted)
1852 ++void import_data_table::set_second_reference(std::string_view /*ref*/, bool /*deleted*/)
1856 +@@ -193,7 +193,7 @@ void import_array_formula::set_range(const range_t& range)
1860 +-void import_array_formula::set_formula(formula_grammar_t grammar, std::string_view formula)
1861 ++void import_array_formula::set_formula(formula_grammar_t /*grammar*/, std::string_view formula)
1863 + const ixion::formula_name_resolver* resolver =
1864 + m_doc.get_formula_name_resolver(spreadsheet::formula_ref_context_t::global);
1865 +@@ -223,12 +223,12 @@ void import_array_formula::set_result_value(row_t row, col_t col, double value)
1866 + m_result_mtx.set(row, col, value);
1869 +-void import_array_formula::set_result_string(row_t row, col_t col, std::string_view value)
1870 ++void import_array_formula::set_result_string(row_t /*row*/, col_t /*col*/, std::string_view /*value*/)
1872 + // TODO : handle this
1875 +-void import_array_formula::set_result_empty(row_t row, col_t col)
1876 ++void import_array_formula::set_result_empty(row_t /*row*/, col_t /*col*/)
1878 + // TODO : handle this
1880 +@@ -282,7 +282,7 @@ void import_formula::set_position(row_t row, col_t col)
1881 + m_col = col;
1884 +-void import_formula::set_formula(formula_grammar_t grammar, std::string_view formula)
1885 ++void import_formula::set_formula(formula_grammar_t /*grammar*/, std::string_view formula)
1887 + if (m_row < 0 || m_col < 0)
1888 + return;
1889 +@@ -331,7 +331,7 @@ void import_formula::set_result_string(std::string_view value)
1892 + void import_formula::set_result_empty() {}
1893 +-void import_formula::set_result_bool(bool value) {}
1894 ++void import_formula::set_result_bool(bool /*value*/) {}
1896 + void import_formula::commit()
1898 +diff --git a/src/spreadsheet/sheet_impl.cpp b/src/spreadsheet/sheet_impl.cpp
1899 +index 72e521c5..c2e7ecb6 100644
1900 +--- a/src/spreadsheet/sheet_impl.cpp
1901 ++++ b/src/spreadsheet/sheet_impl.cpp
1902 +@@ -12,7 +12,7 @@
1904 + namespace orcus { namespace spreadsheet {
1906 +-sheet_impl::sheet_impl(document& doc, sheet& sh, sheet_t sheet_index) :
1907 ++sheet_impl::sheet_impl(document& doc, sheet& /*sh*/, sheet_t sheet_index) :
1908 + m_doc(doc),
1909 + m_col_widths(0, m_doc.get_sheet_size().columns, get_default_column_width()),
1910 + m_row_heights(0, m_doc.get_sheet_size().rows, get_default_row_height()),
1911 +--
1912 +2.25.1
1914 diff --git a/external/liborcus/std-get-busted.patch.1 b/external/liborcus/std-get-busted.patch.1
1915 new file mode 100644
1916 index 000000000000..40b839f65f47
1917 --- /dev/null
1918 +++ b/external/liborcus/std-get-busted.patch.1
1919 @@ -0,0 +1,418 @@
1920 +From f917ed284c52ae12fb0d752c17141f355158470e Mon Sep 17 00:00:00 2001
1921 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
1922 +Date: Tue, 2 Nov 2021 22:07:51 -0400
1923 +Subject: [PATCH] std::get<T>(...) may be flaky with some version of clang.
1925 +As workaround, use boost::variant and boost::get.
1927 +c.f. https://stackoverflow.com/questions/52521388/stdvariantget-does-not-compile-with-apple-llvm-10-0
1928 +---
1929 + include/orcus/config.hpp | 4 ++--
1930 + include/orcus/css_selector.hpp | 5 +++--
1931 + include/orcus/json_parser_thread.hpp | 4 ++--
1932 + include/orcus/sax_token_parser_thread.hpp | 5 +++--
1933 + include/orcus/spreadsheet/pivot.hpp | 7 ++++---
1934 + include/orcus/threaded_json_parser.hpp | 8 ++++----
1935 + include/orcus/threaded_sax_token_parser.hpp | 8 ++++----
1936 + src/liborcus/css_document_tree.cpp | 2 +-
1937 + src/liborcus/css_selector.cpp | 12 ++++++------
1938 + src/liborcus/orcus_csv.cpp | 4 ++--
1939 + src/orcus_csv_main.cpp | 2 +-
1940 + src/orcus_test_csv.cpp | 8 ++++----
1941 + src/orcus_test_xlsx.cpp | 4 ++--
1942 + src/parser/json_parser_thread.cpp | 8 ++++----
1943 + src/python/sheet_rows.cpp | 3 +++
1944 + 15 files changed, 45 insertions(+), 39 deletions(-)
1946 +diff --git a/include/orcus/config.hpp b/include/orcus/config.hpp
1947 +index 17743e6a..fe9a7d81 100644
1948 +--- a/include/orcus/config.hpp
1949 ++++ b/include/orcus/config.hpp
1950 +@@ -12,7 +12,7 @@
1951 + #include "orcus/types.hpp"
1953 + #include <string>
1954 +-#include <variant>
1955 ++#include <boost/variant.hpp>
1957 + namespace orcus {
1959 +@@ -37,7 +37,7 @@ struct ORCUS_DLLPUBLIC config
1960 + };
1962 + // TODO: add config for other formats as needed.
1963 +- using data_type = std::variant<csv_config>;
1964 ++ using data_type = boost::variant<csv_config>;
1966 + /**
1967 + * Enable or disable runtime debug output to stdout or stderr.
1968 +diff --git a/include/orcus/css_selector.hpp b/include/orcus/css_selector.hpp
1969 +index 1e41d544..dafeddf5 100644
1970 +--- a/include/orcus/css_selector.hpp
1971 ++++ b/include/orcus/css_selector.hpp
1972 +@@ -12,11 +12,12 @@
1973 + #include "css_types.hpp"
1975 + #include <ostream>
1976 +-#include <variant>
1977 + #include <vector>
1978 + #include <unordered_set>
1979 + #include <unordered_map>
1981 ++#include <boost/variant.hpp>
1983 + namespace orcus {
1985 + struct ORCUS_DLLPUBLIC css_simple_selector_t
1986 +@@ -73,7 +74,7 @@ struct ORCUS_DLLPUBLIC css_selector_t
1987 + */
1988 + struct ORCUS_DLLPUBLIC css_property_value_t
1990 +- using value_type = std::variant<std::string_view, css::rgba_color_t, css::hsla_color_t>;
1991 ++ using value_type = boost::variant<std::string_view, css::rgba_color_t, css::hsla_color_t>;
1993 + css::property_value_t type;
1994 + value_type value;
1995 +diff --git a/include/orcus/json_parser_thread.hpp b/include/orcus/json_parser_thread.hpp
1996 +index 8328ef11..565008da 100644
1997 +--- a/include/orcus/json_parser_thread.hpp
1998 ++++ b/include/orcus/json_parser_thread.hpp
1999 +@@ -14,7 +14,7 @@
2000 + #include <memory>
2001 + #include <vector>
2002 + #include <ostream>
2003 +-#include <variant>
2004 ++#include <boost/variant.hpp>
2006 + namespace orcus {
2008 +@@ -47,7 +47,7 @@ enum class parse_token_t
2010 + struct ORCUS_PSR_DLLPUBLIC parse_token
2012 +- using value_type = std::variant<std::string_view, parse_error_value_t, double>;
2013 ++ using value_type = boost::variant<std::string_view, parse_error_value_t, double>;
2015 + parse_token_t type;
2016 + value_type value;
2017 +diff --git a/include/orcus/sax_token_parser_thread.hpp b/include/orcus/sax_token_parser_thread.hpp
2018 +index b3645735..e0842013 100644
2019 +--- a/include/orcus/sax_token_parser_thread.hpp
2020 ++++ b/include/orcus/sax_token_parser_thread.hpp
2021 +@@ -12,10 +12,11 @@
2022 + #include "types.hpp"
2024 + #include <memory>
2025 +-#include <variant>
2026 + #include <vector>
2027 + #include <ostream>
2029 ++#include <boost/variant.hpp>
2031 + namespace orcus {
2033 + class tokens;
2034 +@@ -36,7 +37,7 @@ enum class parse_token_t
2036 + struct ORCUS_PSR_DLLPUBLIC parse_token
2038 +- using value_type = std::variant<std::string_view, parse_error_value_t, const xml_token_element_t*>;
2039 ++ using value_type = boost::variant<std::string_view, parse_error_value_t, const xml_token_element_t*>;
2041 + parse_token_t type;
2042 + value_type value;
2043 +diff --git a/include/orcus/spreadsheet/pivot.hpp b/include/orcus/spreadsheet/pivot.hpp
2044 +index dee25596..fa091160 100644
2045 +--- a/include/orcus/spreadsheet/pivot.hpp
2046 ++++ b/include/orcus/spreadsheet/pivot.hpp
2047 +@@ -15,9 +15,10 @@
2048 + #include <memory>
2049 + #include <vector>
2050 + #include <limits>
2051 +-#include <variant>
2052 + #include <optional>
2054 ++#include <boost/variant.hpp>
2056 + namespace ixion {
2058 + struct abs_range_t;
2059 +@@ -36,7 +37,7 @@ using pivot_cache_indices_t = std::vector<size_t>;
2061 + struct ORCUS_SPM_DLLPUBLIC pivot_cache_record_value_t
2063 +- using value_type = std::variant<bool, double, std::size_t, std::string_view, date_time_t>;
2064 ++ using value_type = boost::variant<bool, double, std::size_t, std::string_view, date_time_t>;
2066 + enum class record_type
2068 +@@ -66,7 +67,7 @@ using pivot_cache_record_t = std::vector<pivot_cache_record_value_t>;
2070 + struct ORCUS_SPM_DLLPUBLIC pivot_cache_item_t
2072 +- using value_type = std::variant<bool, double, std::string_view, date_time_t, error_value_t>;
2073 ++ using value_type = boost::variant<bool, double, std::string_view, date_time_t, error_value_t>;
2075 + enum class item_type
2077 +diff --git a/include/orcus/threaded_json_parser.hpp b/include/orcus/threaded_json_parser.hpp
2078 +index 51cdaced..3bf6e591 100644
2079 +--- a/include/orcus/threaded_json_parser.hpp
2080 ++++ b/include/orcus/threaded_json_parser.hpp
2081 +@@ -151,23 +151,23 @@ void threaded_json_parser<_Handler>::process_tokens(json::parse_tokens_t& tokens
2082 + m_handler.null();
2083 + break;
2084 + case json::parse_token_t::number:
2085 +- m_handler.number(std::get<double>(t.value));
2086 ++ m_handler.number(boost::get<double>(t.value));
2087 + break;
2088 + case json::parse_token_t::object_key:
2090 +- auto s = std::get<std::string_view>(t.value);
2091 ++ auto s = boost::get<std::string_view>(t.value);
2092 + m_handler.object_key(s.data(), s.size(), false);
2093 + break;
2095 + case json::parse_token_t::string:
2097 +- auto s = std::get<std::string_view>(t.value);
2098 ++ auto s = boost::get<std::string_view>(t.value);
2099 + m_handler.string(s.data(), s.size(), false);
2100 + break;
2102 + case json::parse_token_t::parse_error:
2104 +- auto v = std::get<parse_error_value_t>(t.value);
2105 ++ auto v = boost::get<parse_error_value_t>(t.value);
2106 + throw json::parse_error(std::string{v.str}, v.offset);
2108 + case json::parse_token_t::unknown:
2109 +diff --git a/include/orcus/threaded_sax_token_parser.hpp b/include/orcus/threaded_sax_token_parser.hpp
2110 +index 59ea967a..1b389be2 100644
2111 +--- a/include/orcus/threaded_sax_token_parser.hpp
2112 ++++ b/include/orcus/threaded_sax_token_parser.hpp
2113 +@@ -131,25 +131,25 @@ void threaded_sax_token_parser<_Handler>::process_tokens(const sax::parse_tokens
2115 + case sax::parse_token_t::start_element:
2117 +- const auto* elem = std::get<const xml_token_element_t*>(t.value);
2118 ++ const auto* elem = boost::get<const xml_token_element_t*>(t.value);
2119 + m_handler.start_element(*elem);
2120 + break;
2122 + case sax::parse_token_t::end_element:
2124 +- const auto* elem = std::get<const xml_token_element_t*>(t.value);
2125 ++ const auto* elem = boost::get<const xml_token_element_t*>(t.value);
2126 + m_handler.end_element(*elem);
2127 + break;
2129 + case sax::parse_token_t::characters:
2131 +- auto s = std::get<std::string_view>(t.value);
2132 ++ auto s = boost::get<std::string_view>(t.value);
2133 + m_handler.characters(s, false);
2134 + break;
2136 + case sax::parse_token_t::parse_error:
2138 +- auto v = std::get<parse_error_value_t>(t.value);
2139 ++ auto v = boost::get<parse_error_value_t>(t.value);
2140 + throw sax::malformed_xml_error(std::string{v.str}, v.offset);
2142 + default:
2143 +diff --git a/src/liborcus/css_document_tree.cpp b/src/liborcus/css_document_tree.cpp
2144 +index 46bf7e91..4b44edff 100644
2145 +--- a/src/liborcus/css_document_tree.cpp
2146 ++++ b/src/liborcus/css_document_tree.cpp
2147 +@@ -317,7 +317,7 @@ public:
2149 + // String value needs interning.
2150 + css_property_value_t interned = v;
2151 +- auto s = std::get<std::string_view>(v.value);
2152 ++ auto s = boost::get<std::string_view>(v.value);
2153 + interned.value = m_sp.intern(s).first;
2154 + m_dest.push_back(interned);
2155 + break;
2156 +diff --git a/src/liborcus/css_selector.cpp b/src/liborcus/css_selector.cpp
2157 +index b7b63f37..de522062 100644
2158 +--- a/src/liborcus/css_selector.cpp
2159 ++++ b/src/liborcus/css_selector.cpp
2160 +@@ -155,7 +155,7 @@ std::ostream& operator<< (std::ostream& os, const css_property_value_t& v)
2162 + case css::property_value_t::hsl:
2164 +- auto c = std::get<css::hsla_color_t>(v.value);
2165 ++ auto c = boost::get<css::hsla_color_t>(v.value);
2166 + os << "hsl("
2167 + << (int)c.hue << sep
2168 + << (int)c.saturation << sep
2169 +@@ -165,7 +165,7 @@ std::ostream& operator<< (std::ostream& os, const css_property_value_t& v)
2171 + case css::property_value_t::hsla:
2173 +- auto c = std::get<css::hsla_color_t>(v.value);
2174 ++ auto c = boost::get<css::hsla_color_t>(v.value);
2175 + os << "hsla("
2176 + << (int)c.hue << sep
2177 + << (int)c.saturation << sep
2178 +@@ -176,7 +176,7 @@ std::ostream& operator<< (std::ostream& os, const css_property_value_t& v)
2180 + case css::property_value_t::rgb:
2182 +- auto c = std::get<css::rgba_color_t>(v.value);
2183 ++ auto c = boost::get<css::rgba_color_t>(v.value);
2184 + os << "rgb("
2185 + << (int)c.red << sep
2186 + << (int)c.green << sep
2187 +@@ -186,7 +186,7 @@ std::ostream& operator<< (std::ostream& os, const css_property_value_t& v)
2189 + case css::property_value_t::rgba:
2191 +- auto c = std::get<css::rgba_color_t>(v.value);
2192 ++ auto c = boost::get<css::rgba_color_t>(v.value);
2193 + os << "rgba("
2194 + << (int)c.red << sep
2195 + << (int)c.green << sep
2196 +@@ -196,10 +196,10 @@ std::ostream& operator<< (std::ostream& os, const css_property_value_t& v)
2197 + break;
2199 + case css::property_value_t::string:
2200 +- os << std::get<std::string_view>(v.value);
2201 ++ os << boost::get<std::string_view>(v.value);
2202 + break;
2203 + case css::property_value_t::url:
2204 +- os << "url(" << std::get<std::string_view>(v.value) << ")";
2205 ++ os << "url(" << boost::get<std::string_view>(v.value) << ")";
2206 + break;
2207 + case css::property_value_t::none:
2208 + default:
2209 +diff --git a/src/liborcus/orcus_csv.cpp b/src/liborcus/orcus_csv.cpp
2210 +index 5c71bcf5..637308ab 100644
2211 +--- a/src/liborcus/orcus_csv.cpp
2212 ++++ b/src/liborcus/orcus_csv.cpp
2213 +@@ -63,7 +63,7 @@ public:
2214 + // 0.
2215 + if (m_row >= mp_sheet->get_sheet_size().rows)
2217 +- auto csv = std::get<config::csv_config>(m_app_config.data);
2218 ++ auto csv = boost::get<config::csv_config>(m_app_config.data);
2220 + if (!csv.split_to_multiple_sheets)
2221 + throw max_row_size_reached();
2222 +@@ -93,7 +93,7 @@ public:
2224 + void cell(const char* p, size_t n, bool transient)
2226 +- auto csv = std::get<config::csv_config>(m_app_config.data);
2227 ++ auto csv = boost::get<config::csv_config>(m_app_config.data);
2229 + if (m_sheet == 0 && size_t(m_row) < csv.header_row_size)
2231 +diff --git a/src/orcus_csv_main.cpp b/src/orcus_csv_main.cpp
2232 +index 4f6d7173..446f2684 100644
2233 +--- a/src/orcus_csv_main.cpp
2234 ++++ b/src/orcus_csv_main.cpp
2235 +@@ -45,7 +45,7 @@ public:
2237 + virtual void map_to_config(config& opt, const po::variables_map& vm) override
2239 +- auto csv = std::get<config::csv_config>(opt.data);
2240 ++ auto csv = boost::get<config::csv_config>(opt.data);
2242 + if (vm.count("row-header"))
2243 + csv.header_row_size = vm["row-header"].as<size_t>();
2244 +diff --git a/src/orcus_test_csv.cpp b/src/orcus_test_csv.cpp
2245 +index 310ace9d..0b9ba994 100644
2246 +--- a/src/orcus_test_csv.cpp
2247 ++++ b/src/orcus_test_csv.cpp
2248 +@@ -95,8 +95,8 @@ void test_csv_import_split_sheet()
2249 + std::cout << "checking " << path << "..." << std::endl;
2251 + config conf(format_t::csv);
2252 +- std::get<config::csv_config>(conf.data).header_row_size = 0;
2253 +- std::get<config::csv_config>(conf.data).split_to_multiple_sheets = true;
2254 ++ boost::get<config::csv_config>(conf.data).header_row_size = 0;
2255 ++ boost::get<config::csv_config>(conf.data).split_to_multiple_sheets = true;
2257 + // Set the row size to 11 to make sure the split occurs.
2258 + spreadsheet::range_size_t ss{11, 4};
2259 +@@ -126,7 +126,7 @@ void test_csv_import_split_sheet()
2260 + path = dir;
2261 + path.append("input.csv");
2262 + doc.clear();
2263 +- std::get<config::csv_config>(conf.data).header_row_size = 1;
2264 ++ boost::get<config::csv_config>(conf.data).header_row_size = 1;
2266 + spreadsheet::import_factory factory(doc);
2267 + orcus_csv app(&factory);
2268 +@@ -149,7 +149,7 @@ void test_csv_import_split_sheet()
2270 + // Re-import it again, but this time disable the splitting. The data should
2271 + // get trucated on the first sheet.
2272 +- std::get<config::csv_config>(conf.data).split_to_multiple_sheets = false;
2273 ++ boost::get<config::csv_config>(conf.data).split_to_multiple_sheets = false;
2275 + path = dir;
2276 + path.append("input.csv");
2277 +diff --git a/src/orcus_test_xlsx.cpp b/src/orcus_test_xlsx.cpp
2278 +index 807c61e4..632fb1e7 100644
2279 +--- a/src/orcus_test_xlsx.cpp
2280 ++++ b/src/orcus_test_xlsx.cpp
2281 +@@ -1154,8 +1154,8 @@ void test_xlsx_pivot_group_by_numbers()
2282 + for (const pivot_cache_item_t& item : fld->items)
2284 + assert(item.type == pivot_cache_item_t::item_type::numeric);
2285 +- assert(*fld->min_value <= std::get<double>(item.value));
2286 +- assert(std::get<double>(item.value) <= *fld->max_value);
2287 ++ assert(*fld->min_value <= boost::get<double>(item.value));
2288 ++ assert(boost::get<double>(item.value) <= *fld->max_value);
2291 + // This field is also gruop field with 7 numeric intervals of width 2.
2292 +diff --git a/src/parser/json_parser_thread.cpp b/src/parser/json_parser_thread.cpp
2293 +index 36bbe6e6..65fb6255 100644
2294 +--- a/src/parser/json_parser_thread.cpp
2295 ++++ b/src/parser/json_parser_thread.cpp
2296 +@@ -237,19 +237,19 @@ std::ostream& operator<< (std::ostream& os, const parse_tokens_t& tokens)
2297 + os << "- null" << endl;
2298 + break;
2299 + case parse_token_t::number:
2300 +- os << "- number (v=" << std::get<double>(t.value) << ")" << endl;
2301 ++ os << "- number (v=" << boost::get<double>(t.value) << ")" << endl;
2302 + break;
2303 + case parse_token_t::object_key:
2304 +- os << "- object_key (v=" << std::get<std::string_view>(t.value) << ")" << endl;
2305 ++ os << "- object_key (v=" << boost::get<std::string_view>(t.value) << ")" << endl;
2306 + break;
2307 + case parse_token_t::parse_error:
2309 +- auto v = std::get<parse_error_value_t>(t.value);
2310 ++ auto v = boost::get<parse_error_value_t>(t.value);
2311 + os << "- parse_error (v=" << v.str << ", offset=" << v.offset << ")" << endl;
2312 + break;
2314 + case parse_token_t::string:
2315 +- os << "- string (" << std::get<std::string_view>(t.value) << ")" << endl;
2316 ++ os << "- string (" << boost::get<std::string_view>(t.value) << ")" << endl;
2317 + break;
2318 + case parse_token_t::unknown:
2319 + os << "- unknown" << endl;
2320 +diff --git a/src/python/sheet_rows.cpp b/src/python/sheet_rows.cpp
2321 +index be495894..0d21ba71 100644
2322 +--- a/src/python/sheet_rows.cpp
2323 ++++ b/src/python/sheet_rows.cpp
2324 +@@ -135,7 +135,10 @@ PyObject* sheet_rows_iternext(PyObject* self)
2325 + break;
2327 + case ixion::celltype_t::unknown:
2328 ++ {
2329 ++ PyErr_SetString(PyExc_RuntimeError, "Unknown cell type.");
2330 + break;
2331 ++ }
2334 + if (!obj)
2335 +--
2336 +2.25.1
2338 diff --git a/external/liborcus/unused-variables.patch.1 b/external/liborcus/unused-variables.patch.1
2339 new file mode 100644
2340 index 000000000000..77b88fae288c
2341 --- /dev/null
2342 +++ b/external/liborcus/unused-variables.patch.1
2343 @@ -0,0 +1,24 @@
2344 +From 5fccafa297ce2439ee850e13ccbeea3edb1750af Mon Sep 17 00:00:00 2001
2345 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
2346 +Date: Tue, 2 Nov 2021 20:42:45 -0400
2347 +Subject: [PATCH] Unused variables.
2349 +---
2350 + include/orcus/sax_parser.hpp | 1 -
2351 + 1 file changed, 1 deletion(-)
2353 +diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
2354 +index 24b1e8ea..15e8d917 100644
2355 +--- a/include/orcus/sax_parser.hpp
2356 ++++ b/include/orcus/sax_parser.hpp
2357 +@@ -539,7 +539,6 @@ template<typename _Handler, typename _Config>
2358 + void sax_parser<_Handler,_Config>::attribute()
2360 + sax::parser_attribute attr;
2361 +- std::string_view attr_ns_name, attr_name, attr_value;
2362 + attribute_name(attr.ns, attr.name);
2364 + #if ORCUS_DEBUG_SAX_PARSER
2365 +--
2366 +2.25.1
2368 diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
2369 index 3c664336430b..cf5bd48a1eb6 100644
2370 --- a/external/mdds/UnpackedTarball_mdds.mk
2371 +++ b/external/mdds/UnpackedTarball_mdds.mk
2372 @@ -13,11 +13,9 @@ $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
2374 $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
2376 -# * external/mdds/Wunused-but-set-variable.patch upstream at
2377 -# <https://gitlab.com/mdds/mdds/-/merge_requests/29> "-Werror,-Wunused-but-set-variable (Clang 13
2378 -# trunk)":
2379 $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
2380 - external/mdds/Wunused-but-set-variable.patch \
2381 + external/mdds/remove-unused-parameters.patch.1 \
2382 + external/mdds/remove-more-unused-parameters.patch.1 \
2385 # vim: set noet sw=4 ts=4:
2386 diff --git a/external/mdds/Wunused-but-set-variable.patch b/external/mdds/Wunused-but-set-variable.patch
2387 deleted file mode 100644
2388 index ba28cb18eded..000000000000
2389 --- a/external/mdds/Wunused-but-set-variable.patch
2390 +++ /dev/null
2391 @@ -1,46 +0,0 @@
2392 ---- include/mdds/multi_type_vector_def.inl
2393 -+++ include/mdds/multi_type_vector_def.inl
2394 -@@ -843,18 +843,12 @@
2395 - typename multi_type_vector<_CellBlockFunc, _EventFunc>::iterator
2396 - multi_type_vector<_CellBlockFunc, _EventFunc>::push_back_empty()
2398 -- size_type last_block_size = 0;
2399 -- if (!m_blocks.empty())
2400 -- last_block_size = m_blocks.back().m_size;
2402 - size_type block_index = m_blocks.size();
2403 -- size_type start_pos = m_cur_size;
2405 - if (!append_empty(1))
2407 - // Last empty block has been extended.
2408 - --block_index;
2409 -- start_pos -= last_block_size;
2412 - // Get the iterator of the last block.
2413 -@@ -3923,8 +3917,6 @@
2414 - size_type offset = start_row - start_row_in_block1;
2415 - size_type end_row_in_block2 = start_row_in_block2 + blk2->m_size - 1;
2417 -- size_type start_row_itr = start_row_in_block1;
2419 - // Initially set to erase blocks between block 1 and block 2 non-inclusive at either end.
2420 - typename blocks_type::iterator it_erase_begin = m_blocks.begin() + block_index1 + 1;
2421 - typename blocks_type::iterator it_erase_end = m_blocks.begin() + block_index2;
2422 -@@ -3948,7 +3940,6 @@
2423 - data_blk.mp_data = blk0->mp_data;
2424 - blk0->mp_data = nullptr;
2426 -- start_row_itr -= blk0->m_size;
2427 - data_blk.m_size += blk0->m_size;
2428 - data_blk.m_position = blk0->m_position;
2430 -@@ -3967,7 +3958,6 @@
2431 - element_block_func::resize_block(*blk1->mp_data, offset);
2433 - blk1->m_size = offset;
2434 -- start_row_itr += offset;
2437 - if (blk0_copied)
2438 diff --git a/external/mdds/remove-more-unused-parameters.patch.1 b/external/mdds/remove-more-unused-parameters.patch.1
2439 new file mode 100644
2440 index 000000000000..c0c29471c9ed
2441 --- /dev/null
2442 +++ b/external/mdds/remove-more-unused-parameters.patch.1
2443 @@ -0,0 +1,42 @@
2444 +From cc24c84d35274aead5afe574c87ecd6368aa5e2a Mon Sep 17 00:00:00 2001
2445 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
2446 +Date: Tue, 2 Nov 2021 18:24:30 -0400
2447 +Subject: [PATCH] More unused parameters.
2449 +I personally cannot reproduce the warnings. But The android x86 build
2450 +of LibreOffice generates the following build warnings:
2452 +In file included from /home/tdf/lode/jenkins/workspace/android_x86/svl/source/misc/gridprinter.cxx:16:
2453 +In file included from /home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_matrix.hpp:37:
2454 +In file included from /home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector.hpp:31:
2455 +In file included from /home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/main.hpp:35:
2456 +/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:27: error: unused parameter 'block_store' [-Werror,-Wunused-parameter]
2457 + void operator()(Blks& block_store, int64_t start_block_index, int64_t delta) const
2459 +/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:48: error: unused parameter 'start_block_index' [-Werror,-Wunused-parameter]
2460 + void operator()(Blks& block_store, int64_t start_block_index, int64_t delta) const
2462 +/home/tdf/lode/jenkins/workspace/android_x86/workdir/UnpackedTarball/mdds/include/mdds/./multi_type_vector/soa/./block_util.hpp:49:75: error: unused parameter 'delta' [-Werror,-Wunused-parameter]
2463 + void operator()(Blks& block_store, int64_t start_block_index, int64_t delta) const
2465 +3 errors generated.
2466 +---
2467 + include/mdds/multi_type_vector/soa/block_util.hpp | 2 +-
2468 + 1 file changed, 1 insertion(+), 1 deletion(-)
2470 +diff --git a/include/mdds/multi_type_vector/soa/block_util.hpp b/include/mdds/multi_type_vector/soa/block_util.hpp
2471 +index d10ee67..73ba27c 100644
2472 +--- a/include/mdds/multi_type_vector/soa/block_util.hpp
2473 ++++ b/include/mdds/multi_type_vector/soa/block_util.hpp
2474 +@@ -46,7 +46,7 @@ namespace detail {
2475 + template<typename Blks, lu_factor_t F>
2476 + struct adjust_block_positions
2478 +- void operator()(Blks& block_store, int64_t start_block_index, int64_t delta) const
2479 ++ void operator()(Blks& /*block_store*/, int64_t /*start_block_index*/, int64_t /*delta*/) const
2481 + static_assert(invalid_static_int<F>, "The loop-unrolling factor must be one of 0, 4, 8, 16, or 32.");
2483 +--
2484 +2.25.1
2486 diff --git a/external/mdds/remove-unused-parameters.patch.1 b/external/mdds/remove-unused-parameters.patch.1
2487 new file mode 100644
2488 index 000000000000..ebfc94fbf107
2489 --- /dev/null
2490 +++ b/external/mdds/remove-unused-parameters.patch.1
2491 @@ -0,0 +1,93 @@
2492 +From 695e4c73fb55b1002237b0a22f13162c5c91aa68 Mon Sep 17 00:00:00 2001
2493 +From: Kohei Yoshida <kohei.yoshida@gmail.com>
2494 +Date: Mon, 1 Nov 2021 14:54:36 -0400
2495 +Subject: [PATCH] Remove unused parameter warnings in public headers.
2497 +---
2498 + include/mdds/multi_type_vector/util.hpp | 10 ++++++++--
2499 + include/mdds/trie_map_def.inl | 12 ++++++------
2500 + 2 files changed, 14 insertions(+), 8 deletions(-)
2502 +diff --git a/include/mdds/multi_type_vector/util.hpp b/include/mdds/multi_type_vector/util.hpp
2503 +index d21e302..a1cb1f9 100644
2504 +--- a/include/mdds/multi_type_vector/util.hpp
2505 ++++ b/include/mdds/multi_type_vector/util.hpp
2506 +@@ -51,7 +51,10 @@ struct empty_event_func
2508 + * @param block pointer to the acquired element block instance.
2509 + */
2510 +- void element_block_acquired(const base_element_block* block) {}
2511 ++ void element_block_acquired(const base_element_block* block)
2512 ++ {
2513 ++ (void)block;
2514 ++ }
2516 + /**
2517 + * Callback function for element block release events. This gets called
2518 +@@ -61,7 +64,10 @@ struct empty_event_func
2520 + * @param block pointer to the element block instance being released.
2521 + */
2522 +- void element_block_released(const base_element_block* block) {}
2523 ++ void element_block_released(const base_element_block* block)
2524 ++ {
2525 ++ (void)block;
2526 ++ }
2527 + };
2529 + /**
2530 +diff --git a/include/mdds/trie_map_def.inl b/include/mdds/trie_map_def.inl
2531 +index 49e6de0..be18aec 100644
2532 +--- a/include/mdds/trie_map_def.inl
2533 ++++ b/include/mdds/trie_map_def.inl
2534 +@@ -1004,7 +1004,7 @@ packed_trie_map<_KeyTrait,_ValueT>::packed_trie_map(const packed_trie_map& other
2536 + packed_trie_map& m_parent;
2538 +- void node(const uintptr_t* node_pos, key_unit_type c, size_t depth, size_t index_size)
2539 ++ void node(const uintptr_t* node_pos, key_unit_type /*c*/, size_t /*depth*/, size_t /*index_size*/)
2541 + uintptr_t value_ptr = *node_pos;
2543 +@@ -1315,13 +1315,13 @@ void packed_trie_map<_KeyTrait,_ValueT>::save_state(std::ostream& os) const
2546 + /** first element in the buffer. */
2547 +- void root_offset(size_t i, const uintptr_t& v) const
2548 ++ void root_offset(size_t /*i*/, const uintptr_t& v) const
2550 + write(v);
2553 + /** first element in each node section. */
2554 +- void node_value(size_t i, const uintptr_t& v) const
2555 ++ void node_value(size_t /*i*/, const uintptr_t& v) const
2557 + const value_type* p = reinterpret_cast<const value_type*>(v);
2558 + if (p)
2559 +@@ -1348,19 +1348,19 @@ void packed_trie_map<_KeyTrait,_ValueT>::save_state(std::ostream& os) const
2560 + * second element in each node section that stores the size of
2561 + * the child data sub-section.
2562 + */
2563 +- void node_index_size(size_t i, const uintptr_t& v) const
2564 ++ void node_index_size(size_t /*i*/, const uintptr_t& v) const
2566 + write(v);
2569 + /** element that stores the key value for child node. */
2570 +- void node_child_key(size_t i, const uintptr_t& v) const
2571 ++ void node_child_key(size_t /*i*/, const uintptr_t& v) const
2573 + write(v);
2576 + /** element that stores the relative offset of the child node. */
2577 +- void node_child_offset(size_t i, const uintptr_t& v) const
2578 ++ void node_child_offset(size_t /*i*/, const uintptr_t& v) const
2580 + write(v);
2582 +--
2583 +2.25.1
2585 diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
2586 index a6c4d5ffa7c7..636706e0c234 100644
2587 --- a/sc/inc/mtvelements.hxx
2588 +++ b/sc/inc/mtvelements.hxx
2589 @@ -24,10 +24,10 @@
2590 #define MDDS_MULTI_TYPE_VECTOR_DEBUG 1
2591 #endif
2593 -#include <mdds/multi_type_vector_macro.hpp>
2594 -#include <mdds/multi_type_vector.hpp>
2595 -#include <mdds/multi_type_vector_custom_func1.hpp>
2596 -#include <mdds/multi_type_vector_custom_func3.hpp>
2597 +#include <mdds/multi_type_vector/macro.hpp>
2598 +#include <mdds/multi_type_vector/soa/main.hpp>
2599 +#include <mdds/multi_type_vector/custom_func1.hpp>
2600 +#include <mdds/multi_type_vector/custom_func3.hpp>
2602 #include <unordered_map>
2603 #include <memory>
2604 @@ -97,21 +97,27 @@ public:
2605 void element_block_released(const mdds::mtv::base_element_block* block);
2608 +struct CellStoreTrait
2610 + using event_func = CellStoreEvent;
2611 + static constexpr mdds::mtv::lu_factor_t loop_unrolling = mdds::mtv::lu_factor_t::lu16;
2614 /// Cell note container
2615 typedef mdds::mtv::custom_block_func1<sc::cellnote_block> CNoteFunc;
2616 -typedef mdds::multi_type_vector<CNoteFunc> CellNoteStoreType;
2617 +typedef mdds::mtv::soa::multi_type_vector<CNoteFunc> CellNoteStoreType;
2619 /// Broadcaster storage container
2620 typedef mdds::mtv::custom_block_func1<sc::broadcaster_block> BCBlkFunc;
2621 -typedef mdds::multi_type_vector<BCBlkFunc> BroadcasterStoreType;
2622 +typedef mdds::mtv::soa::multi_type_vector<BCBlkFunc> BroadcasterStoreType;
2624 /// Cell text attribute container.
2625 typedef mdds::mtv::custom_block_func1<sc::celltextattr_block> CTAttrFunc;
2626 -typedef mdds::multi_type_vector<CTAttrFunc> CellTextAttrStoreType;
2627 +typedef mdds::mtv::soa::multi_type_vector<CTAttrFunc> CellTextAttrStoreType;
2629 /// Cell container
2630 typedef mdds::mtv::custom_block_func3<sc::string_block, sc::edittext_block, sc::formula_block> CellFunc;
2631 -typedef mdds::multi_type_vector<CellFunc, CellStoreEvent> CellStoreType;
2632 +typedef mdds::mtv::soa::multi_type_vector<CellFunc, CellStoreTrait> CellStoreType;
2635 * Store position data for column array storage.
2636 diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
2637 index 060456733fbc..935854c46e3f 100644
2638 --- a/sc/source/filter/inc/orcusinterface.hxx
2639 +++ b/sc/source/filter/inc/orcusinterface.hxx
2640 @@ -75,8 +75,8 @@ class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_re
2641 public:
2642 ScOrcusRefResolver( const ScOrcusGlobalSettings& rGS );
2644 - orcus::spreadsheet::src_address_t resolve_address(const char* p, size_t n) override;
2645 - orcus::spreadsheet::src_range_t resolve_range(const char* p, size_t n) override;
2646 + orcus::spreadsheet::src_address_t resolve_address(std::string_view address) override;
2647 + orcus::spreadsheet::src_range_t resolve_range(std::string_view range) override;
2650 class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_expression
2651 @@ -94,8 +94,8 @@ public:
2652 void reset();
2654 virtual void set_base_position(const orcus::spreadsheet::src_address_t& pos) override;
2655 - virtual void set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override;
2656 - virtual void set_named_range(const char* p_name, size_t n_name, const char* p_range, size_t n_range) override;
2657 + virtual void set_named_expression(std::string_view name, std::string_view expression) override;
2658 + virtual void set_named_range(std::string_view name, std::string_view range) override;
2659 virtual void commit() override;
2662 @@ -107,19 +107,19 @@ class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_str
2663 public:
2664 ScOrcusSharedStrings(ScOrcusFactory& rFactory);
2666 - virtual size_t append(const char* s, size_t n) override;
2667 - virtual size_t add(const char* s, size_t n) override;
2668 + virtual size_t append(std::string_view s) override;
2669 + virtual size_t add(std::string_view s) override;
2671 virtual void set_segment_bold(bool b) override;
2672 virtual void set_segment_italic(bool b) override;
2673 virtual void set_segment_font(size_t font_index) override;
2674 - virtual void set_segment_font_name(const char* s, size_t n) override;
2675 + virtual void set_segment_font_name(std::string_view s) override;
2676 virtual void set_segment_font_size(double point) override;
2677 virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha,
2678 orcus::spreadsheet::color_elem_t red,
2679 orcus::spreadsheet::color_elem_t green,
2680 orcus::spreadsheet::color_elem_t blue) override;
2681 - virtual void append_segment(const char* s, size_t n) override;
2682 + virtual void append_segment(std::string_view s) override;
2684 virtual size_t commit_segments() override;
2686 @@ -133,7 +133,7 @@ public:
2687 virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
2688 orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
2690 - virtual void set_formula(const char* p, size_t n) override;
2691 + virtual void set_formula(std::string_view formula) override;
2693 virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override;
2695 @@ -141,7 +141,7 @@ public:
2697 virtual void commit_condition() override;
2699 - virtual void set_icon_name(const char* p, size_t n) override;
2700 + virtual void set_icon_name(std::string_view name) override;
2702 virtual void set_databar_gradient(bool gradient) override;
2704 @@ -169,7 +169,7 @@ public:
2706 virtual void commit_entry() override;
2708 - virtual void set_range(const char* p, size_t n) override;
2709 + virtual void set_range(std::string_view range) override;
2711 virtual void set_range(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
2712 orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end) override;
2713 @@ -197,7 +197,7 @@ public:
2715 virtual void set_column(orcus::spreadsheet::col_t col) override;
2717 - virtual void append_column_match_value(const char* p, size_t n) override;
2718 + virtual void append_column_match_value(std::string_view value) override;
2720 virtual void commit_column() override;
2722 @@ -243,7 +243,7 @@ class ScOrcusFormula : public orcus::spreadsheet::iface::import_formula
2723 bool mbShared;
2725 ResultType meResType;
2726 - size_t mnResult; // result string index.
2727 + OUString maResult; // result string.
2728 double mfResult;
2730 void reset();
2731 @@ -253,10 +253,10 @@ public:
2732 virtual ~ScOrcusFormula() override;
2734 virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
2735 - virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
2736 + virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, std::string_view formula) override;
2737 virtual void set_shared_formula_index(size_t index) override;
2738 virtual void set_result_value(double value) override;
2739 - virtual void set_result_string(size_t sindex) override;
2740 + virtual void set_result_string(std::string_view value) override;
2741 virtual void set_result_empty() override;
2742 virtual void set_result_bool(bool value) override;
2743 virtual void commit() override;
2744 @@ -282,9 +282,9 @@ public:
2745 virtual ~ScOrcusArrayFormula() override;
2747 virtual void set_range(const orcus::spreadsheet::range_t& range) override;
2748 - virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
2749 + virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, std::string_view formula) override;
2750 virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
2751 - virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
2752 + virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, std::string_view value) override;
2753 virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
2754 virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
2755 virtual void commit() override;
2756 @@ -326,8 +326,8 @@ public:
2757 virtual orcus::spreadsheet::iface::import_array_formula* get_array_formula() override;
2759 // Orcus import interface
2760 - virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
2761 - virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
2762 + virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, std::string_view value) override;
2763 + virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::string_id_t sindex) override;
2764 virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
2765 virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
2766 virtual void set_date_time(
2767 @@ -491,7 +491,7 @@ public:
2768 virtual void set_font_count(size_t n) override;
2769 virtual void set_font_bold(bool b) override;
2770 virtual void set_font_italic(bool b) override;
2771 - virtual void set_font_name(const char* s, size_t n) override;
2772 + virtual void set_font_name(std::string_view name) override;
2773 virtual void set_font_size(double point) override;
2774 virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
2775 virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
2776 @@ -542,7 +542,7 @@ public:
2777 // number format
2778 virtual void set_number_format_count(size_t n) override;
2779 virtual void set_number_format_identifier(size_t n) override;
2780 - virtual void set_number_format_code(const char* s, size_t n) override;
2781 + virtual void set_number_format_code(std::string_view s) override;
2782 virtual size_t commit_number_format() override;
2784 // cell style xf
2785 @@ -574,10 +574,10 @@ public:
2786 // cell style entry
2788 virtual void set_cell_style_count(size_t n) override;
2789 - virtual void set_cell_style_name(const char* s, size_t n) override;
2790 + virtual void set_cell_style_name(std::string_view name) override;
2791 virtual void set_cell_style_xf(size_t index) override;
2792 virtual void set_cell_style_builtin(size_t index) override;
2793 - virtual void set_cell_style_parent_name(const char* s, size_t n) override;
2794 + virtual void set_cell_style_parent_name(std::string_view name) override;
2795 virtual size_t commit_cell_style() override;
2798 @@ -639,8 +639,8 @@ public:
2799 ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles=false);
2801 virtual orcus::spreadsheet::iface::import_sheet* append_sheet(
2802 - orcus::spreadsheet::sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) override;
2803 - virtual orcus::spreadsheet::iface::import_sheet* get_sheet(const char *sheet_name, size_t sheet_name_length) override;
2804 + orcus::spreadsheet::sheet_t sheet_index, std::string_view sheet_name) override;
2805 + virtual orcus::spreadsheet::iface::import_sheet* get_sheet(std::string_view sheet_name) override;
2806 virtual orcus::spreadsheet::iface::import_sheet* get_sheet(orcus::spreadsheet::sheet_t sheet_index) override;
2807 virtual orcus::spreadsheet::iface::import_global_settings* get_global_settings() override;
2808 virtual orcus::spreadsheet::iface::import_shared_strings* get_shared_strings() override;
2809 diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
2810 index 0947b5dd650c..63926a72fc59 100644
2811 --- a/sc/source/filter/orcus/interface.cxx
2812 +++ b/sc/source/filter/orcus/interface.cxx
2813 @@ -161,9 +161,9 @@ orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula
2814 ScOrcusRefResolver::ScOrcusRefResolver( const ScOrcusGlobalSettings& rGS ) :
2815 mrGlobalSettings(rGS) {}
2817 -os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
2818 +os::src_address_t ScOrcusRefResolver::resolve_address(std::string_view address)
2820 - OUString aStr(p, n, mrGlobalSettings.getTextEncoding());
2821 + OUString aStr(address.data(), address.size(), mrGlobalSettings.getTextEncoding());
2823 ScAddress aAddr;
2824 aAddr.Parse(aStr, mrGlobalSettings.getDoc().getDoc(),
2825 @@ -173,7 +173,7 @@ os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
2826 if (!aAddr.IsValid())
2828 std::ostringstream os;
2829 - os << "'" << std::string(p, n) << "' is not a valid address expression.";
2830 + os << "'" << address << "' is not a valid address expression.";
2831 throw orcus::invalid_arg_error(os.str());
2834 @@ -185,9 +185,9 @@ os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
2835 return ret;
2838 -os::src_range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n)
2839 +os::src_range_t ScOrcusRefResolver::resolve_range(std::string_view range)
2841 - OUString aStr(p, n, mrGlobalSettings.getTextEncoding());
2842 + OUString aStr(range.data(), range.size(), mrGlobalSettings.getTextEncoding());
2844 ScRange aRange;
2845 aRange.Parse(aStr, mrGlobalSettings.getDoc().getDoc(),
2846 @@ -197,7 +197,7 @@ os::src_range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n)
2847 if (!aRange.IsValid())
2849 std::ostringstream os;
2850 - os << "'" << std::string(p, n) << "' is not a valid range expression.";
2851 + os << "'" << range << "' is not a valid range expression.";
2852 throw orcus::invalid_arg_error(os.str());
2855 @@ -232,13 +232,13 @@ void ScOrcusNamedExpression::set_base_position(const orcus::spreadsheet::src_add
2856 maBasePos.SetRow(pos.row);
2859 -void ScOrcusNamedExpression::set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp)
2860 +void ScOrcusNamedExpression::set_named_expression(std::string_view name, std::string_view expression)
2862 - maName = OUString(p_name, n_name, mrGlobalSettings.getTextEncoding());
2863 - maExpr = OUString(p_exp, n_exp, mrGlobalSettings.getTextEncoding());
2864 + maName = OUString(name.data(), name.size(), mrGlobalSettings.getTextEncoding());
2865 + maExpr = OUString(expression.data(), expression.size(), mrGlobalSettings.getTextEncoding());
2868 -void ScOrcusNamedExpression::set_named_range(const char* /*p_name*/, size_t /*n_name*/, const char* /*p_range*/, size_t /*n_range*/)
2869 +void ScOrcusNamedExpression::set_named_range(std::string_view /*name*/, std::string_view /*range*/)
2871 throw std::runtime_error("ScOrcusNamedExpression::set_named_range not implemented yet.");
2873 @@ -309,9 +309,9 @@ ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles) :
2874 mnProgress(0) {}
2876 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(
2877 - orcus::spreadsheet::sheet_t sheet_index, const char* sheet_name, size_t sheet_name_length)
2878 + orcus::spreadsheet::sheet_t sheet_index, std::string_view sheet_name)
2880 - OUString aTabName(sheet_name, sheet_name_length, maGlobalSettings.getTextEncoding());
2881 + OUString aTabName(sheet_name.data(), sheet_name.size(), maGlobalSettings.getTextEncoding());
2883 if (sheet_index == 0)
2885 @@ -345,9 +345,9 @@ public:
2889 -orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::get_sheet(const char* sheet_name, size_t sheet_name_length)
2890 +orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::get_sheet(std::string_view sheet_name)
2892 - OUString aTabName(sheet_name, sheet_name_length, maGlobalSettings.getTextEncoding());
2893 + OUString aTabName(sheet_name.data(), sheet_name.size(), maGlobalSettings.getTextEncoding());
2894 SCTAB nTab = maDoc.getSheetIndex(aTabName);
2895 if (nTab < 0)
2896 // Sheet by that name not found.
2897 @@ -777,7 +777,7 @@ void ScOrcusConditionalFormat::set_condition_type(os::condition_type_t /*type*/)
2898 SAL_INFO("sc.orcus.condformat", "set_condition_type");
2901 -void ScOrcusConditionalFormat::set_formula(const char* /*p*/, size_t /*n*/)
2902 +void ScOrcusConditionalFormat::set_formula(std::string_view /*formula*/)
2904 SAL_INFO("sc.orcus.condformat", "set_formula");
2906 @@ -793,7 +793,7 @@ void ScOrcusConditionalFormat::commit_condition()
2907 SAL_INFO("sc.orcus.condformat", "commit_condition");
2910 -void ScOrcusConditionalFormat::set_icon_name(const char* /*p*/, size_t /*n*/)
2911 +void ScOrcusConditionalFormat::set_icon_name(std::string_view /*name*/)
2913 assert(meEntryType == ScFormatEntry::Type::Iconset);
2914 SAL_INFO("sc.orcus.condformat", "set_icon_name");
2915 @@ -887,7 +887,7 @@ void ScOrcusConditionalFormat::commit_entry()
2916 SAL_INFO("sc.orcus.condformat", "commit_entry");
2919 -void ScOrcusConditionalFormat::set_range(const char* /*p*/, size_t /*n*/)
2920 +void ScOrcusConditionalFormat::set_range(std::string_view /*range*/)
2922 SAL_INFO("sc.orcus.condformat", "set_range");
2924 @@ -930,7 +930,7 @@ void ScOrcusFormula::reset()
2925 mnSharedFormulaIndex = 0;
2926 mbShared = false;
2927 meResType = ResultType::NotSet;
2928 - mnResult = 0;
2929 + maResult.clear();
2930 mfResult = 0.0;
2933 @@ -942,7 +942,6 @@ ScOrcusFormula::ScOrcusFormula( ScOrcusSheet& rSheet ) :
2934 mnSharedFormulaIndex(0),
2935 mbShared(false),
2936 meResType(ResultType::NotSet),
2937 - mnResult(0),
2938 mfResult(0.0) {}
2940 ScOrcusFormula::~ScOrcusFormula() {}
2941 @@ -953,9 +952,9 @@ void ScOrcusFormula::set_position(os::row_t row, os::col_t col)
2942 mnRow = row;
2945 -void ScOrcusFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
2946 +void ScOrcusFormula::set_formula(os::formula_grammar_t grammar, std::string_view formula)
2948 - maFormula = OUString(p, n, mrSheet.getFactory().getGlobalSettings().getTextEncoding());
2949 + maFormula = OUString(formula.data(), formula.size(), mrSheet.getFactory().getGlobalSettings().getTextEncoding());
2950 meGrammar = getCalcGrammarFromOrcus(grammar);
2953 @@ -971,10 +970,10 @@ void ScOrcusFormula::set_result_value(double value)
2954 mfResult = value;
2957 -void ScOrcusFormula::set_result_string(size_t sindex)
2958 +void ScOrcusFormula::set_result_string(std::string_view value)
2960 meResType = ResultType::String;
2961 - mnResult = sindex;
2962 + maResult = OUString(value.data(), value.size(), mrSheet.getFactory().getGlobalSettings().getTextEncoding());
2965 void ScOrcusFormula::set_result_empty()
2966 @@ -1028,9 +1027,7 @@ void ScOrcusFormula::commit()
2968 case ResultType::String:
2970 - const OUString* pStr = rFactory.getString(mnResult);
2971 - if (pStr)
2972 - rFactory.pushFormulaResult(aPos, *pStr);
2973 + rFactory.pushFormulaResult(aPos, maResult);
2974 break;
2976 case ResultType::Value:
2977 @@ -1073,10 +1070,10 @@ void ScOrcusArrayFormula::set_range(const os::range_t& range)
2978 mnRowRange = range.last.row - range.first.column + 1;
2981 -void ScOrcusArrayFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
2982 +void ScOrcusArrayFormula::set_formula(os::formula_grammar_t grammar, std::string_view formula)
2984 meGrammar = getCalcGrammarFromOrcus(grammar);
2985 - maFormula = OUString(p, n, mrSheet.getFactory().getGlobalSettings().getTextEncoding());
2986 + maFormula = OUString(formula.data(), formula.size(), mrSheet.getFactory().getGlobalSettings().getTextEncoding());
2989 void ScOrcusArrayFormula::set_result_value(os::row_t /*row*/, os::col_t /*col*/, double /*value*/)
2990 @@ -1084,7 +1081,7 @@ void ScOrcusArrayFormula::set_result_value(os::row_t /*row*/, os::col_t /*col*/,
2991 // TODO : implement result cache for matrix
2994 -void ScOrcusArrayFormula::set_result_string(os::row_t /*row*/, os::col_t /*col*/, size_t /*sindex*/)
2995 +void ScOrcusArrayFormula::set_result_string(os::row_t /*row*/, os::col_t /*col*/, std::string_view /*value*/)
2997 // TODO : implement result cache for matrix
2999 @@ -1158,16 +1155,16 @@ os::iface::import_array_formula* ScOrcusSheet::get_array_formula()
3000 return &maArrayFormula;
3003 -void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
3004 +void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, std::string_view value)
3006 - OUString aVal(p, n, mrFactory.getGlobalSettings().getTextEncoding());
3007 + OUString aVal(value.data(), value.size(), mrFactory.getGlobalSettings().getTextEncoding());
3008 mrFactory.pushCellStoreAutoToken(ScAddress(col, row, mnTab), aVal);
3009 cellInserted();
3012 -void ScOrcusSheet::set_string(os::row_t row, os::col_t col, size_t sindex)
3013 +void ScOrcusSheet::set_string(os::row_t row, os::col_t col, os::string_id_t sindex)
3015 - mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), uint32_t(sindex));
3016 + mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), sindex);
3017 cellInserted();
3020 @@ -1257,15 +1254,15 @@ ScOrcusFactory& ScOrcusSheet::getFactory()
3021 ScOrcusSharedStrings::ScOrcusSharedStrings(ScOrcusFactory& rFactory) :
3022 mrFactory(rFactory) {}
3024 -size_t ScOrcusSharedStrings::append(const char* s, size_t n)
3025 +size_t ScOrcusSharedStrings::append(std::string_view s)
3027 - OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3028 + OUString aNewString(s.data(), s.size(), mrFactory.getGlobalSettings().getTextEncoding());
3029 return mrFactory.appendString(aNewString);
3032 -size_t ScOrcusSharedStrings::add(const char* s, size_t n)
3033 +size_t ScOrcusSharedStrings::add(std::string_view s)
3035 - OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3036 + OUString aNewString(s.data(), s.size(), mrFactory.getGlobalSettings().getTextEncoding());
3037 return mrFactory.addString(aNewString);
3040 @@ -1281,7 +1278,7 @@ void ScOrcusSharedStrings::set_segment_italic(bool /*b*/)
3044 -void ScOrcusSharedStrings::set_segment_font_name(const char* /*s*/, size_t /*n*/)
3045 +void ScOrcusSharedStrings::set_segment_font_name(std::string_view /*s*/)
3049 @@ -1296,9 +1293,9 @@ void ScOrcusSharedStrings::set_segment_font_color(orcus::spreadsheet::color_elem
3053 -void ScOrcusSharedStrings::append_segment(const char* s, size_t n)
3054 +void ScOrcusSharedStrings::append_segment(std::string_view s)
3056 - maCurSegment.append(s, n);
3057 + maCurSegment.append(s.data(), s.size());
3060 size_t ScOrcusSharedStrings::commit_segments()
3061 @@ -1610,9 +1607,9 @@ void ScOrcusStyles::set_font_italic(bool b)
3062 maCurrentFont.mbHasFontAttr = true;
3065 -void ScOrcusStyles::set_font_name(const char* s, size_t n)
3066 +void ScOrcusStyles::set_font_name(std::string_view name)
3068 - OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3069 + OUString aName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
3070 maCurrentFont.maName = aName;
3071 maCurrentFont.mbHasFontAttr = true;
3073 @@ -1985,9 +1982,9 @@ void ScOrcusStyles::set_number_format_identifier(size_t)
3077 -void ScOrcusStyles::set_number_format_code(const char* s, size_t n)
3078 +void ScOrcusStyles::set_number_format_code(std::string_view s)
3080 - OUString aCode(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3081 + OUString aCode(s.data(), s.size(), mrFactory.getGlobalSettings().getTextEncoding());
3082 maCurrentNumberFormat.maCode = aCode;
3083 maCurrentNumberFormat.mbHasNumberFormatAttr = true;
3085 @@ -2141,9 +2138,9 @@ void ScOrcusStyles::set_cell_style_count(size_t /*n*/)
3086 // needed at all?
3089 -void ScOrcusStyles::set_cell_style_name(const char* s, size_t n)
3090 +void ScOrcusStyles::set_cell_style_name(std::string_view name)
3092 - OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3093 + OUString aName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
3094 maCurrentCellStyle.maName = aName;
3097 @@ -2158,9 +2155,9 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
3098 maCurrentCellStyle.mnBuiltInId = index;
3101 -void ScOrcusStyles::set_cell_style_parent_name(const char* s, size_t n)
3102 +void ScOrcusStyles::set_cell_style_parent_name(std::string_view name)
3104 - OUString aParentName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
3105 + OUString aParentName(name.data(), name.size(), mrFactory.getGlobalSettings().getTextEncoding());
3106 maCurrentCellStyle.maParentName = aParentName;
3109 @@ -2215,9 +2212,9 @@ void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
3110 SAL_INFO("sc.orcus.autofilter", "set_column: " << col);
3113 -void ScOrcusAutoFilter::append_column_match_value(const char* p, size_t n)
3114 +void ScOrcusAutoFilter::append_column_match_value(std::string_view value)
3116 - OUString aString(p, n, mrGlobalSettings.getTextEncoding());
3117 + OUString aString(value.data(), value.size(), mrGlobalSettings.getTextEncoding());
3118 SAL_INFO("sc.orcus.autofilter", "append_column_match_value: " << aString);
3121 diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
3122 index f063bd3b5524..db2d5705d51e 100644
3123 --- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
3124 +++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
3125 @@ -70,7 +70,7 @@ bool loadFileContent(SfxMedium& rMedium, orcus::iface::import_filter& filter)
3129 - filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
3130 + filter.read_stream(aBuffer);
3132 catch (const std::exception& e)
3134 @@ -148,14 +148,14 @@ bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) con
3135 if (GetShortPathNameW(o3tl::toW(aPath.getStr()), buf, std::size(buf)) == 0)
3136 throw;
3137 aPath8 = OUStringToOString(o3tl::toU(buf), osl_getThreadTextEncoding());
3138 - content = std::make_unique<orcus::file_content>(aPath8.getStr());
3139 + content = std::make_unique<orcus::file_content>(aPath8);
3141 #else
3142 - auto content = std::make_unique<orcus::file_content>(aPath8.getStr());
3143 + auto content = std::make_unique<orcus::file_content>(aPath8);
3144 #endif
3145 ScOrcusFactory aFactory(rDoc);
3146 ScOrcusStyles aStyles(aFactory);
3147 - orcus::import_ods::read_styles(content->data(), content->size(), &aStyles);
3148 + orcus::import_ods::read_styles(content->str(), &aStyles);
3150 catch (const std::exception& e)
3152 diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
3153 index 1f3ee58220a0..9c73a75436bf 100644
3154 --- a/sc/source/filter/orcus/xmlcontext.cxx
3155 +++ b/sc/source/filter/orcus/xmlcontext.cxx
3156 @@ -63,7 +63,7 @@ OUString toString(const orcus::xml_structure_tree::entity_name& entity, const or
3157 aBuf.appendAscii(aShortName.c_str());
3158 aBuf.append(':');
3160 - aBuf.append(OUString(entity.name.get(), entity.name.size(), RTL_TEXTENCODING_UTF8));
3161 + aBuf.append(OUString(entity.name.data(), entity.name.size(), RTL_TEXTENCODING_UTF8));
3162 return aBuf.makeStringAndClear();
3165 @@ -175,7 +175,7 @@ void ScOrcusXMLContextImpl::loadXMLStructure(weld::TreeView& rTreeCtrl, ScOrcusX
3166 orcus::xml_structure_tree aXmlTree(cxt);
3169 - aXmlTree.parse(&aStrm[0], aStrm.size());
3170 + aXmlTree.parse(aStrm);
3172 TreeUpdateSwitch aSwitch(rTreeCtrl);
3173 rTreeCtrl.clear();
3174 @@ -265,14 +265,14 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
3175 std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(),
3176 [&filter](const OString& rFieldPath)
3178 - filter.append_field_link(rFieldPath.getStr(), orcus::pstring());
3179 + filter.append_field_link(rFieldPath, std::string_view());
3183 std::for_each(rLink.maRowGroups.begin(), rLink.maRowGroups.end(),
3184 [&filter] (const OString& rRowGroup)
3186 - filter.set_range_row_group(rRowGroup.getStr());
3187 + filter.set_range_row_group(rRowGroup);
3191 @@ -280,7 +280,7 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
3194 orcus::file_content content(path);
3195 - filter.read_stream(content.data(), content.size());
3196 + filter.read_stream(content.str());
3198 aFactory.finalize();
3200 diff --git a/sfx2/source/control/emojiview.cxx b/sfx2/source/control/emojiview.cxx
3201 index 7475263044e2..f125552296e4 100644
3202 --- a/sfx2/source/control/emojiview.cxx
3203 +++ b/sfx2/source/control/emojiview.cxx
3204 @@ -21,7 +21,6 @@
3206 #include <orcus/json_document_tree.hpp>
3207 #include <orcus/config.hpp>
3208 -#include <orcus/pstring.hpp>
3209 #include <string>
3210 #include <string_view>
3211 #include <fstream>
3212 @@ -122,7 +121,7 @@ void EmojiView::Populate()
3213 aEmojiInfo.load(msJSONData, config);
3215 node root = aEmojiInfo.get_document_root();
3216 - std::vector<orcus::pstring> keys = root.keys();
3217 + std::vector<std::string_view> keys = root.keys();
3219 for (auto const& key : keys)
3221 @@ -131,7 +130,7 @@ void EmojiView::Populate()
3222 if(value.type() == orcus::json::node_t::object)
3224 // iterate each element to get the keys
3225 - std::vector<orcus::pstring> aEmojiParams = value.keys();
3226 + std::vector<std::string_view> aEmojiParams = value.keys();
3227 OUString sTitle, sCategory, sName;
3228 bool bDuplicate = false;
3230 @@ -142,15 +141,15 @@ void EmojiView::Populate()
3231 // get values of parameters in AppendItem() function
3232 if(emojiParam == "unicode")
3234 - sTitle = OStringToOUString(std::string_view( prop.string_value().get(), prop.string_value().size() ), RTL_TEXTENCODING_UTF8);
3235 + sTitle = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
3237 else if(emojiParam == "category")
3239 - sCategory = OStringToOUString(std::string_view( prop.string_value().get(), prop.string_value().size() ), RTL_TEXTENCODING_UTF8);
3240 + sCategory = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
3242 else if(emojiParam == "name")
3244 - sName = OStringToOUString(std::string_view( prop.string_value().get(), prop.string_value().size() ), RTL_TEXTENCODING_UTF8);
3245 + sName = OStringToOUString(prop.string_value(), RTL_TEXTENCODING_UTF8);
3247 else if(emojiParam == "duplicate")
3249 diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
3250 index 295b31b1d3ae..1460ae5b9a5d 100644
3251 --- a/solenv/flatpak-manifest.in
3252 +++ b/solenv/flatpak-manifest.in
3253 @@ -397,11 +397,11 @@
3254 "dest-filename": "mariadb-connector-c-3.1.8-src.tar.gz"
3257 - "url": "https://dev-www.libreoffice.org/src/mdds-1.7.0.tar.bz2",
3258 - "sha256": "a66a2a8293a3abc6cd9baff7c236156e2666935cbfb69a15d64d38141638fecf",
3259 + "url": "https://dev-www.libreoffice.org/src/mdds-2.0.0.tar.bz2",
3260 + "sha256": "5a0fb2dd88a6420e0a69ec4c7259bcd1fe8f4a80b232c150e11f3da4c68236d7",
3261 "type": "file",
3262 "dest": "external/tarballs",
3263 - "dest-filename": "mdds-1.7.0.tar.bz2"
3264 + "dest-filename": "mdds-2.0.0.tar.bz2"
3267 "url": "https://dev-www.libreoffice.org/src/neon-0.31.2.tar.gz",
3268 @@ -425,11 +425,11 @@
3269 "dest-filename": "openldap-2.4.59.tgz"
3272 - "url": "https://dev-www.libreoffice.org/src/liborcus-0.16.1.tar.bz2",
3273 - "sha256": "c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f90a298587a4",
3274 + "url": "https://dev-www.libreoffice.org/src/liborcus-0.17.0.tar.bz2",
3275 + "sha256": "2ef9d2b5ee374c683cf631b78356b110510ab895788a68d778e225d8c4176d1b",
3276 "type": "file",
3277 "dest": "external/tarballs",
3278 - "dest-filename": "liborcus-0.16.1.tar.bz2"
3279 + "dest-filename": "liborcus-0.17.0.tar.bz2"
3282 "url": "https://dev-www.libreoffice.org/src/poppler-21.11.0.tar.xz",
3284 cgit v1.2.1
3286 From 23214f1c14c4d3981dad90b6e3ba6e4ca2c8c30e Mon Sep 17 00:00:00 2001
3287 From: Kohei Yoshida <kohei@libreoffice.org>
3288 Date: Thu, 4 Nov 2021 09:58:35 -0400
3289 Subject: Blind fix for ubusan error
3291 from https://ci.libreoffice.org/job/lo_ubsan/2189/
3293 [_RUN_____] Test::testCellBroadcaster
3294 [...]
3295 ==24129==ERROR: AddressSanitizer: heap-use-after-free on address 0x61700006c470 at pc 0x2ab6e05145e4 bp 0x7ffecaa28d70 sp 0x7ffecaa28d68
3296 READ of size 8 at 0x61700006c470 thread T0
3297 #0 0x2ab6e05145e3 in sc::CellStoreEvent::element_block_released(mdds::mtv::base_element_block const*) /sc/source/core/data/mtvelements.cxx:47:13
3298 #1 0x2ab6de749427 in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::delete_element_block(unsigned long) /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:403:17
3299 #2 0x2ab6de74921b in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::delete_element_blocks(unsigned long, unsigned long) /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:412:9
3300 #3 0x2ab6de733225 in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::clear() /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1088:5
3301 #4 0x2ab6df024987 in ScColumn::FreeAll() /sc/source/core/data/column3.cxx:161:13
3302 #5 0x2ab6decff134 in ScColumn::~ScColumn() /sc/source/core/data/column.cxx:97:5
3303 #6 0x2ab6decf708a in o3tl::default_delete<ScColumn>::operator()(ScColumn*) /include/o3tl/deleter.hxx:55:38
3304 #7 0x2ab6decf5999 in std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn> >::reset(ScColumn*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:376:4
3305 #8 0x2ab6decf4c8e in ScColContainer::Clear() /sc/source/core/data/colcontainer.cxx:42:21
3306 #9 0x2ab6decf4a84 in ScColContainer::~ScColContainer() /sc/source/core/data/colcontainer.cxx:33:5
3307 #10 0x2ab6e070e3c6 in ScTable::~ScTable() /sc/source/core/data/table1.cxx:344:1
3308 #11 0x2ab6df50abba in o3tl::default_delete<ScTable>::operator()(ScTable*) /include/o3tl/deleter.hxx:55:38
3309 #12 0x2ab6df4c3483 in std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >::~unique_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4
3310 #13 0x2ab6df4dc87c in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:98:19
3311 #14 0x2ab6df4dc7c6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:108:6
3312 #15 0x2ab6df4dc744 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:136:7
3313 #16 0x2ab6df4dc488 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:206:7
3314 #17 0x2ab6df50df73 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::_M_erase_at_end(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1513:2
3315 #18 0x2ab6df70f5b0 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248:9
3316 #19 0x2ab6df70b5d4 in std::__debug::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/vector:699:9
3317 #20 0x2ab6df704cb2 in ScDocument::Clear(bool) /sc/source/core/data/documen9.cxx:506:12
3318 #21 0x2ab6df490652 in ScDocument::~ScDocument() /sc/source/core/data/documen2.cxx:363:5
3319 #22 0x2ab6e363315d in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2925:1
3320 #23 0x2ab6e363333b in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1
3321 #24 0x2ab6e3633514 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1
3322 #25 0x2ab6de4f105d in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29
3323 #26 0x2ab6de4a6259 in tools::SvRef<ScDocShell>::clear() /include/tools/ref.hxx:64:22
3324 #27 0x2ab6de2b1aaa in Test::closeDocShell(tools::SvRef<ScDocShell>&) /sc/qa/unit/ucalc.cxx:365:18
3325 #28 0x2ab6de2b2102 in Test::tearDown() /sc/qa/unit/ucalc.cxx:380:5
3326 #29 0x2ab6de543787 in CppUnit::TestCaller<Test>::tearDown() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:185:15
3327 #30 0x2ab69335765a in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
3328 #31 0x2ab6ae4f3957 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14
3329 #32 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3330 #33 0x2ab6a2974ff7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12
3331 #34 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3332 #35 0x2ab69f4479c2 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:62:16
3333 #36 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3334 #37 0x2ab6932bfff4 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12
3335 #38 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3336 #39 0x2ab69332272c in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18
3337 #40 0x2ab6933c1b39 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28
3338 #41 0x2ab693356092 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:95:11
3339 #42 0x2ab693359af2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
3340 #43 0x2ab693358cea in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
3341 #44 0x2ab693359af2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30
3342 #45 0x2ab693358cea in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3
3343 #46 0x2ab6933ef6ce in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27
3344 #47 0x2ab6933c059e in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9
3345 #48 0x2ab6933f062b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14
3346 #49 0x4ff1d5 in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:329:20
3347 #50 0x4fbbc5 in main2() /sal/cppunittester/cppunittester.cxx:478:16
3348 #51 0x4fa052 in sal_main() /sal/cppunittester/cppunittester.cxx:614:14
3349 #52 0x4f9e9e in main /sal/cppunittester/cppunittester.cxx:609:1
3350 #53 0x2ab69517d554 in __libc_start_main (/lib64/libc.so.6+0x22554)
3351 #54 0x425894 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425894)
3353 0x61700006c470 is located 752 bytes inside of 768-byte region [0x61700006c180,0x61700006c480)
3354 freed by thread T0 here:
3355 #0 0x4f7548 in operator delete(void*, unsigned long) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:172
3356 #1 0x2ab6decf709b in o3tl::default_delete<ScColumn>::operator()(ScColumn*) /include/o3tl/deleter.hxx:55:38
3357 #2 0x2ab6decf5999 in std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn> >::reset(ScColumn*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:376:4
3358 #3 0x2ab6decf4c8e in ScColContainer::Clear() /sc/source/core/data/colcontainer.cxx:42:21
3359 #4 0x2ab6decf4a84 in ScColContainer::~ScColContainer() /sc/source/core/data/colcontainer.cxx:33:5
3360 #5 0x2ab6e070e3c6 in ScTable::~ScTable() /sc/source/core/data/table1.cxx:344:1
3361 #6 0x2ab6df50abba in o3tl::default_delete<ScTable>::operator()(ScTable*) /include/o3tl/deleter.hxx:55:38
3362 #7 0x2ab6df4c3483 in std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >::~unique_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4
3363 #8 0x2ab6df4dc87c in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:98:19
3364 #9 0x2ab6df4dc7c6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:108:6
3365 #10 0x2ab6df4dc744 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:136:7
3366 #11 0x2ab6df4dc488 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:206:7
3367 #12 0x2ab6df50df73 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::_M_erase_at_end(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1513:2
3368 #13 0x2ab6df70f5b0 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248:9
3369 #14 0x2ab6df70b5d4 in std::__debug::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/vector:699:9
3370 #15 0x2ab6df704cb2 in ScDocument::Clear(bool) /sc/source/core/data/documen9.cxx:506:12
3371 #16 0x2ab6df490652 in ScDocument::~ScDocument() /sc/source/core/data/documen2.cxx:363:5
3372 #17 0x2ab6e363315d in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2925:1
3373 #18 0x2ab6e363333b in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1
3374 #19 0x2ab6e3633514 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1
3375 #20 0x2ab6de4f105d in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29
3376 #21 0x2ab6de4a6259 in tools::SvRef<ScDocShell>::clear() /include/tools/ref.hxx:64:22
3377 #22 0x2ab6de2b1aaa in Test::closeDocShell(tools::SvRef<ScDocShell>&) /sc/qa/unit/ucalc.cxx:365:18
3378 #23 0x2ab6de2b2102 in Test::tearDown() /sc/qa/unit/ucalc.cxx:380:5
3379 #24 0x2ab6de543787 in CppUnit::TestCaller<Test>::tearDown() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:185:15
3380 #25 0x2ab69335765a in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
3381 #26 0x2ab6ae4f3957 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14
3382 #27 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3383 #28 0x2ab6a2974ff7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12
3384 #29 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25
3386 during CppunitTest_sc_ucalc
3388 Change-Id: I778984beb9d1e355d3b8f9617b193424f332a32e
3389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124709
3390 Tested-by: Jenkins
3391 Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
3393 sc/inc/column.hxx | 2 --
3394 sc/inc/mtvelements.hxx | 3 +++
3395 sc/source/core/data/column.cxx | 3 +--
3396 sc/source/core/data/column3.cxx | 2 ++
3397 sc/source/core/data/mtvelements.cxx | 5 +++++
3398 5 files changed, 11 insertions(+), 4 deletions(-)
3400 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
3401 index 6300fe70bca1..4c08e7b41479 100644
3402 --- a/sc/inc/column.hxx
3403 +++ b/sc/inc/column.hxx
3404 @@ -123,8 +123,6 @@ class ScColumn
3405 // Broadcasters for formula cells.
3406 sc::BroadcasterStoreType maBroadcasters;
3408 - sc::CellStoreEvent maCellsEvent;
3410 // Cell values.
3411 sc::CellStoreType maCells;
3413 diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
3414 index 636706e0c234..05a0970bd64d 100644
3415 --- a/sc/inc/mtvelements.hxx
3416 +++ b/sc/inc/mtvelements.hxx
3417 @@ -95,6 +95,9 @@ public:
3419 void element_block_acquired(const mdds::mtv::base_element_block* block);
3420 void element_block_released(const mdds::mtv::base_element_block* block);
3422 + /** Stop processing events. */
3423 + void stop();
3426 struct CellStoreTrait
3427 diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
3428 index 4bd91f60f3a0..3b148dda6b88 100644
3429 --- a/sc/source/core/data/column.cxx
3430 +++ b/sc/source/core/data/column.cxx
3431 @@ -82,8 +82,7 @@ ScColumn::ScColumn(ScSheetLimits const & rSheetLimits) :
3432 maCellTextAttrs(rSheetLimits.GetMaxRowCount()),
3433 maCellNotes(rSheetLimits.GetMaxRowCount()),
3434 maBroadcasters(rSheetLimits.GetMaxRowCount()),
3435 - maCellsEvent(this),
3436 - maCells(maCellsEvent),
3437 + maCells(sc::CellStoreEvent(this)),
3438 mnBlkCountFormula(0),
3439 nCol( 0 ),
3440 nTab( 0 ),
3441 diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
3442 index 9bbd9c1bca77..4a062a476a32 100644
3443 --- a/sc/source/core/data/column3.cxx
3444 +++ b/sc/source/core/data/column3.cxx
3445 @@ -156,6 +156,8 @@ void ScColumn::Delete( SCROW nRow )
3447 void ScColumn::FreeAll()
3449 + maCells.event_handler().stop();
3451 auto maxRowCount = GetDoc().GetSheetLimits().GetMaxRowCount();
3452 // Keep a logical empty range of 0-rDoc.MaxRow() at all times.
3453 maCells.clear();
3454 diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx
3455 index c7d7e52bfccf..ee6c9cf1499c 100644
3456 --- a/sc/source/core/data/mtvelements.cxx
3457 +++ b/sc/source/core/data/mtvelements.cxx
3458 @@ -51,6 +51,11 @@ void CellStoreEvent::element_block_released(const mdds::mtv::base_element_block*
3462 +void CellStoreEvent::stop()
3464 + mpCol = nullptr;
3467 ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) {}
3469 ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL nCol)
3471 cgit v1.2.1
3473 From 037d5454a39260635aeb7064ac32c7a485af8197 Mon Sep 17 00:00:00 2001
3474 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3475 Date: Wed, 17 Nov 2021 10:27:03 +0000
3476 Subject: crashtesting: crash on passing null to std::string_view
3477 MIME-Version: 1.0
3478 Content-Type: text/plain; charset=UTF-8
3479 Content-Transfer-Encoding: 8bit
3481 with many documents, e.g. moz377878-1.xhtml
3483 https: //gitlab.com/orcus/orcus/-/merge_requests/113
3484 Change-Id: I085543ebb28c02a1c0ec487b357f6e0a83004363
3485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125378
3486 Tested-by: Caolán McNamara <caolanm@redhat.com>
3487 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
3489 external/liborcus/UnpackedTarball_liborcus.mk | 4 ++++
3490 ...crash-on-passing-null-to-std-string_vie.patch.1 | 27 ++++++++++++++++++++++
3491 2 files changed, 31 insertions(+)
3492 create mode 100644 external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3494 diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
3495 index 3d2cec42e55e..86c30431e05d 100644
3496 --- a/external/liborcus/UnpackedTarball_liborcus.mk
3497 +++ b/external/liborcus/UnpackedTarball_liborcus.mk
3498 @@ -15,6 +15,9 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
3500 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus))
3502 +# crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 submitted as
3503 +# https://gitlab.com/orcus/orcus/-/merge_requests/113
3505 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
3506 external/liborcus/rpath.patch.0 \
3507 external/liborcus/gcc9.patch.0 \
3508 @@ -37,6 +37,7 @@
3509 external/liborcus/unused-variables.patch.1 \
3510 external/liborcus/boost-filesystem.patch.1 \
3511 external/liborcus/std-get-busted.patch.1 \
3512 + external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 \
3513 external/liborcus/forcepoint-83.patch.1 \
3514 external/liborcus/forcepoint-84.patch.1 \
3515 external/liborcus/forcepoint-87.patch.1 \
3516 diff --git a/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 b/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3517 new file mode 100644
3518 index 000000000000..97e7b8366fde
3519 --- /dev/null
3520 +++ b/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3521 @@ -0,0 +1,27 @@
3522 +From ed21a93e132b968d8cd91aa080e1f90e980267c7 Mon Sep 17 00:00:00 2001
3523 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3524 +Date: Wed, 17 Nov 2021 10:21:32 +0000
3525 +Subject: [PATCH] crashtesting: crash on passing null to std::string_view
3527 +with many documents, e.g. moz377878-1.xhtml
3528 +---
3529 + src/parser/xml_namespace.cpp | 3 ++-
3530 + 1 file changed, 2 insertions(+), 1 deletion(-)
3532 +diff --git a/src/parser/xml_namespace.cpp b/src/parser/xml_namespace.cpp
3533 +index 07942563..66077d9c 100644
3534 +--- a/src/parser/xml_namespace.cpp
3535 ++++ b/src/parser/xml_namespace.cpp
3536 +@@ -223,7 +223,8 @@ xmlns_id_t xmlns_context::push(std::string_view key, std::string_view uri)
3537 + #endif
3538 + mp_impl->m_trim_all_ns = true;
3540 +- std::string_view uri_interned = mp_impl->repo->intern(uri);
3541 ++ xmlns_id_t id = mp_impl->repo->intern(uri);
3542 ++ std::string_view uri_interned = id ? std::string_view(id) : std::string_view();
3544 + if (key.empty())
3546 +--
3547 +2.33.1
3550 cgit v1.2.1
3552 From dd4d715ef775db456c0c9653a3d9f9b439e82e8e Mon Sep 17 00:00:00 2001
3553 From: Kohei Yoshida <kohei@libreoffice.org>
3554 Date: Fri, 10 Dec 2021 22:02:24 -0500
3555 Subject: Update liborcus to 0.17.2.
3557 Change-Id: I76c0d57da63c1e35f80b13071793dbbb27cb218a
3558 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126655
3559 Tested-by: Jenkins
3560 Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
3561 (cherry picked from commit aadbac5467bb6ab768f87ed6ec003c55159d54aa)
3562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126886
3564 download.lst | 4 +-
3565 external/liborcus/Library_orcus.mk | 3 +
3566 external/liborcus/UnpackedTarball_liborcus.mk | 4 -
3567 external/liborcus/boost-filesystem.patch.1 | 41 -
3568 ...crash-on-passing-null-to-std-string_vie.patch.1 | 27 -
3569 external/liborcus/remove-unused-parameters.patch.1 | 1209 --------------------
3570 external/liborcus/unused-variables.patch.1 | 24 -
3571 external/liborcus/windows-constants-hack.patch | 4 +-
3572 sc/source/filter/orcus/interface.cxx | 7 +-
3573 9 files changed, 10 insertions(+), 1313 deletions(-)
3574 delete mode 100644 external/liborcus/boost-filesystem.patch.1
3575 delete mode 100644 external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3576 delete mode 100644 external/liborcus/remove-unused-parameters.patch.1
3577 delete mode 100644 external/liborcus/unused-variables.patch.1
3579 diff --git a/download.lst b/download.lst
3580 index 8dd656fd5de9..b2ca26814d5b 100644
3581 --- a/download.lst
3582 +++ b/download.lst
3583 @@ -204,8 +204,8 @@ export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217
3584 export OPENLDAP_TARBALL := openldap-2.4.59.tgz
3585 export OPENSSL_SHA256SUM := 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
3586 export OPENSSL_TARBALL := openssl-1.1.1l.tar.gz
3587 -export ORCUS_SHA256SUM := 2ef9d2b5ee374c683cf631b78356b110510ab895788a68d778e225d8c4176d1b
3588 -export ORCUS_TARBALL := liborcus-0.17.0.tar.bz2
3589 +export ORCUS_SHA256SUM := 2a86c405a5929f749b27637509596421d46805753364ab258b035fd01fbde143
3590 +export ORCUS_TARBALL := liborcus-0.17.2.tar.bz2
3591 export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
3592 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
3593 export PDFIUM_SHA256SUM := 26a03dd60e5ed0979cdaba9cc848242895110ddfdf347d40989ce2f14020f304
3594 diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
3595 index 0a0ca582882a..3c318797a031 100644
3596 --- a/external/liborcus/Library_orcus.mk
3597 +++ b/external/liborcus/Library_orcus.mk
3598 @@ -132,12 +132,15 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
3599 UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \
3600 UnpackedTarball/liborcus/src/liborcus/xml_context_base \
3601 UnpackedTarball/liborcus/src/liborcus/xml_context_global \
3602 + UnpackedTarball/liborcus/src/liborcus/xml_element_validator \
3603 + UnpackedTarball/liborcus/src/liborcus/xml_empty_context \
3604 UnpackedTarball/liborcus/src/liborcus/xml_map_tree \
3605 UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \
3606 UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
3607 UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
3608 UnpackedTarball/liborcus/src/liborcus/xml_structure_mapper \
3609 UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
3610 + UnpackedTarball/liborcus/src/liborcus/xml_util \
3611 UnpackedTarball/liborcus/src/liborcus/xpath_parser \
3612 UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \
3614 diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
3615 index 86c30431e05d..87e462e33d91 100644
3616 --- a/external/liborcus/UnpackedTarball_liborcus.mk
3617 +++ b/external/liborcus/UnpackedTarball_liborcus.mk
3618 @@ -33,11 +33,7 @@
3619 external/liborcus/libtool.patch.0 \
3620 external/liborcus/fix-pch.patch.0 \
3621 external/liborcus/liborcus_newline.patch.1 \
3622 - external/liborcus/remove-unused-parameters.patch.1 \
3623 - external/liborcus/unused-variables.patch.1 \
3624 - external/liborcus/boost-filesystem.patch.1 \
3625 external/liborcus/std-get-busted.patch.1 \
3626 - external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 \
3627 external/liborcus/forcepoint-83.patch.1 \
3628 external/liborcus/forcepoint-84.patch.1 \
3629 external/liborcus/forcepoint-87.patch.1 \
3630 diff --git a/external/liborcus/boost-filesystem.patch.1 b/external/liborcus/boost-filesystem.patch.1
3631 deleted file mode 100644
3632 index 14128b4e1c67..000000000000
3633 --- a/external/liborcus/boost-filesystem.patch.1
3634 +++ /dev/null
3635 @@ -1,41 +0,0 @@
3636 -From e44737bad582fa2a05a23820e49d7930db710412 Mon Sep 17 00:00:00 2001
3637 -From: Kohei Yoshida <kohei.yoshida@gmail.com>
3638 -Date: Tue, 2 Nov 2021 21:33:19 -0400
3639 -Subject: [PATCH] Try using boost::filesystem instead of std::filesystem.
3641 -std::filesystem still seems unreliable.
3642 ----
3643 - src/parser/stream.cpp | 6 +++---
3644 - 1 file changed, 3 insertions(+), 3 deletions(-)
3646 -diff --git a/src/parser/stream.cpp b/src/parser/stream.cpp
3647 -index 09855300..00395f59 100644
3648 ---- a/src/parser/stream.cpp
3649 -+++ b/src/parser/stream.cpp
3650 -@@ -17,12 +17,12 @@
3651 - #include <locale>
3652 - #include <codecvt>
3653 - #include <iostream>
3654 --#include <filesystem>
3656 -+#include <boost/filesystem.hpp>
3657 - #include <boost/interprocess/file_mapping.hpp>
3658 - #include <boost/interprocess/mapped_region.hpp>
3660 --namespace fs = std::filesystem;
3661 -+namespace fs = boost::filesystem;
3662 - namespace bip = boost::interprocess;
3664 - namespace orcus {
3665 -@@ -162,7 +162,7 @@ struct file_content::impl
3666 - impl() : content_size(0), content(nullptr) {}
3668 - impl(std::string_view filepath) :
3669 -- content_size(fs::file_size(filepath)),
3670 -+ content_size(fs::file_size(std::string{filepath}.c_str())),
3671 - mapped_file(std::string{filepath}.c_str(), bip::read_only),
3672 - mapped_region(mapped_file, bip::read_only, 0, content_size),
3673 - content(nullptr)
3674 ---
3675 -2.25.1
3677 diff --git a/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1 b/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3678 deleted file mode 100644
3679 index 97e7b8366fde..000000000000
3680 --- a/external/liborcus/crashtesting-crash-on-passing-null-to-std-string_vie.patch.1
3681 +++ /dev/null
3682 @@ -1,27 +0,0 @@
3683 -From ed21a93e132b968d8cd91aa080e1f90e980267c7 Mon Sep 17 00:00:00 2001
3684 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3685 -Date: Wed, 17 Nov 2021 10:21:32 +0000
3686 -Subject: [PATCH] crashtesting: crash on passing null to std::string_view
3688 -with many documents, e.g. moz377878-1.xhtml
3689 ----
3690 - src/parser/xml_namespace.cpp | 3 ++-
3691 - 1 file changed, 2 insertions(+), 1 deletion(-)
3693 -diff --git a/src/parser/xml_namespace.cpp b/src/parser/xml_namespace.cpp
3694 -index 07942563..66077d9c 100644
3695 ---- a/src/parser/xml_namespace.cpp
3696 -+++ b/src/parser/xml_namespace.cpp
3697 -@@ -223,7 +223,8 @@ xmlns_id_t xmlns_context::push(std::string_view key, std::string_view uri)
3698 - #endif
3699 - mp_impl->m_trim_all_ns = true;
3701 -- std::string_view uri_interned = mp_impl->repo->intern(uri);
3702 -+ xmlns_id_t id = mp_impl->repo->intern(uri);
3703 -+ std::string_view uri_interned = id ? std::string_view(id) : std::string_view();
3705 - if (key.empty())
3707 ---
3708 -2.33.1
3710 diff --git a/external/liborcus/remove-unused-parameters.patch.1 b/external/liborcus/remove-unused-parameters.patch.1
3711 deleted file mode 100644
3712 index 251ed804acaf..000000000000
3713 --- a/external/liborcus/remove-unused-parameters.patch.1
3714 +++ /dev/null
3715 @@ -1,1209 +0,0 @@
3716 -From 5bb64db5ecfd1dc3be3304092f4bdebff54deae5 Mon Sep 17 00:00:00 2001
3717 -From: Kohei Yoshida <kohei.yoshida@gmail.com>
3718 -Date: Tue, 2 Nov 2021 19:33:29 -0400
3719 -Subject: [PATCH] Remove unused parameter warnings.
3721 ----
3722 - doc_example/json_parser_1.cpp | 4 +-
3723 - ...preadsheet_doc_2_sheets_no_string_pool.cpp | 22 ++++-----
3724 - .../spreadsheet_doc_2_sheets_with_formula.cpp | 47 +++++++++----------
3725 - ...eadsheet_doc_2_sheets_with_string_pool.cpp | 40 +++++++---------
3726 - doc_example/xml_mapping_1.cpp | 2 +-
3727 - src/liborcus/css_document_tree.cpp | 3 ++
3728 - src/liborcus/dom_tree.cpp | 2 +-
3729 - src/liborcus/gnumeric_cell_context_test.cpp | 14 +++---
3730 - src/liborcus/json_document_tree.cpp | 6 +--
3731 - src/liborcus/json_structure_mapper.cpp | 2 +-
3732 - src/liborcus/json_structure_tree.cpp | 4 +-
3733 - src/liborcus/mock_spreadsheet.cpp | 14 +++---
3734 - src/liborcus/ods_dde_links_context.cpp | 10 ++--
3735 - src/liborcus/opc_context.cpp | 16 +++----
3736 - src/liborcus/orcus_json.cpp | 4 +-
3737 - src/liborcus/orcus_xml_map_def.cpp | 4 +-
3738 - src/liborcus/spreadsheet_interface.cpp | 4 +-
3739 - src/liborcus/xls_xml_context.cpp | 12 ++---
3740 - src/liborcus/xls_xml_detection_handler.cpp | 2 +-
3741 - src/liborcus/xlsx_drawing_context.cpp | 2 +-
3742 - src/liborcus/xlsx_sheet_context.cpp | 2 +-
3743 - src/liborcus/xlsx_sheet_context_test.cpp | 8 ++--
3744 - src/liborcus/xlsx_table_context.cpp | 2 +-
3745 - src/liborcus/xml_structure_tree.cpp | 6 +--
3746 - src/liborcus/xpath_parser_test.cpp | 2 +-
3747 - src/orcus_env_dump.cpp | 2 +-
3748 - src/orcus_test_json_mapped.cpp | 2 +-
3749 - src/orcus_test_xml.cpp | 2 +-
3750 - src/orcus_test_xml_mapped.cpp | 2 +-
3751 - src/parser/sax_token_parser_test.cpp | 2 +-
3752 - src/parser/sax_token_parser_thread.cpp | 2 +-
3753 - src/parser/utf8.cpp | 2 +-
3754 - src/parser/utf8_test.cpp | 2 +-
3755 - src/parser/xml_writer_test.cpp | 2 +-
3756 - src/python/cell.cpp | 2 +-
3757 - src/python/document.cpp | 4 +-
3758 - src/python/formula_tokens.cpp | 2 +-
3759 - src/python/global.cpp | 2 +-
3760 - src/python/json.cpp | 4 +-
3761 - src/python/named_expression.cpp | 2 +-
3762 - src/python/named_expressions.cpp | 4 +-
3763 - src/python/sheet.cpp | 6 +--
3764 - src/python/sheet_rows.cpp | 2 +-
3765 - src/spreadsheet/factory_sheet.cpp | 18 +++----
3766 - src/spreadsheet/sheet_impl.cpp | 2 +-
3767 - 45 files changed, 143 insertions(+), 157 deletions(-)
3769 -diff --git a/doc_example/json_parser_1.cpp b/doc_example/json_parser_1.cpp
3770 -index 6fc6de12..832e5176 100644
3771 ---- a/doc_example/json_parser_1.cpp
3772 -+++ b/doc_example/json_parser_1.cpp
3773 -@@ -8,12 +8,12 @@ using namespace std;
3774 - class json_parser_handler : public orcus::json_handler
3776 - public:
3777 -- void object_key(const char* p, size_t len, bool transient)
3778 -+ void object_key(const char* p, size_t len, bool /*transient*/)
3780 - cout << "object key: " << std::string_view(p, len) << endl;
3783 -- void string(const char* p, size_t len, bool transient)
3784 -+ void string(const char* p, size_t len, bool /*transient*/)
3786 - cout << "string: " << std::string_view(p, len) << endl;
3788 -diff --git a/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp b/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
3789 -index 63ffacc3..0aa86caf 100644
3790 ---- a/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
3791 -+++ b/doc_example/spreadsheet_doc_2_sheets_no_string_pool.cpp
3792 -@@ -64,22 +64,17 @@ public:
3795 - // We don't implement these methods for now.
3796 -- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
3797 -+ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
3799 -- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
3800 -+ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
3802 -- virtual void set_date_time(
3803 -- ss::row_t row, ss::col_t col,
3804 -- int year, int month, int day, int hour, int minute, double second) override {}
3805 -+ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
3807 -- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
3808 -+ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
3810 -- virtual void set_format(
3811 -- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
3812 -- std::size_t xf_index) override {}
3813 -+ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
3815 -- virtual void fill_down_cells(
3816 -- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
3817 -+ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
3818 - };
3819 - //!code-end: my_sheet
3821 -@@ -89,14 +84,13 @@ class my_import_factory : public ss::iface::import_factory
3822 - std::vector<std::unique_ptr<my_sheet>> m_sheets;
3824 - public:
3825 -- virtual ss::iface::import_sheet* append_sheet(
3826 -- ss::sheet_t sheet_index, std::string_view name) override
3827 -+ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
3829 - m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size()));
3830 - return m_sheets.back().get();
3833 -- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
3834 -+ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
3836 - // TODO : implement this.
3837 - return nullptr;
3838 -diff --git a/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp b/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
3839 -index 1c3f3d5b..11e1932e 100644
3840 ---- a/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
3841 -+++ b/doc_example/spreadsheet_doc_2_sheets_with_formula.cpp
3842 -@@ -87,15 +87,15 @@ public:
3843 - m_formula.grammar = grammar;
3846 -- virtual void set_shared_formula_index(std::size_t index) override {}
3847 -+ virtual void set_shared_formula_index(std::size_t) override {}
3849 -- virtual void set_result_string(std::string_view value) override {}
3850 -+ virtual void set_result_string(std::string_view) override {}
3852 -- virtual void set_result_value(double value) override {}
3853 -+ virtual void set_result_value(double) override {}
3855 - virtual void set_result_empty() override {}
3857 -- virtual void set_result_bool(bool value) override {}
3858 -+ virtual void set_result_bool(bool) override {}
3860 - virtual void commit() override
3862 -@@ -154,22 +154,17 @@ public:
3865 - // We don't implement these methods for now.
3866 -- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
3867 -+ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
3869 -- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
3870 -+ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
3872 -- virtual void set_date_time(
3873 -- ss::row_t row, ss::col_t col,
3874 -- int year, int month, int day, int hour, int minute, double second) override {}
3875 -+ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
3877 -- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
3878 -+ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
3880 -- virtual void set_format(
3881 -- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
3882 -- std::size_t xf_index) override {}
3883 -+ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
3885 -- virtual void fill_down_cells(
3886 -- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
3887 -+ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
3889 - virtual ss::iface::import_formula* get_formula() override
3891 -@@ -208,21 +203,21 @@ public:
3894 - // The following methods are for formatted text segments, which we ignore for now.
3895 -- virtual void set_segment_bold(bool b) override {}
3896 -+ virtual void set_segment_bold(bool) override {}
3898 -- virtual void set_segment_font(std::size_t font_index) override {}
3899 -+ virtual void set_segment_font(std::size_t) override {}
3901 - virtual void set_segment_font_color(
3902 -- ss::color_elem_t alpha,
3903 -- ss::color_elem_t red,
3904 -- ss::color_elem_t green,
3905 -- ss::color_elem_t blue) override {}
3906 -+ ss::color_elem_t,
3907 -+ ss::color_elem_t,
3908 -+ ss::color_elem_t,
3909 -+ ss::color_elem_t) override {}
3911 -- virtual void set_segment_font_name(std::string_view s) override {}
3912 -+ virtual void set_segment_font_name(std::string_view) override {}
3914 -- virtual void set_segment_font_size(double point) override {}
3915 -+ virtual void set_segment_font_size(double) override {}
3917 -- virtual void set_segment_italic(bool b) override {}
3918 -+ virtual void set_segment_italic(bool) override {}
3920 - virtual void append_segment(std::string_view s) override
3922 -@@ -256,14 +251,14 @@ public:
3923 - return &m_shared_strings;
3926 -- virtual ss::iface::import_sheet* append_sheet(ss::sheet_t sheet_index, std::string_view name) override
3927 -+ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
3929 - // Pass the string pool to each sheet instance.
3930 - m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size(), m_string_pool));
3931 - return m_sheets.back().get();
3934 -- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
3935 -+ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
3937 - // TODO : implement this.
3938 - return nullptr;
3939 -diff --git a/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp b/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
3940 -index ff69c835..0153dd08 100644
3941 ---- a/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
3942 -+++ b/doc_example/spreadsheet_doc_2_sheets_with_string_pool.cpp
3943 -@@ -70,22 +70,17 @@ public:
3946 - // We don't implement these methods for now.
3947 -- virtual void set_auto(ss::row_t row, ss::col_t col, std::string_view s) override {}
3948 -+ virtual void set_auto(ss::row_t, ss::col_t, std::string_view) override {}
3950 -- virtual void set_bool(ss::row_t row, ss::col_t col, bool value) override {}
3951 -+ virtual void set_bool(ss::row_t, ss::col_t, bool) override {}
3953 -- virtual void set_date_time(
3954 -- ss::row_t row, ss::col_t col,
3955 -- int year, int month, int day, int hour, int minute, double second) override {}
3956 -+ virtual void set_date_time(ss::row_t, ss::col_t, int, int, int, int, int, double) override {}
3958 -- virtual void set_format(ss::row_t row, ss::col_t col, std::size_t xf_index) override {}
3959 -+ virtual void set_format(ss::row_t, ss::col_t, std::size_t) override {}
3961 -- virtual void set_format(
3962 -- ss::row_t row_start, ss::col_t col_start, ss::row_t row_end, ss::col_t col_end,
3963 -- std::size_t xf_index) override {}
3964 -+ virtual void set_format(ss::row_t, ss::col_t, ss::row_t, ss::col_t, std::size_t) override {}
3966 -- virtual void fill_down_cells(
3967 -- ss::row_t src_row, ss::col_t src_col, ss::row_t range_size) override {}
3968 -+ virtual void fill_down_cells(ss::row_t, ss::col_t, ss::row_t) override {}
3969 - };
3971 - //!code-start: my_shared_strings
3972 -@@ -119,21 +114,21 @@ public:
3975 - // The following methods are for formatted text segments, which we ignore for now.
3976 -- virtual void set_segment_bold(bool b) override {}
3977 -+ virtual void set_segment_bold(bool) override {}
3979 -- virtual void set_segment_font(std::size_t font_index) override {}
3980 -+ virtual void set_segment_font(std::size_t) override {}
3982 - virtual void set_segment_font_color(
3983 -- ss::color_elem_t alpha,
3984 -- ss::color_elem_t red,
3985 -- ss::color_elem_t green,
3986 -- ss::color_elem_t blue) override {}
3987 -+ ss::color_elem_t,
3988 -+ ss::color_elem_t,
3989 -+ ss::color_elem_t,
3990 -+ ss::color_elem_t) override {}
3992 -- virtual void set_segment_font_name(std::string_view s) override {}
3993 -+ virtual void set_segment_font_name(std::string_view) override {}
3995 -- virtual void set_segment_font_size(double point) override {}
3996 -+ virtual void set_segment_font_size(double) override {}
3998 -- virtual void set_segment_italic(bool b) override {}
3999 -+ virtual void set_segment_italic(bool) override {}
4001 - virtual void append_segment(std::string_view s) override
4003 -@@ -169,15 +164,14 @@ public:
4004 - return &m_shared_strings;
4007 -- virtual ss::iface::import_sheet* append_sheet(
4008 -- ss::sheet_t sheet_index, std::string_view name) override
4009 -+ virtual ss::iface::import_sheet* append_sheet(ss::sheet_t, std::string_view) override
4011 - // Pass the string pool to each sheet instance.
4012 - m_sheets.push_back(std::make_unique<my_sheet>(m_sheets.size(), m_string_pool));
4013 - return m_sheets.back().get();
4016 -- virtual ss::iface::import_sheet* get_sheet(std::string_view name) override
4017 -+ virtual ss::iface::import_sheet* get_sheet(std::string_view) override
4019 - // TODO : implement this.
4020 - return nullptr;
4021 -diff --git a/doc_example/xml_mapping_1.cpp b/doc_example/xml_mapping_1.cpp
4022 -index f23d620c..33d6ff22 100644
4023 ---- a/doc_example/xml_mapping_1.cpp
4024 -+++ b/doc_example/xml_mapping_1.cpp
4025 -@@ -118,7 +118,7 @@ void run_xmlns_different_ns_same_alias()
4026 - cout << (alias_1 == alias_2 ? "same" : "different") << endl;
4029 --int main(int argc, char** argv)
4030 -+int main()
4032 - run_xmlns_example();
4033 - run_xmlns_stacked();
4034 -diff --git a/src/liborcus/css_document_tree.cpp b/src/liborcus/css_document_tree.cpp
4035 -index 5f84c013..46bf7e91 100644
4036 ---- a/src/liborcus/css_document_tree.cpp
4037 -+++ b/src/liborcus/css_document_tree.cpp
4038 -@@ -54,6 +54,9 @@ public:
4040 - #if ORCUS_DEBUG_CSS_DOCTREE
4041 - cout << "@" << string(p, n).c_str();
4042 -+#else
4043 -+ (void)p;
4044 -+ (void)n;
4045 - #endif
4048 -diff --git a/src/liborcus/dom_tree.cpp b/src/liborcus/dom_tree.cpp
4049 -index 51db6ef8..64ecf8ef 100644
4050 ---- a/src/liborcus/dom_tree.cpp
4051 -+++ b/src/liborcus/dom_tree.cpp
4052 -@@ -527,7 +527,7 @@ void document_tree::impl::end_element(const sax_ns_parser_element& elem)
4053 - m_elem_stack.pop_back();
4056 --void document_tree::impl::characters(const pstring& val, bool transient)
4057 -+void document_tree::impl::characters(const pstring& val, bool /*transient*/)
4059 - if (m_elem_stack.empty())
4060 - // No root element has been encountered. Ignore this.
4061 -diff --git a/src/liborcus/gnumeric_cell_context_test.cpp b/src/liborcus/gnumeric_cell_context_test.cpp
4062 -index fc543096..aeec16bd 100644
4063 ---- a/src/liborcus/gnumeric_cell_context_test.cpp
4064 -+++ b/src/liborcus/gnumeric_cell_context_test.cpp
4065 -@@ -41,19 +41,19 @@ public:
4066 - assert(formula == "=arrayFormula");
4069 -- virtual void set_result_bool(row_t row, col_t col, bool value) override
4070 -+ virtual void set_result_bool(row_t, col_t, bool) override
4074 -- virtual void set_result_empty(row_t row, col_t col) override
4075 -+ virtual void set_result_empty(row_t, col_t) override
4079 -- virtual void set_result_string(row_t row, col_t col, std::string_view) override
4080 -+ virtual void set_result_string(row_t, col_t, std::string_view) override
4084 -- virtual void set_result_value(row_t row, col_t col, double value) override
4085 -+ virtual void set_result_value(row_t, col_t, double) override
4089 -@@ -77,11 +77,11 @@ public:
4090 - assert(formula == "=formula");
4093 -- virtual void set_shared_formula_index(size_t index) override
4094 -+ virtual void set_shared_formula_index(size_t) override
4098 -- virtual void set_result_bool(bool value) override
4099 -+ virtual void set_result_bool(bool) override
4103 -@@ -93,7 +93,7 @@ public:
4107 -- virtual void set_result_value(double value) override
4108 -+ virtual void set_result_value(double) override
4112 -diff --git a/src/liborcus/json_document_tree.cpp b/src/liborcus/json_document_tree.cpp
4113 -index 4eedea47..c163a364 100644
4114 ---- a/src/liborcus/json_document_tree.cpp
4115 -+++ b/src/liborcus/json_document_tree.cpp
4116 -@@ -1217,7 +1217,7 @@ array::array(std::initializer_list<detail::init::node> vs)
4117 - array::~array() {}
4119 - object::object() {}
4120 --object::object(object&& other) {}
4121 -+object::object(object&& /*other*/) {}
4122 - object::~object() {}
4124 - namespace {
4125 -@@ -1388,7 +1388,7 @@ struct node::impl
4126 - m_value_array(std::move(array.m_vs))
4127 - {}
4129 -- impl(json::object obj) :
4130 -+ impl(json::object /*obj*/) :
4131 - m_type(detail::node_t::object) {}
4132 - };
4134 -@@ -1634,7 +1634,7 @@ document_tree::document_tree(array vs) : mp_impl(std::make_unique<impl>())
4138 --document_tree::document_tree(object obj) : mp_impl(std::make_unique<impl>())
4139 -+document_tree::document_tree(object /*obj*/) : mp_impl(std::make_unique<impl>())
4141 - mp_impl->m_root = mp_impl->m_res.obj_pool.construct(detail::node_t::object);
4142 - mp_impl->m_root->value.object = mp_impl->m_res.obj_pool_jvo.construct();
4143 -diff --git a/src/liborcus/json_structure_mapper.cpp b/src/liborcus/json_structure_mapper.cpp
4144 -index 111d1674..09a9e97e 100644
4145 ---- a/src/liborcus/json_structure_mapper.cpp
4146 -+++ b/src/liborcus/json_structure_mapper.cpp
4147 -@@ -40,7 +40,7 @@ void structure_mapper::push_range()
4148 - m_current_range.row_groups.clear();
4151 --void structure_mapper::traverse(size_t pos)
4152 -+void structure_mapper::traverse(size_t /*pos*/)
4154 - json::structure_tree::node_properties node = m_walker.get_node();
4156 -diff --git a/src/liborcus/json_structure_tree.cpp b/src/liborcus/json_structure_tree.cpp
4157 -index 5c9d600c..3ae8ecc0 100644
4158 ---- a/src/liborcus/json_structure_tree.cpp
4159 -+++ b/src/liborcus/json_structure_tree.cpp
4160 -@@ -235,12 +235,12 @@ struct structure_tree::impl
4161 - push_value();
4164 -- void string(const char* p, size_t len, bool transient)
4165 -+ void string(const char* /*p*/, size_t /*len*/, bool /*transient*/)
4167 - push_value();
4170 -- void number(double val)
4171 -+ void number(double /*val*/)
4173 - push_value();
4175 -diff --git a/src/liborcus/mock_spreadsheet.cpp b/src/liborcus/mock_spreadsheet.cpp
4176 -index 3bde38ff..4042bdc9 100644
4177 ---- a/src/liborcus/mock_spreadsheet.cpp
4178 -+++ b/src/liborcus/mock_spreadsheet.cpp
4179 -@@ -211,22 +211,22 @@ import_formula::~import_formula()
4183 --void import_formula::set_position(row_t row, col_t col)
4184 -+void import_formula::set_position(row_t, col_t)
4186 - assert(false);
4189 --void import_formula::set_formula(formula_grammar_t grammar, std::string_view)
4190 -+void import_formula::set_formula(formula_grammar_t, std::string_view)
4192 - assert(false);
4195 --void import_formula::set_shared_formula_index(size_t index)
4196 -+void import_formula::set_shared_formula_index(size_t)
4198 - assert(false);
4201 --void import_formula::set_result_value(double value)
4202 -+void import_formula::set_result_value(double)
4204 - assert(false);
4206 -@@ -236,7 +236,7 @@ void import_formula::set_result_string(std::string_view)
4207 - assert(false);
4210 --void import_formula::set_result_bool(bool value)
4211 -+void import_formula::set_result_bool(bool)
4213 - assert(false);
4215 -@@ -257,7 +257,7 @@ import_sheet::~import_sheet()
4219 --void import_sheet::set_auto(row_t, col_t, std::string_view s)
4220 -+void import_sheet::set_auto(row_t, col_t, std::string_view)
4222 - assert(false);
4224 -@@ -292,7 +292,7 @@ void import_sheet::set_format(row_t, col_t, row_t, col_t, size_t)
4225 - assert(false);
4228 --void import_sheet::fill_down_cells(row_t src_row, col_t src_col, row_t range_size)
4229 -+void import_sheet::fill_down_cells(row_t, col_t, row_t)
4231 - assert(false);
4233 -diff --git a/src/liborcus/ods_dde_links_context.cpp b/src/liborcus/ods_dde_links_context.cpp
4234 -index db7ab672..783b106f 100644
4235 ---- a/src/liborcus/ods_dde_links_context.cpp
4236 -+++ b/src/liborcus/ods_dde_links_context.cpp
4237 -@@ -14,21 +14,21 @@ ods_dde_links_context::ods_dde_links_context(session_context& session_cxt, const
4239 - ods_dde_links_context::~ods_dde_links_context() {}
4241 --bool ods_dde_links_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
4242 -+bool ods_dde_links_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
4244 - return true;
4247 --xml_context_base* ods_dde_links_context::create_child_context(xmlns_id_t ns, xml_token_t name)
4248 -+xml_context_base* ods_dde_links_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
4250 - return nullptr;
4253 --void ods_dde_links_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
4254 -+void ods_dde_links_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
4258 --void ods_dde_links_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t> &attrs)
4259 -+void ods_dde_links_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
4261 - xml_token_pair_t parent = push_stack(ns, name);
4262 - (void)parent;
4263 -@@ -41,7 +41,7 @@ bool ods_dde_links_context::end_element(xmlns_id_t ns, xml_token_t name)
4264 - return pop_stack(ns, name);
4267 --void ods_dde_links_context::characters(const pstring &str, bool transient)
4268 -+void ods_dde_links_context::characters(const pstring& /*str*/, bool /*transient*/)
4272 -diff --git a/src/liborcus/opc_context.cpp b/src/liborcus/opc_context.cpp
4273 -index ef1a591f..d3cddabd 100644
4274 ---- a/src/liborcus/opc_context.cpp
4275 -+++ b/src/liborcus/opc_context.cpp
4276 -@@ -90,17 +90,17 @@ opc_content_types_context::~opc_content_types_context()
4280 --bool opc_content_types_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
4281 -+bool opc_content_types_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
4283 - return true;
4286 --xml_context_base* opc_content_types_context::create_child_context(xmlns_id_t ns, xml_token_t name)
4287 -+xml_context_base* opc_content_types_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
4289 - return nullptr;
4292 --void opc_content_types_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
4293 -+void opc_content_types_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
4297 -@@ -153,7 +153,7 @@ bool opc_content_types_context::end_element(xmlns_id_t ns, xml_token_t name)
4298 - return pop_stack(ns, name);
4301 --void opc_content_types_context::characters(const pstring &str, bool transient)
4302 -+void opc_content_types_context::characters(const pstring& /*str*/, bool /*transient*/)
4306 -@@ -256,17 +256,17 @@ opc_relations_context::~opc_relations_context()
4310 --bool opc_relations_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
4311 -+bool opc_relations_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
4313 - return true;
4316 --xml_context_base* opc_relations_context::create_child_context(xmlns_id_t ns, xml_token_t name)
4317 -+xml_context_base* opc_relations_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
4319 - return nullptr;
4322 --void opc_relations_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base *child)
4323 -+void opc_relations_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
4327 -@@ -302,7 +302,7 @@ bool opc_relations_context::end_element(xmlns_id_t ns, xml_token_t name)
4328 - return pop_stack(ns, name);
4331 --void opc_relations_context::characters(const pstring &str, bool transient)
4332 -+void opc_relations_context::characters(const pstring& /*str*/, bool /*transient*/)
4336 -diff --git a/src/liborcus/orcus_json.cpp b/src/liborcus/orcus_json.cpp
4337 -index 2b5967d5..69672190 100644
4338 ---- a/src/liborcus/orcus_json.cpp
4339 -+++ b/src/liborcus/orcus_json.cpp
4340 -@@ -137,7 +137,7 @@ public:
4341 - push_node(json_map_tree::input_node_type::object);
4344 -- void object_key(const char* p, size_t len, bool transient)
4345 -+ void object_key(const char* p, size_t len, bool /*transient*/)
4347 - m_walker.set_object_key(p, len);
4349 -@@ -168,7 +168,7 @@ public:
4350 - pop_node(json_map_tree::input_node_type::value);
4353 -- void string(const char* p, size_t len, bool transient)
4354 -+ void string(const char* p, size_t len, bool /*transient*/)
4356 - push_node(json_map_tree::input_node_type::value);
4357 - commit_value(json_value(p, len));
4358 -diff --git a/src/liborcus/orcus_xml_map_def.cpp b/src/liborcus/orcus_xml_map_def.cpp
4359 -index 4c70e060..889dbcb0 100644
4360 ---- a/src/liborcus/orcus_xml_map_def.cpp
4361 -+++ b/src/liborcus/orcus_xml_map_def.cpp
4362 -@@ -43,9 +43,9 @@ public:
4363 - xml_map_sax_handler(orcus_xml& app) : m_app(app) {}
4365 - void doctype(const sax::doctype_declaration&) {}
4366 -- void start_declaration(const pstring& name) {}
4367 -+ void start_declaration(const pstring& /*name*/) {}
4369 -- void end_declaration(const pstring& name)
4370 -+ void end_declaration(const pstring& /*name*/)
4372 - m_attrs.clear();
4374 -diff --git a/src/liborcus/spreadsheet_interface.cpp b/src/liborcus/spreadsheet_interface.cpp
4375 -index 87103233..985caf45 100644
4376 ---- a/src/liborcus/spreadsheet_interface.cpp
4377 -+++ b/src/liborcus/spreadsheet_interface.cpp
4378 -@@ -124,13 +124,13 @@ import_reference_resolver* import_factory::get_reference_resolver(formula_ref_co
4381 - import_pivot_cache_definition* import_factory::create_pivot_cache_definition(
4382 -- orcus::spreadsheet::pivot_cache_id_t cache_id)
4383 -+ orcus::spreadsheet::pivot_cache_id_t /*cache_id*/)
4385 - return nullptr;
4388 - import_pivot_cache_records* import_factory::create_pivot_cache_records(
4389 -- orcus::spreadsheet::pivot_cache_id_t cache_id)
4390 -+ orcus::spreadsheet::pivot_cache_id_t /*cache_id*/)
4392 - return nullptr;
4394 -diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp
4395 -index f5b8fe26..b2d6d398 100644
4396 ---- a/src/liborcus/xls_xml_context.cpp
4397 -+++ b/src/liborcus/xls_xml_context.cpp
4398 -@@ -90,17 +90,17 @@ xls_xml_data_context::xls_xml_data_context(
4400 - xls_xml_data_context::~xls_xml_data_context() {}
4402 --bool xls_xml_data_context::can_handle_element(xmlns_id_t ns, xml_token_t name) const
4403 -+bool xls_xml_data_context::can_handle_element(xmlns_id_t /*ns*/, xml_token_t /*name*/) const
4405 - return true;
4408 --xml_context_base* xls_xml_data_context::create_child_context(xmlns_id_t ns, xml_token_t name)
4409 -+xml_context_base* xls_xml_data_context::create_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/)
4411 - return nullptr;
4414 --void xls_xml_data_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base* child)
4415 -+void xls_xml_data_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
4419 -@@ -254,7 +254,7 @@ void xls_xml_data_context::reset()
4422 - void xls_xml_data_context::start_element_data(
4423 -- const xml_token_pair_t& parent, const xml_attrs_t& attrs)
4424 -+ const xml_token_pair_t& /*parent*/, const xml_attrs_t& attrs)
4426 - m_cell_type = ct_unknown;
4427 - m_cell_string.clear();
4428 -@@ -776,7 +776,7 @@ xml_context_base* xls_xml_context::create_child_context(xmlns_id_t ns, xml_token
4429 - return nullptr;
4432 --void xls_xml_context::end_child_context(xmlns_id_t ns, xml_token_t name, xml_context_base* child)
4433 -+void xls_xml_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*name*/, xml_context_base* /*child*/)
4437 -@@ -1217,7 +1217,7 @@ void xls_xml_context::characters(const pstring& str, bool /*transient*/)
4441 --void xls_xml_context::start_element_borders(const xml_token_pair_t& parent, const xml_attrs_t& attrs)
4442 -+void xls_xml_context::start_element_borders(const xml_token_pair_t& parent, const xml_attrs_t& /*attrs*/)
4444 - xml_element_expected(parent, NS_xls_xml_ss, XML_Style);
4445 - m_current_style->borders.clear();
4446 -diff --git a/src/liborcus/xls_xml_detection_handler.cpp b/src/liborcus/xls_xml_detection_handler.cpp
4447 -index aaa1b148..2b18c8ee 100644
4448 ---- a/src/liborcus/xls_xml_detection_handler.cpp
4449 -+++ b/src/liborcus/xls_xml_detection_handler.cpp
4450 -@@ -36,7 +36,7 @@ public:
4451 - return nullptr;
4454 -- virtual void start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& attrs)
4455 -+ virtual void start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
4457 - xml_token_pair_t parent = push_stack(ns, name);
4458 - if (ns == NS_xls_xml_ss)
4459 -diff --git a/src/liborcus/xlsx_drawing_context.cpp b/src/liborcus/xlsx_drawing_context.cpp
4460 -index f7dc31ab..380d7852 100644
4461 ---- a/src/liborcus/xlsx_drawing_context.cpp
4462 -+++ b/src/liborcus/xlsx_drawing_context.cpp
4463 -@@ -41,7 +41,7 @@ void xlsx_drawing_context::end_child_context(xmlns_id_t /*ns*/, xml_token_t /*na
4467 --void xlsx_drawing_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& attrs)
4468 -+void xlsx_drawing_context::start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& /*attrs*/)
4470 - xml_token_pair_t parent = push_stack(ns, name);
4472 -diff --git a/src/liborcus/xlsx_sheet_context.cpp b/src/liborcus/xlsx_sheet_context.cpp
4473 -index 669f604f..50018c32 100644
4474 ---- a/src/liborcus/xlsx_sheet_context.cpp
4475 -+++ b/src/liborcus/xlsx_sheet_context.cpp
4476 -@@ -845,7 +845,7 @@ void xlsx_sheet_context::push_raw_cell_value()
4479 - void xlsx_sheet_context::push_raw_cell_result(
4480 -- range_formula_results& res, size_t row_offset, size_t col_offset, xlsx_session_data& session_data) const
4481 -+ range_formula_results& res, size_t row_offset, size_t col_offset, xlsx_session_data& /*session_data*/) const
4483 - if (m_cur_value.empty())
4484 - return;
4485 -diff --git a/src/liborcus/xlsx_sheet_context_test.cpp b/src/liborcus/xlsx_sheet_context_test.cpp
4486 -index 9cb0d2a5..11ec8b71 100644
4487 ---- a/src/liborcus/xlsx_sheet_context_test.cpp
4488 -+++ b/src/liborcus/xlsx_sheet_context_test.cpp
4489 -@@ -64,19 +64,19 @@ public:
4490 - assert(formula == "A1:A2");
4493 -- virtual void set_result_bool(row_t row, col_t col, bool value) override
4494 -+ virtual void set_result_bool(row_t, col_t, bool) override
4498 -- virtual void set_result_empty(row_t row, col_t col) override
4499 -+ virtual void set_result_empty(row_t, col_t) override
4503 -- virtual void set_result_string(row_t row, col_t col, std::string_view) override
4504 -+ virtual void set_result_string(row_t, col_t, std::string_view) override
4508 -- virtual void set_result_value(row_t row, col_t col, double value) override
4509 -+ virtual void set_result_value(row_t, col_t, double) override
4513 -diff --git a/src/liborcus/xlsx_table_context.cpp b/src/liborcus/xlsx_table_context.cpp
4514 -index e135f44d..d8c360df 100644
4515 ---- a/src/liborcus/xlsx_table_context.cpp
4516 -+++ b/src/liborcus/xlsx_table_context.cpp
4517 -@@ -317,7 +317,7 @@ bool xlsx_table_context::end_element(xmlns_id_t ns, xml_token_t name)
4518 - return pop_stack(ns, name);
4521 --void xlsx_table_context::characters(const pstring& str, bool transient)
4522 -+void xlsx_table_context::characters(const pstring& /*str*/, bool /*transient*/)
4526 -diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp
4527 -index 9eaf3c07..5185049e 100644
4528 ---- a/src/liborcus/xml_structure_tree.cpp
4529 -+++ b/src/liborcus/xml_structure_tree.cpp
4530 -@@ -125,11 +125,11 @@ public:
4532 - void doctype(const sax::doctype_declaration&) {}
4534 -- void start_declaration(const pstring& name)
4535 -+ void start_declaration(const pstring& /*name*/)
4539 -- void end_declaration(const pstring& name)
4540 -+ void end_declaration(const pstring& /*name*/)
4542 - m_attrs.clear();
4544 -@@ -185,7 +185,7 @@ public:
4545 - m_stack.push_back(ref);
4548 -- void end_element(const sax_ns_parser_element& elem)
4549 -+ void end_element(const sax_ns_parser_element& /*elem*/)
4551 - if (m_stack.empty())
4552 - throw general_error("Element stack is empty.");
4553 -diff --git a/src/liborcus/xpath_parser_test.cpp b/src/liborcus/xpath_parser_test.cpp
4554 -index 12242f62..f67c0dc6 100644
4555 ---- a/src/liborcus/xpath_parser_test.cpp
4556 -+++ b/src/liborcus/xpath_parser_test.cpp
4557 -@@ -64,7 +64,7 @@ void test_attributes()
4558 - assert(token.attribute);
4561 --int main(int argc, char** argv)
4562 -+int main()
4564 - test_elements();
4565 - test_attributes();
4566 -diff --git a/src/orcus_env_dump.cpp b/src/orcus_env_dump.cpp
4567 -index ad60927a..99f53718 100644
4568 ---- a/src/orcus_env_dump.cpp
4569 -+++ b/src/orcus_env_dump.cpp
4570 -@@ -13,7 +13,7 @@
4571 - using std::cout;
4572 - using std::endl;
4574 --int main(int argc, char** argv)
4575 -+int main()
4577 - cout << "CPU flags:" << endl;
4578 - cout << " SSE 4.2: " << orcus::detail::cpu::has_sse42() << endl;
4579 -diff --git a/src/orcus_test_json_mapped.cpp b/src/orcus_test_json_mapped.cpp
4580 -index ed10a842..c504e156 100644
4581 ---- a/src/orcus_test_json_mapped.cpp
4582 -+++ b/src/orcus_test_json_mapped.cpp
4583 -@@ -88,7 +88,7 @@ void test_invalid_map_definition()
4587 --int main(int argc, char** argv)
4588 -+int main()
4590 - test_mapped_json_import();
4591 - test_invalid_map_definition();
4592 -diff --git a/src/orcus_test_xml.cpp b/src/orcus_test_xml.cpp
4593 -index 2a44a8ac..de5197cf 100644
4594 ---- a/src/orcus_test_xml.cpp
4595 -+++ b/src/orcus_test_xml.cpp
4596 -@@ -85,7 +85,7 @@ const char* sax_parser_parse_only_test_dirs[] = {
4597 - SRCDIR"/test/xml/parse-only/rss/"
4598 - };
4600 --void parse_file(dom::document_tree& tree, const char* filepath, string& strm)
4601 -+void parse_file(dom::document_tree& tree, const char* filepath, std::string& /*strm*/)
4603 - cout << "testing " << filepath << endl;
4604 - file_content content(filepath);
4605 -diff --git a/src/orcus_test_xml_mapped.cpp b/src/orcus_test_xml_mapped.cpp
4606 -index b90ea020..8e18cfda 100644
4607 ---- a/src/orcus_test_xml_mapped.cpp
4608 -+++ b/src/orcus_test_xml_mapped.cpp
4609 -@@ -66,7 +66,7 @@ void test_mapped_xml_import()
4610 - { SRCDIR"/test/xml-mapped/nested-repeats-4", false },
4611 - };
4613 -- auto dump_xml_structure = [](string& dump_content, string& strm, const char* filepath, xmlns_context& cxt)
4614 -+ auto dump_xml_structure = [](std::string& dump_content, std::string& /*strm*/, const char* filepath, xmlns_context& cxt)
4616 - file_content content(filepath);
4617 - dom::document_tree tree(cxt);
4618 -diff --git a/src/parser/sax_token_parser_test.cpp b/src/parser/sax_token_parser_test.cpp
4619 -index 2647444c..6ff8c932 100644
4620 ---- a/src/parser/sax_token_parser_test.cpp
4621 -+++ b/src/parser/sax_token_parser_test.cpp
4622 -@@ -146,7 +146,7 @@ void test_unicode_string()
4626 -- void characters(std::string_view val, bool transient)
4627 -+ void characters(std::string_view val, bool /*transient*/)
4629 - std::cout << "charachters:" << std::endl;
4630 - std::cout << val << std::endl;
4631 -diff --git a/src/parser/sax_token_parser_thread.cpp b/src/parser/sax_token_parser_thread.cpp
4632 -index b9166e3c..d21ae6d7 100644
4633 ---- a/src/parser/sax_token_parser_thread.cpp
4634 -+++ b/src/parser/sax_token_parser_thread.cpp
4635 -@@ -86,7 +86,7 @@ struct parser_thread::impl
4636 - m_token_buffer.abort();
4639 -- void declaration(const orcus::xml_declaration_t& decl)
4640 -+ void declaration(const orcus::xml_declaration_t& /*decl*/)
4644 -diff --git a/src/parser/utf8.cpp b/src/parser/utf8.cpp
4645 -index f3b264a7..e02d2244 100644
4646 ---- a/src/parser/utf8.cpp
4647 -+++ b/src/parser/utf8.cpp
4648 -@@ -231,7 +231,7 @@ bool parse_3b_second_char(uint8_t c1, uint8_t c2, uint8_t c3)
4651 - // [#x10000-#xEFFFF]: F0 90 80 80 -> F3 AF BF BF
4652 --bool parse_4b_char(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4)
4653 -+bool parse_4b_char(uint8_t c1, uint8_t c2, uint8_t /*c3*/, uint8_t /*c4*/)
4655 - // F0 90 80 80 -> F3 AF BF BF
4656 - // - F0 90 xx xx -> F0 xx xx xx
4657 -diff --git a/src/parser/utf8_test.cpp b/src/parser/utf8_test.cpp
4658 -index 78b7656a..88dcd3e8 100644
4659 ---- a/src/parser/utf8_test.cpp
4660 -+++ b/src/parser/utf8_test.cpp
4661 -@@ -159,7 +159,7 @@ void test_xml_name_char()
4662 - assert(res);
4665 --int main(int argc, char** argv)
4666 -+int main()
4668 - test_xml_name_start_char();
4669 - test_xml_name_char();
4670 -diff --git a/src/parser/xml_writer_test.cpp b/src/parser/xml_writer_test.cpp
4671 -index e5a22357..8687db32 100644
4672 ---- a/src/parser/xml_writer_test.cpp
4673 -+++ b/src/parser/xml_writer_test.cpp
4674 -@@ -28,7 +28,7 @@ void test_encoded_content()
4676 - std::ostringstream os_content;
4678 -- void characters(std::string_view val, bool transient)
4679 -+ void characters(std::string_view val, bool /*transient*/)
4681 - os_content << val;
4683 -diff --git a/src/python/cell.cpp b/src/python/cell.cpp
4684 -index 536b5c4d..16374b8f 100644
4685 ---- a/src/python/cell.cpp
4686 -+++ b/src/python/cell.cpp
4687 -@@ -115,7 +115,7 @@ int tp_init(pyobj_cell* self, PyObject* args, PyObject* kwargs)
4688 - return 0;
4691 --PyObject* cell_get_formula_tokens(PyObject* self, PyObject* args, PyObject* kwargs)
4692 -+PyObject* cell_get_formula_tokens(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4694 - pyobj_cell* obj = reinterpret_cast<pyobj_cell*>(self);
4695 - cell_data& data = *obj->data;
4696 -diff --git a/src/python/document.cpp b/src/python/document.cpp
4697 -index b06463bc..02a2dc49 100644
4698 ---- a/src/python/document.cpp
4699 -+++ b/src/python/document.cpp
4700 -@@ -69,12 +69,12 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
4701 - return reinterpret_cast<PyObject*>(self);
4704 --int tp_init(pyobj_document* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4705 -+int tp_init(pyobj_document* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
4707 - return 0;
4710 --PyObject* doc_get_named_expressions(PyObject* self, PyObject* args, PyObject* kwargs)
4711 -+PyObject* doc_get_named_expressions(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4713 - const ss::document& doc = *t(self)->data->m_doc;
4714 - const ixion::model_context& cxt = doc.get_model_context();
4715 -diff --git a/src/python/formula_tokens.cpp b/src/python/formula_tokens.cpp
4716 -index 569d1a7a..3eece2d4 100644
4717 ---- a/src/python/formula_tokens.cpp
4718 -+++ b/src/python/formula_tokens.cpp
4719 -@@ -56,7 +56,7 @@ void tp_dealloc(pyobj_formula_tokens* self)
4720 - Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
4723 --int tp_init(pyobj_formula_tokens* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4724 -+int tp_init(pyobj_formula_tokens* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
4726 - return 0;
4728 -diff --git a/src/python/global.cpp b/src/python/global.cpp
4729 -index 7a21f960..f8623e0d 100644
4730 ---- a/src/python/global.cpp
4731 -+++ b/src/python/global.cpp
4732 -@@ -16,7 +16,7 @@ void set_python_exception(PyObject* type, const std::exception& e)
4734 - std::ostringstream os;
4735 - os << "C++ exception caught: " << e.what();
4736 -- PyErr_SetString(PyExc_RuntimeError, os.str().data());
4737 -+ PyErr_SetString(type, os.str().data());
4740 - PyObject* get_python_enum_value(const char* enum_class_name, const char* value_name)
4741 -diff --git a/src/python/json.cpp b/src/python/json.cpp
4742 -index fdeea10c..f22cf666 100644
4743 ---- a/src/python/json.cpp
4744 -+++ b/src/python/json.cpp
4745 -@@ -177,7 +177,7 @@ public:
4749 -- void object_key(const char* p, size_t len, bool transient)
4750 -+ void object_key(const char* p, size_t len, bool /*transient*/)
4752 - parser_stack& cur = m_stack.back();
4753 - cur.key = PyUnicode_FromStringAndSize(p, len);
4754 -@@ -213,7 +213,7 @@ public:
4755 - push_value(Py_None);
4758 -- void string(const char* p, size_t len, bool transient)
4759 -+ void string(const char* p, size_t len, bool /*transient*/)
4761 - push_value(PyUnicode_FromStringAndSize(p, len));
4763 -diff --git a/src/python/named_expression.cpp b/src/python/named_expression.cpp
4764 -index 8edeeacf..1402daa0 100644
4765 ---- a/src/python/named_expression.cpp
4766 -+++ b/src/python/named_expression.cpp
4767 -@@ -81,7 +81,7 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
4768 - return reinterpret_cast<PyObject*>(self);
4771 --PyObject* ne_get_formula_tokens(PyObject* self, PyObject* args, PyObject* kwargs)
4772 -+PyObject* ne_get_formula_tokens(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4774 - named_exp_data& data = *t(self)->data;
4775 - if (!data.tokens)
4776 -diff --git a/src/python/named_expressions.cpp b/src/python/named_expressions.cpp
4777 -index 235389ac..6faffee5 100644
4778 ---- a/src/python/named_expressions.cpp
4779 -+++ b/src/python/named_expressions.cpp
4780 -@@ -44,7 +44,7 @@ inline pyobj_named_exps* t(PyObject* self)
4781 - return reinterpret_cast<pyobj_named_exps*>(self);
4784 --PyObject* named_exps_names(PyObject* self, PyObject* args, PyObject* kwargs)
4785 -+PyObject* named_exps_names(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4787 - named_exps_data& data = *t(self)->data;
4788 - PyObject* s = PySet_New(nullptr);
4789 -@@ -64,7 +64,7 @@ void tp_dealloc(pyobj_named_exps* self)
4790 - Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
4793 --int tp_init(pyobj_named_exps* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4794 -+int tp_init(pyobj_named_exps* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
4796 - return 0;
4798 -diff --git a/src/python/sheet.cpp b/src/python/sheet.cpp
4799 -index 0ccc39bd..38b96241 100644
4800 ---- a/src/python/sheet.cpp
4801 -+++ b/src/python/sheet.cpp
4802 -@@ -85,12 +85,12 @@ PyObject* tp_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwargs*/)
4803 - return reinterpret_cast<PyObject*>(self);
4806 --int tp_init(pyobj_sheet* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4807 -+int tp_init(pyobj_sheet* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
4809 - return 0;
4812 --PyObject* sheet_get_rows(PyObject* self, PyObject* args, PyObject* kwargs)
4813 -+PyObject* sheet_get_rows(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4815 - PyTypeObject* sr_type = get_sheet_rows_type();
4817 -@@ -210,7 +210,7 @@ PyObject* sheet_write(PyObject* self, PyObject* args, PyObject* kwargs)
4818 - return Py_None;
4821 --PyObject* sheet_get_named_expressions(PyObject* self, PyObject* args, PyObject* kwargs)
4822 -+PyObject* sheet_get_named_expressions(PyObject* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4824 - const ss::document& doc = *t(self)->data->m_doc;
4825 - ss::sheet_t si = t(self)->data->m_sheet->get_index();
4826 -diff --git a/src/python/sheet_rows.cpp b/src/python/sheet_rows.cpp
4827 -index 7fa869ea..be495894 100644
4828 ---- a/src/python/sheet_rows.cpp
4829 -+++ b/src/python/sheet_rows.cpp
4830 -@@ -49,7 +49,7 @@ PyObject* sheet_rows_new(PyTypeObject* type, PyObject* /*args*/, PyObject* /*kwa
4831 - return reinterpret_cast<PyObject*>(self);
4834 --int sheet_rows_init(pyobj_sheet_rows* self, PyObject* /*args*/, PyObject* /*kwargs*/)
4835 -+int sheet_rows_init(pyobj_sheet_rows* /*self*/, PyObject* /*args*/, PyObject* /*kwargs*/)
4837 - return 0;
4839 -diff --git a/src/spreadsheet/factory_sheet.cpp b/src/spreadsheet/factory_sheet.cpp
4840 -index 3e04295c..61541174 100644
4841 ---- a/src/spreadsheet/factory_sheet.cpp
4842 -+++ b/src/spreadsheet/factory_sheet.cpp
4843 -@@ -74,19 +74,19 @@ void import_data_table::reset()
4847 --void import_data_table::set_type(data_table_type_t type)
4848 -+void import_data_table::set_type(data_table_type_t /*type*/)
4852 --void import_data_table::set_range(const range_t& range)
4853 -+void import_data_table::set_range(const range_t& /*range*/)
4857 --void import_data_table::set_first_reference(std::string_view ref, bool deleted)
4858 -+void import_data_table::set_first_reference(std::string_view /*ref*/, bool /*deleted*/)
4862 --void import_data_table::set_second_reference(std::string_view ref, bool deleted)
4863 -+void import_data_table::set_second_reference(std::string_view /*ref*/, bool /*deleted*/)
4867 -@@ -193,7 +193,7 @@ void import_array_formula::set_range(const range_t& range)
4871 --void import_array_formula::set_formula(formula_grammar_t grammar, std::string_view formula)
4872 -+void import_array_formula::set_formula(formula_grammar_t /*grammar*/, std::string_view formula)
4874 - const ixion::formula_name_resolver* resolver =
4875 - m_doc.get_formula_name_resolver(spreadsheet::formula_ref_context_t::global);
4876 -@@ -223,12 +223,12 @@ void import_array_formula::set_result_value(row_t row, col_t col, double value)
4877 - m_result_mtx.set(row, col, value);
4880 --void import_array_formula::set_result_string(row_t row, col_t col, std::string_view value)
4881 -+void import_array_formula::set_result_string(row_t /*row*/, col_t /*col*/, std::string_view /*value*/)
4883 - // TODO : handle this
4886 --void import_array_formula::set_result_empty(row_t row, col_t col)
4887 -+void import_array_formula::set_result_empty(row_t /*row*/, col_t /*col*/)
4889 - // TODO : handle this
4891 -@@ -282,7 +282,7 @@ void import_formula::set_position(row_t row, col_t col)
4892 - m_col = col;
4895 --void import_formula::set_formula(formula_grammar_t grammar, std::string_view formula)
4896 -+void import_formula::set_formula(formula_grammar_t /*grammar*/, std::string_view formula)
4898 - if (m_row < 0 || m_col < 0)
4899 - return;
4900 -@@ -331,7 +331,7 @@ void import_formula::set_result_string(std::string_view value)
4903 - void import_formula::set_result_empty() {}
4904 --void import_formula::set_result_bool(bool value) {}
4905 -+void import_formula::set_result_bool(bool /*value*/) {}
4907 - void import_formula::commit()
4909 -diff --git a/src/spreadsheet/sheet_impl.cpp b/src/spreadsheet/sheet_impl.cpp
4910 -index 72e521c5..c2e7ecb6 100644
4911 ---- a/src/spreadsheet/sheet_impl.cpp
4912 -+++ b/src/spreadsheet/sheet_impl.cpp
4913 -@@ -12,7 +12,7 @@
4915 - namespace orcus { namespace spreadsheet {
4917 --sheet_impl::sheet_impl(document& doc, sheet& sh, sheet_t sheet_index) :
4918 -+sheet_impl::sheet_impl(document& doc, sheet& /*sh*/, sheet_t sheet_index) :
4919 - m_doc(doc),
4920 - m_col_widths(0, m_doc.get_sheet_size().columns, get_default_column_width()),
4921 - m_row_heights(0, m_doc.get_sheet_size().rows, get_default_row_height()),
4922 ---
4923 -2.25.1
4925 diff --git a/external/liborcus/unused-variables.patch.1 b/external/liborcus/unused-variables.patch.1
4926 deleted file mode 100644
4927 index 77b88fae288c..000000000000
4928 --- a/external/liborcus/unused-variables.patch.1
4929 +++ /dev/null
4930 @@ -1,24 +0,0 @@
4931 -From 5fccafa297ce2439ee850e13ccbeea3edb1750af Mon Sep 17 00:00:00 2001
4932 -From: Kohei Yoshida <kohei.yoshida@gmail.com>
4933 -Date: Tue, 2 Nov 2021 20:42:45 -0400
4934 -Subject: [PATCH] Unused variables.
4936 ----
4937 - include/orcus/sax_parser.hpp | 1 -
4938 - 1 file changed, 1 deletion(-)
4940 -diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
4941 -index 24b1e8ea..15e8d917 100644
4942 ---- a/include/orcus/sax_parser.hpp
4943 -+++ b/include/orcus/sax_parser.hpp
4944 -@@ -539,7 +539,6 @@ template<typename _Handler, typename _Config>
4945 - void sax_parser<_Handler,_Config>::attribute()
4947 - sax::parser_attribute attr;
4948 -- std::string_view attr_ns_name, attr_name, attr_value;
4949 - attribute_name(attr.ns, attr.name);
4951 - #if ORCUS_DEBUG_SAX_PARSER
4952 ---
4953 -2.25.1
4955 diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch
4956 index 51aabfa1fb47..e86c74a722f3 100644
4957 --- a/external/liborcus/windows-constants-hack.patch
4958 +++ b/external/liborcus/windows-constants-hack.patch
4959 @@ -8,8 +8,8 @@ index ae571f5..539ce18 100644
4961 -#include "constants.inl"
4962 +#define ORCUS_MAJOR_VERSION 0
4963 -+#define ORCUS_MINOR_VERSION 16
4964 -+#define ORCUS_MICRO_VERSION 0
4965 ++#define ORCUS_MINOR_VERSION 17
4966 ++#define ORCUS_MICRO_VERSION 2
4968 namespace orcus {
4970 diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
4971 index 674c2cfe7c8f..f5f2fd8a11c0 100644
4972 --- a/sc/source/filter/orcus/interface.cxx
4973 +++ b/sc/source/filter/orcus/interface.cxx
4974 @@ -1725,16 +1725,15 @@ void ScOrcusStyles::set_font_underline_color(orcus::spreadsheet::color_elem_t al
4975 orcus::spreadsheet::color_elem_t green,
4976 orcus::spreadsheet::color_elem_t blue)
4978 - maCurrentFont.maUnderlineColor = Color(ColorTransparency, alpha, red, green, blue);
4979 + maCurrentFont.maUnderlineColor = Color(ColorAlpha, alpha, red, green, blue);
4982 -void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t /*alpha*/,
4983 +void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
4984 orcus::spreadsheet::color_elem_t red,
4985 orcus::spreadsheet::color_elem_t green,
4986 orcus::spreadsheet::color_elem_t blue)
4988 - // Ignore the alpha value for now.
4989 - maCurrentFont.maColor = Color(red, green, blue);
4990 + maCurrentFont.maColor = Color(ColorAlpha, alpha, red, green, blue);
4991 maCurrentFont.mbHasFontAttr = true;
4995 cgit v1.2.1