1 From b325b4c286b56a63316063a3ac4648bf7b7efcbe Mon Sep 17 00:00:00 2001
2 From: Kohei Yoshida <kohei.yoshida@gmail.com>
3 Date: Sat, 5 Mar 2016 20:09:34 -0500
4 Subject: [PATCH] Update liborcus to 0.11.0.
6 Markus did half of this, and I simply carried the torch.
8 Change-Id: Icd3ee1e4b5bd562faee06dfd9dce52a4bed49a71
9 Reviewed-on: https://gerrit.libreoffice.org/22943
10 Tested-by: Jenkins <ci@libreoffice.org>
11 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
13 RepositoryExternal.mk | 19 +-
16 external/boost/Module_boost.mk | 1 +
17 external/boost/StaticLibrary_boost_filesystem.mk | 36 +
18 ...0001-Fix-for-OSX-build-inside-LibreOffice.patch | 1175 ++++++++++++++++++++
19 .../liborcus/0001-Get-it-to-build-on-Windows.patch | 212 ++++
20 external/liborcus/ExternalPackage_liborcus.mk | 8 +-
21 external/liborcus/ExternalProject_liborcus.mk | 22 +-
22 external/liborcus/Library_orcus-parser.mk | 3 +
23 external/liborcus/Library_orcus.mk | 18 +-
24 external/liborcus/UnpackedTarball_liborcus.mk | 11 +-
25 external/liborcus/fix-crash-ooo55043-1.patch.0 | 17 -
26 external/liborcus/unusedheader.patch.0 | 11 -
27 external/liborcus/windows-constants-hack.patch | 15 +
28 sc/Library_scfilt.mk | 1 +
29 sc/source/filter/inc/orcusinterface.hxx | 2 +
30 sc/source/filter/orcus/filterdetect.cxx | 2 +-
31 sc/source/filter/orcus/interface.cxx | 63 +-
32 19 files changed, 1544 insertions(+), 78 deletions(-)
33 create mode 100644 external/boost/StaticLibrary_boost_filesystem.mk
34 create mode 100644 external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch
35 create mode 100755 external/liborcus/0001-Get-it-to-build-on-Windows.patch
36 delete mode 100644 external/liborcus/fix-crash-ooo55043-1.patch.0
37 delete mode 100644 external/liborcus/unusedheader.patch.0
38 create mode 100755 external/liborcus/windows-constants-hack.patch
40 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
41 index 5b497ee..c6fe371 100644
42 --- a/RepositoryExternal.mk
43 +++ b/RepositoryExternal.mk
44 @@ -743,6 +743,21 @@ $(call gb_LinkTarget_set_include,$(1),\
48 +define gb_LinkTarget__use_boost_filesystem
49 +$(call gb_LinkTarget_add_defs,$(1),\
50 + -DBOOST_ALL_NO_LIB \
53 +$(call gb_LinkTarget_use_static_libraries,$(1),\
59 +define gb_ExternalProject__use_boost_filesystem
60 +$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
63 define gb_ExternalProject__use_boost_headers
64 $(call gb_ExternalProject_use_unpacked,$(1),boost)
66 @@ -3129,7 +3144,7 @@ $(call gb_LinkTarget_set_include,$(1),\
69 $(call gb_LinkTarget_add_libs,$(1),\
70 - -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.10 \
71 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
74 $(if $(SYSTEM_BOOST), \
75 @@ -3148,7 +3163,7 @@ $(call gb_LinkTarget_set_include,$(1),\
78 $(call gb_LinkTarget_add_libs,$(1),\
79 - -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.10 \
80 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
84 diff --git a/configure.ac b/configure.ac
85 index 934d43a..dab1919 100644
88 @@ -9196,7 +9196,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then
90 AC_DEFINE(ENABLE_ORCUS)
92 - libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.10 >= 0.9.0])
93 + libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.11 >= 0.11.0])
94 if test "$with_system_orcus" != "yes"; then
95 if test "$SYSTEM_BOOST" = "TRUE"; then
96 # ===========================================================
97 diff --git a/download.lst b/download.lst
98 index 906a579..475112b 100644
102 export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
103 export OPENSSL_MD5SUM := 9392e65072ce4b614c1392eefc1f23d0
104 export OPENSSL_TARBALL := openssl-1.0.2h.tar.gz
105 -export ORCUS_MD5SUM := e6efcbe50a5fd4d50d513c9a7a4139b0
106 -export ORCUS_TARBALL := liborcus-0.9.2.tar.gz
107 +export ORCUS_MD5SUM := ca1e5d486b29cd519bb1d9845a6a768e
108 +export ORCUS_TARBALL := liborcus-0.11.0.tar.gz
109 export OWNCLOUD_ANDROID_LIB_MD5SUM := 593f0aa47bf2efc0efda2d28fae063b2
110 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
111 export PAGEMAKER_MD5SUM := 795cc7a59ace4db2b12586971d668671
112 diff --git a/external/boost/Module_boost.mk b/external/boost/Module_boost.mk
113 index 5bac25e..ae407f5 100644
114 --- a/external/boost/Module_boost.mk
115 +++ b/external/boost/Module_boost.mk
116 @@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,boost))
118 $(eval $(call gb_Module_add_targets,boost,\
119 StaticLibrary_boostdatetime \
120 + StaticLibrary_boost_filesystem \
121 StaticLibrary_boost_system \
122 StaticLibrary_boost_iostreams \
123 UnpackedTarball_boost \
124 diff --git a/external/boost/StaticLibrary_boost_filesystem.mk b/external/boost/StaticLibrary_boost_filesystem.mk
126 index 0000000..024308a
128 +++ b/external/boost/StaticLibrary_boost_filesystem.mk
130 +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
132 +# This file is part of the LibreOffice project.
134 +# This Source Code Form is subject to the terms of the Mozilla Public
135 +# License, v. 2.0. If a copy of the MPL was not distributed with this
136 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
139 +$(eval $(call gb_StaticLibrary_StaticLibrary,boost_filesystem))
141 +$(eval $(call gb_StaticLibrary_use_unpacked,boost_filesystem,boost))
143 +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,boost_filesystem))
145 +# disable "auto link" "feature" on MSVC
146 +$(eval $(call gb_StaticLibrary_add_defs,boost_filesystem,\
147 + -DBOOST_ALL_NO_LIB \
150 +$(eval $(call gb_StaticLibrary_use_external,boost_filesystem,boost_headers))
152 +$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_filesystem,cpp))
154 +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_filesystem,\
155 + UnpackedTarball/boost/libs/filesystem/src/codecvt_error_category \
156 + UnpackedTarball/boost/libs/filesystem/src/operations \
157 + UnpackedTarball/boost/libs/filesystem/src/path \
158 + UnpackedTarball/boost/libs/filesystem/src/path_traits \
159 + UnpackedTarball/boost/libs/filesystem/src/portability \
160 + UnpackedTarball/boost/libs/filesystem/src/unique_path \
161 + UnpackedTarball/boost/libs/filesystem/src/utf8_codecvt_facet \
162 + UnpackedTarball/boost/libs/filesystem/src/windows_file_codecvt \
165 +# vim: set noet sw=4 ts=4:
166 diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
167 index 4411592..56debe9 100644
168 --- a/external/liborcus/ExternalPackage_liborcus.mk
169 +++ b/external/liborcus/ExternalPackage_liborcus.mk
170 @@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
171 $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
174 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.0.dylib,src/liborcus/.libs/liborcus-0.10.0.dylib))
175 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.0.dylib,src/parser/.libs/liborcus-parser-0.10.0.dylib))
176 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.0.dylib,src/liborcus/.libs/liborcus-0.11.0.dylib))
177 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.0.dylib,src/parser/.libs/liborcus-parser-0.11.0.dylib))
178 else ifeq ($(DISABLE_DYNLOADING),)
179 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.so.0,src/liborcus/.libs/liborcus-0.10.so.0.0.0))
180 -$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.so.0,src/parser/.libs/liborcus-parser-0.10.so.0.0.0))
181 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.so.0,src/liborcus/.libs/liborcus-0.11.so.0.0.0))
182 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.so.0,src/parser/.libs/liborcus-parser-0.11.so.0.0.0))
185 # vim: set noet sw=4 ts=4:
186 diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
187 index 7eb8fdb..580ef847 100644
188 --- a/external/liborcus/ExternalProject_liborcus.mk
189 +++ b/external/liborcus/ExternalProject_liborcus.mk
190 @@ -13,6 +13,7 @@ $(eval $(call gb_ExternalProject_use_autoconf,liborcus,build))
192 $(eval $(call gb_ExternalProject_use_externals,liborcus, \
198 @@ -38,9 +39,9 @@ ifneq ($(SYSTEM_ZLIB),)
201 ifneq ($(SYSTEM_BOOST),)
202 -liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB)
203 +liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB) $(BOOST_FILESYSTEM_LIB)
205 -liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams
206 +liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -lboost_filesystem
209 liborcus_LIBS+=-lgnustl_shared -lm
210 @@ -96,12 +97,13 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
212 --enable-shared --disable-static \
214 - $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
215 - --disable-spreadsheet-model \
218 - $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
219 - $(if $(SYSTEM_BOOST),,\
220 + $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
221 + --disable-spreadsheet-model \
225 + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
226 + $(if $(SYSTEM_BOOST),,\
227 --with-boost=$(WORKDIR)/UnpackedTarball/boost \
228 boost_cv_lib_iostreams=yes \
229 boost_cv_lib_system=yes \
230 @@ -111,8 +113,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
232 $(if $(filter MACOSX,$(OS)),\
233 && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
234 - $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.10.0.dylib \
235 - $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.10.0.dylib \
236 + $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.11.0.dylib \
237 + $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.11.0.dylib \
241 diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
242 index c3b4eec..28af14e 100644
243 --- a/external/liborcus/Library_orcus-parser.mk
244 +++ b/external/liborcus/Library_orcus-parser.mk
245 @@ -39,6 +39,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
246 UnpackedTarball/liborcus/src/parser/css_types \
247 UnpackedTarball/liborcus/src/parser/csv_parser_base \
248 UnpackedTarball/liborcus/src/parser/exception \
249 + UnpackedTarball/liborcus/src/parser/json_parser_base \
250 + UnpackedTarball/liborcus/src/parser/parser_base \
251 UnpackedTarball/liborcus/src/parser/parser_global \
252 UnpackedTarball/liborcus/src/parser/pstring \
253 UnpackedTarball/liborcus/src/parser/sax_parser_base \
254 @@ -48,6 +50,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
255 UnpackedTarball/liborcus/src/parser/tokens \
256 UnpackedTarball/liborcus/src/parser/types \
257 UnpackedTarball/liborcus/src/parser/xml_namespace \
258 + UnpackedTarball/liborcus/src/parser/yaml_parser_base \
259 UnpackedTarball/liborcus/src/parser/zip_archive \
260 UnpackedTarball/liborcus/src/parser/zip_archive_stream \
262 diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
263 index ae98d5e..96169f1 100644
264 --- a/external/liborcus/Library_orcus.mk
265 +++ b/external/liborcus/Library_orcus.mk
266 @@ -13,6 +13,7 @@ $(eval $(call gb_Library_use_unpacked,orcus,liborcus))
268 $(eval $(call gb_Library_use_externals,orcus,\
274 @@ -53,12 +54,16 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
275 UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \
276 UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \
277 UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \
278 + UnpackedTarball/liborcus/src/liborcus/info \
279 UnpackedTarball/liborcus/src/liborcus/interface \
280 + UnpackedTarball/liborcus/src/liborcus/json_document_tree \
281 + UnpackedTarball/liborcus/src/liborcus/json_util \
282 UnpackedTarball/liborcus/src/liborcus/measurement \
283 + UnpackedTarball/liborcus/src/liborcus/odf_helper \
284 UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \
285 UnpackedTarball/liborcus/src/liborcus/odf_para_context \
286 - UnpackedTarball/liborcus/src/liborcus/odf_styles \
287 UnpackedTarball/liborcus/src/liborcus/odf_styles_context \
288 + UnpackedTarball/liborcus/src/liborcus/odf_styles \
289 UnpackedTarball/liborcus/src/liborcus/odf_tokens \
290 UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \
291 UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \
292 @@ -73,18 +78,26 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
293 UnpackedTarball/liborcus/src/liborcus/opc_reader \
294 UnpackedTarball/liborcus/src/liborcus/orcus_csv \
295 UnpackedTarball/liborcus/src/liborcus/orcus_gnumeric \
296 + UnpackedTarball/liborcus/src/liborcus/orcus_import_ods \
297 + UnpackedTarball/liborcus/src/liborcus/orcus_import_xlsx \
298 UnpackedTarball/liborcus/src/liborcus/orcus_ods \
299 UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \
300 + UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml \
301 UnpackedTarball/liborcus/src/liborcus/orcus_xml \
302 UnpackedTarball/liborcus/src/liborcus/session_context \
303 UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \
304 UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \
305 - UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \
306 + UnpackedTarball/liborcus/src/liborcus/string_helper \
307 UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \
308 UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \
309 UnpackedTarball/liborcus/src/liborcus/xlsx_context \
310 UnpackedTarball/liborcus/src/liborcus/xlsx_handler \
311 UnpackedTarball/liborcus/src/liborcus/xlsx_helper \
312 + UnpackedTarball/liborcus/src/liborcus/xls_xml_context \
313 + UnpackedTarball/liborcus/src/liborcus/xls_xml_detection_handler \
314 + UnpackedTarball/liborcus/src/liborcus/xls_xml_handler \
315 + UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \
316 + UnpackedTarball/liborcus/src/liborcus/xls_xml_tokens \
317 UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \
318 UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \
319 UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \
320 @@ -99,6 +112,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
321 UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
322 UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
323 UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
324 + UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \
327 # vim: set noet sw=4 ts=4:
328 diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
329 index 825fa49..0e337ef 100644
330 --- a/external/liborcus/UnpackedTarball_liborcus.mk
331 +++ b/external/liborcus/UnpackedTarball_liborcus.mk
332 @@ -16,8 +16,13 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
333 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
334 external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
335 external/liborcus/rpath.patch.0 \
336 - external/liborcus/fix-crash-ooo55043-1.patch.0 \
337 - external/liborcus/unusedheader.patch.0 \
341 +$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
342 + external/liborcus/windows-constants-hack.patch \
347 # vim: set noet sw=4 ts=4:
348 diff --git a/external/liborcus/fix-crash-ooo55043-1.patch.0 b/external/liborcus/fix-crash-ooo55043-1.patch.0
349 deleted file mode 100644
350 index 58a97c0..0000000
351 --- a/external/liborcus/fix-crash-ooo55043-1.patch.0
354 ---- src/parser/zip_archive_stream.cpp
355 -+++ src/parser/zip_archive_stream.cpp
358 - void zip_archive_stream_blob::read(unsigned char* buffer, size_t length) const
362 - // First, make sure we have enough blob to satisfy the requested stream length.
363 -- size_t length_available = m_size - tell();
364 -+ const size_t pos = tell();
366 -+ throw zip_error("Stream is seeked past end. No data available");
367 -+ const size_t length_available = m_size - pos;
368 - if (length_available < length)
369 - throw zip_error("There is not enough stream left to fill requested length.");
371 diff --git a/external/liborcus/unusedheader.patch.0 b/external/liborcus/unusedheader.patch.0
372 deleted file mode 100644
373 index 4f7a77b..0000000
374 --- a/external/liborcus/unusedheader.patch.0
377 ---- ./src/parser/pstring.cpp.orig 2015-12-02 14:38:44.658744408 +0000
378 -+++ ./src/parser/pstring.cpp 2015-12-02 14:38:50.449658497 +0000
380 - #include <iostream>
383 --#include <boost/thread/mutex.hpp>
385 - using namespace std;
388 diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch
390 index 0000000..876bc16
392 +++ b/external/liborcus/windows-constants-hack.patch
394 +diff --git a/src/liborcus/info.cpp b/src/liborcus/info.cpp
395 +index ae571f5..539ce18 100644
396 +--- a/src/liborcus/info.cpp
397 ++++ b/src/liborcus/info.cpp
400 + #include "orcus/info.hpp"
402 +-#include "constants.inl"
403 ++#define ORCUS_MAJOR_VERSION 0
404 ++#define ORCUS_MINOR_VERSION 11
405 ++#define ORCUS_MICRO_VERSION 0
409 diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
410 index 74f2ce5..b764290 100644
411 --- a/sc/Library_scfilt.mk
412 +++ b/sc/Library_scfilt.mk
413 @@ -227,6 +227,7 @@ ifeq ($(ENABLE_ORCUS),TRUE)
414 $(eval $(call gb_Library_use_externals,scfilt,\
421 diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
422 index 63b36ef..05fe4cb 100644
423 --- a/sc/source/filter/inc/orcusinterface.hxx
424 +++ b/sc/source/filter/inc/orcusinterface.hxx
425 @@ -375,6 +375,7 @@ public:
427 virtual void set_border_count(size_t n) override;
428 virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, const char* s, size_t n) override;
429 + virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
430 virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
431 orcus::spreadsheet::color_elem_t alpha,
432 orcus::spreadsheet::color_elem_t red,
433 @@ -425,6 +426,7 @@ public:
434 virtual void set_cell_style_name(const char* s, size_t n) override;
435 virtual void set_cell_style_xf(size_t index) override;
436 virtual void set_cell_style_builtin(size_t index) override;
437 + virtual void set_cell_style_parent_name(const char* s, size_t n) override;
438 virtual size_t commit_cell_style() override;
441 diff --git a/sc/source/filter/orcus/filterdetect.cxx b/sc/source/filter/orcus/filterdetect.cxx
442 index 7dfccb9..9ae30ad 100644
443 --- a/sc/source/filter/orcus/filterdetect.cxx
444 +++ b/sc/source/filter/orcus/filterdetect.cxx
445 @@ -93,7 +93,7 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence<css::beans::PropertyValue>
448 orcus::format_t eFormat = orcus::detect(reinterpret_cast<const unsigned char*>(aContent.getStr()), aContent.getLength());
449 - if (eFormat == orcus::format_gnumeric)
450 + if (eFormat == orcus::format_t::gnumeric)
451 return OUString("Gnumeric XML");
454 diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
455 index e50b8bf..496faea 100644
456 --- a/sc/source/filter/orcus/interface.cxx
457 +++ b/sc/source/filter/orcus/interface.cxx
458 @@ -55,7 +55,7 @@ void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::form
460 orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
462 - return orcus::spreadsheet::formula_grammar_unknown;
463 + return orcus::spreadsheet::formula_grammar_t::unknown;
466 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
467 @@ -231,19 +231,19 @@ double translateToInternal(double nVal, orcus::length_unit_t unit)
471 - case orcus::length_unit_inch:
472 + case orcus::length_unit_t::inch:
473 return nVal * 72.0 * 20.0;
475 - case orcus::length_unit_twip:
476 + case orcus::length_unit_t::twip:
479 - case orcus::length_unit_point:
480 + case orcus::length_unit_t::point:
483 - case orcus::length_unit_centimeter:
484 + case orcus::length_unit_t::centimeter:
485 return nVal * 20.0 * 72.0 / 2.54;
487 - case orcus::length_unit_unknown:
488 + case orcus::length_unit_t::unknown:
489 SAL_WARN("sc.orcus", "unknown unit");
492 @@ -393,18 +393,18 @@ void ScOrcusConditionalFormat::set_type(os::conditional_format_t type)
496 - case os::conditional_format_condition:
497 - case os::conditional_format_formula:
498 + case os::conditional_format_t::condition:
499 + case os::conditional_format_t::formula:
500 meEntryType = condformat::CONDITION;
501 // mpCurrentEntry.reset(new ScCondFormatEntry());
503 - case os::conditional_format_date:
504 + case os::conditional_format_t::date:
506 - case os::conditional_format_colorscale:
507 + case os::conditional_format_t::colorscale:
509 - case os::conditional_format_databar:
510 + case os::conditional_format_t::databar:
512 - case os::conditional_format_iconset:
513 + case os::conditional_format_t::iconset:
516 SAL_INFO("sc.orcus.condformat", "unknown conditional_format_t value");
517 @@ -549,17 +549,17 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t
518 formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
521 - case orcus::spreadsheet::formula_grammar_ods:
522 + case orcus::spreadsheet::formula_grammar_t::ods:
523 eGrammar = formula::FormulaGrammar::GRAM_ODFF;
525 - case orcus::spreadsheet::formula_grammar_xlsx_2007:
526 - case orcus::spreadsheet::formula_grammar_xlsx_2010:
527 + case orcus::spreadsheet::formula_grammar_t::xlsx_2007:
528 + case orcus::spreadsheet::formula_grammar_t::xlsx_2010:
529 eGrammar = formula::FormulaGrammar::GRAM_OOXML;
531 - case orcus::spreadsheet::formula_grammar_gnumeric:
532 + case orcus::spreadsheet::formula_grammar_t::gnumeric:
533 eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
535 - case orcus::spreadsheet::formula_grammar_unknown:
536 + case orcus::spreadsheet::formula_grammar_t::unknown:
540 @@ -799,16 +799,16 @@ SvxBoxItemLine getDirection(os::border_direction_t dir)
544 - case os::border_right:
545 + case os::border_direction_t::right:
546 return SvxBoxItemLine::RIGHT;
548 - case os::border_left:
549 + case os::border_direction_t::left:
550 return SvxBoxItemLine::RIGHT;
552 - case os::border_top:
553 + case os::border_direction_t::top:
554 return SvxBoxItemLine::RIGHT;
556 - case os::border_bottom:
557 + case os::border_direction_t::bottom:
558 return SvxBoxItemLine::RIGHT;
561 @@ -947,15 +947,15 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
565 - case orcus::spreadsheet::underline_single:
566 - case orcus::spreadsheet::underline_single_accounting:
567 + case orcus::spreadsheet::underline_t::single_line:
568 + case orcus::spreadsheet::underline_t::single_accounting:
569 maCurrentFont.meUnderline = UNDERLINE_SINGLE;
571 - case orcus::spreadsheet::underline_double:
572 - case orcus::spreadsheet::underline_double_accounting:
573 + case orcus::spreadsheet::underline_t::double_line:
574 + case orcus::spreadsheet::underline_t::double_accounting:
575 maCurrentFont.meUnderline = UNDERLINE_DOUBLE;
577 - case orcus::spreadsheet::underline_none:
578 + case orcus::spreadsheet::underline_t::none:
579 maCurrentFont.meUnderline = UNDERLINE_NONE;
582 @@ -1019,6 +1019,12 @@ void ScOrcusStyles::set_border_style(orcus::spreadsheet::border_direction_t /*di
586 +void ScOrcusStyles::set_border_style(
587 + orcus::spreadsheet::border_direction_t /*dir*/, orcus::spreadsheet::border_style_t /*style*/)
592 void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
593 orcus::spreadsheet::color_elem_t alpha,
594 orcus::spreadsheet::color_elem_t red,
595 @@ -1186,6 +1192,11 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
596 maCurrentCellStyle.mnBuiltInId = index;
599 +void ScOrcusStyles::set_cell_style_parent_name(const char* /*s*/, size_t /*n*/)
604 size_t ScOrcusStyles::commit_cell_style()
606 SAL_INFO("sc.orcus.style", "commit cell style: " << maCurrentCellStyle.maName);
610 From d72a33c6aed0ca8f9fe0b90bc6d72e7313985524 Mon Sep 17 00:00:00 2001
611 From: David Tardon <dtardon@redhat.com>
612 Date: Tue, 8 Mar 2016 05:57:40 +0100
613 Subject: [PATCH 1/4] reorder
615 Change-Id: I8ff9f61475fddb475fe08e867c5446c825abb7dc
617 RepositoryExternal.mk | 31 ++++++++++++++++---------------
618 1 file changed, 16 insertions(+), 15 deletions(-)
620 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
621 index c6fe371..c8aab64 100644
622 --- a/RepositoryExternal.mk
623 +++ b/RepositoryExternal.mk
624 @@ -704,6 +704,21 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
628 +define gb_LinkTarget__use_boost_filesystem
629 +$(call gb_LinkTarget_add_defs,$(1),\
630 + -DBOOST_ALL_NO_LIB \
633 +$(call gb_LinkTarget_use_static_libraries,$(1),\
639 +define gb_ExternalProject__use_boost_filesystem
640 +$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
643 define gb_LinkTarget__use_boost_iostreams
644 $(call gb_LinkTarget_add_defs,$(1),\
646 @@ -743,25 +758,11 @@ $(call gb_LinkTarget_set_include,$(1),\
650 -define gb_LinkTarget__use_boost_filesystem
651 -$(call gb_LinkTarget_add_defs,$(1),\
652 - -DBOOST_ALL_NO_LIB \
655 -$(call gb_LinkTarget_use_static_libraries,$(1),\
661 -define gb_ExternalProject__use_boost_filesystem
662 -$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
665 define gb_ExternalProject__use_boost_headers
666 $(call gb_ExternalProject_use_unpacked,$(1),boost)
676 From 57c439a15e151fa9f7c298ceb15165749958c53c Mon Sep 17 00:00:00 2001
677 From: David Tardon <dtardon@redhat.com>
678 Date: Tue, 8 Mar 2016 06:06:36 +0100
679 Subject: [PATCH 2/4] reduce copypasta
681 Change-Id: I5303caf69128a0a6d28fccfcf2ab63ed466e3853
683 RepositoryExternal.mk | 81 +++++++++++++--------------------------------------
684 1 file changed, 21 insertions(+), 60 deletions(-)
686 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
687 index c8aab64..58f924d 100644
688 --- a/RepositoryExternal.mk
689 +++ b/RepositoryExternal.mk
690 @@ -617,7 +617,7 @@ endif # SYSTEM_HUNSPELL
692 ifneq ($(SYSTEM_BOOST),)
694 -define gb_LinkTarget__use_boostdatetime
695 +define gb_LinkTarget__use_boost_lib
696 $(call gb_LinkTarget_set_include,$(1),\
699 @@ -627,43 +627,24 @@ $(call gb_LinkTarget_add_ldflags,$(1),\
703 -$(call gb_LinkTarget_add_libs,$(1),\
704 - $(BOOST_DATE_TIME_LIB) \
706 +$(call gb_LinkTarget_add_libs,$(1),$(2))
710 -define gb_LinkTarget__use_boost_iostreams
711 -$(call gb_LinkTarget_set_include,$(1),\
713 - $(BOOST_CPPFLAGS) \
715 +define gb_LinkTarget__use_boostdatetime
716 +$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
718 -$(call gb_LinkTarget_add_ldflags,$(1),\
723 -$(call gb_LinkTarget_add_libs,$(1),\
724 - $(BOOST_IOSTREAMS_LIB) \
726 +define gb_LinkTarget__use_boost_iostreams
727 +$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
731 gb_ExternalProject__use_boost_iostreams :=
733 define gb_LinkTarget__use_boost_system
734 -$(call gb_LinkTarget_set_include,$(1),\
736 - $(BOOST_CPPFLAGS) \
739 -$(call gb_LinkTarget_add_ldflags,$(1),\
743 -$(call gb_LinkTarget_add_libs,$(1),\
744 - $(BOOST_SYSTEM_LIB) \
746 +$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
750 @@ -681,37 +662,29 @@ gb_ExternalProject__use_boost_headers:=
755 -define gb_LinkTarget__use_boostthread
756 +define gb_LinkTarget__use_boost_lib
757 $(call gb_LinkTarget_add_defs,$(1),\
761 -$(call gb_LinkTarget_use_static_libraries,$(1),\
764 +$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
769 +define gb_LinkTarget__use_boostthread
770 +$(call gb_LinkTarget__use_boost_lib,$(1),boostthread)
775 define gb_LinkTarget__use_boostdatetime
776 -$(call gb_LinkTarget_add_defs,$(1),\
777 - -DBOOST_ALL_NO_LIB \
780 -$(call gb_LinkTarget_use_static_libraries,$(1),\
783 +$(call gb_LinkTarget__use_boost_lib,$(1),boostdatetime)
787 define gb_LinkTarget__use_boost_filesystem
788 -$(call gb_LinkTarget_add_defs,$(1),\
789 - -DBOOST_ALL_NO_LIB \
792 -$(call gb_LinkTarget_use_static_libraries,$(1),\
795 +$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
799 @@ -720,13 +693,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
802 define gb_LinkTarget__use_boost_iostreams
803 -$(call gb_LinkTarget_add_defs,$(1),\
804 - -DBOOST_ALL_NO_LIB \
807 -$(call gb_LinkTarget_use_static_libraries,$(1),\
810 +$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
814 @@ -735,13 +702,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
817 define gb_LinkTarget__use_boost_system
818 -$(call gb_LinkTarget_add_defs,$(1),\
819 - -DBOOST_ALL_NO_LIB \
822 -$(call gb_LinkTarget_use_static_libraries,$(1),\
825 +$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
832 From ed41a33ca22f46b123df4132d376247682af07af Mon Sep 17 00:00:00 2001
833 From: David Tardon <dtardon@redhat.com>
834 Date: Tue, 8 Mar 2016 06:23:24 +0100
835 Subject: [PATCH 3/4] detect Boost.Filesystem
837 Change-Id: I86c268f49f44bd1e208a9de781a16bf19450c64c
839 config_host.mk.in | 1 +
841 m4/ax_boost_filesystem.m4 | 118 ++++++++++++++++++++++++++++++++++++++++++++++
842 3 files changed, 120 insertions(+)
843 create mode 100644 m4/ax_boost_filesystem.m4
845 diff --git a/config_host.mk.in b/config_host.mk.in
846 index 89081ca..0a2ec0b 100644
847 --- a/config_host.mk.in
848 +++ b/config_host.mk.in
849 @@ -37,6 +37,7 @@ export BARCODE_EXTENSION_PACK=@BARCODE_EXTENSION_PACK@
850 export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
851 export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@
852 export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
853 +export BOOST_FILESYSTEM_LIB=@BOOST_FILESYSTEM_LIB@
854 export BOOST_IOSTREAMS_LIB=@BOOST_IOSTREAMS_LIB@
855 export BOOST_LDFLAGS=@BOOST_LDFLAGS@
856 export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@
857 diff --git a/configure.ac b/configure.ac
858 index dab1919..7b5cedd 100644
861 @@ -8836,6 +8836,7 @@ if test "$with_system_boost" = "yes"; then
865 + AX_BOOST_FILESYSTEM
867 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
868 libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
869 diff --git a/m4/ax_boost_filesystem.m4 b/m4/ax_boost_filesystem.m4
871 index 0000000..f162163
873 +++ b/m4/ax_boost_filesystem.m4
875 +# ===========================================================================
876 +# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
877 +# ===========================================================================
881 +# AX_BOOST_FILESYSTEM
885 +# Test for Filesystem library from the Boost C++ libraries. The macro
886 +# requires a preceding call to AX_BOOST_BASE. Further documentation is
887 +# available at <http://randspringer.de/boost/index.html>.
891 +# AC_SUBST(BOOST_FILESYSTEM_LIB)
895 +# HAVE_BOOST_FILESYSTEM
899 +# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
900 +# Copyright (c) 2009 Michael Tindal
901 +# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
903 +# Copying and distribution of this file, with or without modification, are
904 +# permitted in any medium without royalty provided the copyright notice
905 +# and this notice are preserved. This file is offered as-is, without any
910 +AC_DEFUN([AX_BOOST_FILESYSTEM],
912 + AC_ARG_WITH([boost-filesystem],
913 + AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
914 + [use the Filesystem library from boost - it is possible to specify a certain library for the linker
915 + e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
917 + if test "$withval" = "no"; then
919 + elif test "$withval" = "yes"; then
921 + ax_boost_user_filesystem_lib=""
924 + ax_boost_user_filesystem_lib="$withval"
930 + if test "x$want_boost" = "xyes"; then
931 + AC_REQUIRE([AC_PROG_CC])
932 + CPPFLAGS_SAVED="$CPPFLAGS"
933 + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
936 + LDFLAGS_SAVED="$LDFLAGS"
937 + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
941 + LIBS="$LIBS $BOOST_SYSTEM_LIB"
944 + AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
945 + ax_cv_boost_filesystem,
946 + [AC_LANG_PUSH([C++])
947 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
948 + [[using namespace boost::filesystem;
949 + path my_path( "foo/bar/data.txt" );
951 + ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
954 + if test "x$ax_cv_boost_filesystem" = "xyes"; then
955 + AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
956 + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
957 + if test "x$ax_boost_user_filesystem_lib" = "x"; then
958 + for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
959 + ax_lib=${libextension}
960 + AC_CHECK_LIB($ax_lib, exit,
961 + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
962 + [link_filesystem="no"])
964 + if test "x$link_filesystem" != "xyes"; then
965 + for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
966 + ax_lib=${libextension}
967 + AC_CHECK_LIB($ax_lib, exit,
968 + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
969 + [link_filesystem="no"])
973 + for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
974 + AC_CHECK_LIB($ax_lib, exit,
975 + [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
976 + [link_filesystem="no"])
980 + if test "x$ax_lib" = "x"; then
981 + AC_MSG_ERROR(Could not find a version of the library!)
983 + if test "x$link_filesystem" != "xyes"; then
984 + AC_MSG_ERROR(Could not link against $ax_lib !)
988 + CPPFLAGS="$CPPFLAGS_SAVED"
989 + LDFLAGS="$LDFLAGS_SAVED"
996 From b4339fa7eee12f173b2273aed5dc6b8abae528f4 Mon Sep 17 00:00:00 2001
997 From: David Tardon <dtardon@redhat.com>
998 Date: Tue, 8 Mar 2016 06:08:36 +0100
999 Subject: [PATCH 4/4] define boost_filestystem external for system boost too
1001 Change-Id: Ie9bfc6a5f3e1862acbd1bb08c6f2bb0b63f2587e
1003 RepositoryExternal.mk | 7 +++++++
1004 1 file changed, 7 insertions(+)
1006 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
1007 index 58f924d..ca7cdf8 100644
1008 --- a/RepositoryExternal.mk
1009 +++ b/RepositoryExternal.mk
1010 @@ -636,6 +636,13 @@ $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
1014 +define gb_LinkTarget__use_boost_filesystem
1015 +$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
1019 +gb_ExternalProject__use_boost_filesystem :=
1021 define gb_LinkTarget__use_boost_iostreams
1022 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))