1 From edb38d702dd5a058ae0702b73a43328318b94649 Mon Sep 17 00:00:00 2001
2 From: David Tardon <dtardon@redhat.com>
3 Date: Thu, 4 Jun 2015 16:09:48 +0200
4 Subject: [PATCH] update to liborcus 0.9.1
6 Includes switching to dynamic libs.
8 Change-Id: I959c4e9430f8cf95f50d48e1b01d8323dba4af81
10 RepositoryExternal.mk | 55 +-
13 external/liborcus/0001-fix-dllexport-decls.patch | 101 ++
14 .../0001-mark-more-symbols-as-public.patch | 52 +
15 ...ese-functions-are-implemented-in-liborcus.patch | 36 +
16 ...1-workaround-a-linking-problem-on-windows.patch | 45 +
17 external/liborcus/ExternalPackage_liborcus.mk | 22 +
18 external/liborcus/ExternalProject_liborcus.mk | 4 +-
19 external/liborcus/Library_orcus-parser.mk | 55 +
20 external/liborcus/Library_orcus.mk | 104 ++
21 external/liborcus/Module_liborcus.mk | 17 +-
22 external/liborcus/UnpackedTarball_liborcus.mk | 25 +-
23 external/liborcus/liborcus_0.1.0-configure.patch | 20 -
24 external/liborcus/liborcus_0.1.0-dllimport.patch | 24 -
25 .../liborcus/liborcus_0.7.0-configure.gcc5.patch.0 | 1800 --------------------
26 external/liborcus/visibility.patch | 11 -
27 sc/source/filter/html/htmlpars.cxx | 30 +-
28 sc/source/filter/inc/orcusinterface.hxx | 10 +
29 sc/source/filter/orcus/interface.cxx | 48 +-
30 20 files changed, 572 insertions(+), 1891 deletions(-)
31 create mode 100644 external/liborcus/0001-fix-dllexport-decls.patch
32 create mode 100644 external/liborcus/0001-mark-more-symbols-as-public.patch
33 create mode 100644 external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch
34 create mode 100644 external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
35 create mode 100644 external/liborcus/ExternalPackage_liborcus.mk
36 create mode 100644 external/liborcus/Library_orcus-parser.mk
37 create mode 100644 external/liborcus/Library_orcus.mk
38 delete mode 100644 external/liborcus/liborcus_0.1.0-configure.patch
39 delete mode 100644 external/liborcus/liborcus_0.1.0-dllimport.patch
40 delete mode 100644 external/liborcus/liborcus_0.7.0-configure.gcc5.patch.0
41 delete mode 100644 external/liborcus/visibility.patch
43 diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
44 index 47e4d17..726ef75 100644
45 --- a/RepositoryExternal.mk
46 +++ b/RepositoryExternal.mk
47 @@ -3209,35 +3209,78 @@ endef
49 else # !SYSTEM_LIBORCUS
53 +$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
58 +define gb_LinkTarget__use_orcus
59 +$(call gb_LinkTarget_set_include,$(1),\
60 + -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
64 +$(call gb_LinkTarget_use_libraries,$(1),\
70 +define gb_LinkTarget__use_orcus-parser
71 +$(call gb_LinkTarget_set_include,$(1),\
72 + -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
76 +$(call gb_LinkTarget_use_libraries,$(1),\
84 +$(eval $(call gb_Helper_register_packages_for_install,ooo,\
88 define gb_LinkTarget__use_orcus
89 -$(call gb_LinkTarget_use_external_project,$(1),liborcus)
90 +$(call gb_LinkTarget_use_package,$(1),liborcus)
92 $(call gb_LinkTarget_set_include,$(1),\
93 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
97 $(call gb_LinkTarget_add_libs,$(1),\
98 - $(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs/liborcus-0.8$(gb_StaticLibrary_PLAINEXT) \
99 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.10 \
102 $(if $(SYSTEM_BOOST), \
103 - $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
104 - $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
105 + $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
106 + $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
111 define gb_LinkTarget__use_orcus-parser
112 -$(call gb_LinkTarget_use_external_project,$(1),liborcus)
113 +$(call gb_LinkTarget_use_package,$(1),liborcus)
115 $(call gb_LinkTarget_set_include,$(1),\
116 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
120 $(call gb_LinkTarget_add_libs,$(1),\
121 - $(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs/liborcus-parser-0.8$(gb_StaticLibrary_PLAINEXT) \
122 + -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.10 \
129 endif # SYSTEM_LIBORCUS
131 else # ENABLE_ORCUS != TRUE
132 diff --git a/configure.ac b/configure.ac
133 index c7483a0..ac00539 100644
136 @@ -9012,7 +9012,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then
138 AC_DEFINE(ENABLE_ORCUS)
140 - libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.8 >= 0.7.0])
141 + libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.10 >= 0.9.0])
142 if test "$with_system_orcus" != "yes"; then
143 if test "$SYSTEM_BOOST" = "TRUE"; then
144 # ===========================================================
145 diff --git a/download.lst b/download.lst
146 index 86ce10c..7b4bfe4 100644
149 @@ -118,7 +118,7 @@ export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
150 export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
151 export OPENSSL_MD5SUM := a06c547dac9044161a477211049f60ef
152 export OPENSSL_TARBALL := openssl-1.0.2a.tar.gz
153 -export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
154 +export ORCUS_TARBALL := 18814358772ed7bb476e04b0384af082-liborcus-0.9.1.tar.gz
155 export PAGEMAKER_MD5SUM := 795cc7a59ace4db2b12586971d668671
156 export PAGEMAKER_TARBALL := libpagemaker-0.0.2.tar.bz2
157 export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
158 diff --git a/external/liborcus/0001-fix-dllexport-decls.patch b/external/liborcus/0001-fix-dllexport-decls.patch
160 index 0000000..75a4423
162 +++ b/external/liborcus/0001-fix-dllexport-decls.patch
164 +From 3e08d2264984b8d5227e22c7089f00f8f2e36513 Mon Sep 17 00:00:00 2001
165 +From: David Tardon <dtardon@redhat.com>
166 +Date: Tue, 2 Jun 2015 23:26:39 +0200
167 +Subject: [PATCH] fix dllexport decls
170 + include/orcus/base64.hpp | 4 ++--
171 + include/orcus/exception.hpp | 2 +-
172 + include/orcus/pstring.hpp | 6 +++---
173 + include/orcus/stream.hpp | 2 +-
174 + include/orcus/string_pool.hpp | 2 +-
175 + 5 files changed, 8 insertions(+), 8 deletions(-)
177 +diff --git a/include/orcus/base64.hpp b/include/orcus/base64.hpp
178 +index a4cf020..0f81289 100644
179 +--- a/include/orcus/base64.hpp
180 ++++ b/include/orcus/base64.hpp
181 +@@ -22,7 +22,7 @@ namespace orcus {
182 + * @param len_base64 length of encoded character sequence.
183 + * @param decoded decoded byte sequence will be put into this parameter.
185 +-ORCUS_DLLPUBLIC void decode_from_base64(const char* p_base64, size_t len_base64, std::vector<char>& decoded);
186 ++ORCUS_PSR_DLLPUBLIC void decode_from_base64(const char* p_base64, size_t len_base64, std::vector<char>& decoded);
189 + * Encode a sequence of bytes into base64-encoded characters.
190 +@@ -31,7 +31,7 @@ ORCUS_DLLPUBLIC void decode_from_base64(const char* p_base64, size_t len_base64,
191 + * @param encoded base64-encoded character sequence representing the input
194 +-ORCUS_DLLPUBLIC void encode_to_base64(const std::vector<char>& input, std::string& encoded);
195 ++ORCUS_PSR_DLLPUBLIC void encode_to_base64(const std::vector<char>& input, std::string& encoded);
199 +diff --git a/include/orcus/exception.hpp b/include/orcus/exception.hpp
200 +index 63729ae..ba6132c 100644
201 +--- a/include/orcus/exception.hpp
202 ++++ b/include/orcus/exception.hpp
203 +@@ -25,7 +25,7 @@ private:
204 + ::std::string m_msg;
207 +-class ORCUS_DLLPUBLIC xml_structure_error : public general_error
208 ++class ORCUS_PSR_DLLPUBLIC xml_structure_error : public general_error
211 + explicit xml_structure_error(const ::std::string& msg);
212 +diff --git a/include/orcus/pstring.hpp b/include/orcus/pstring.hpp
213 +index e38d4be..c72b78b 100644
214 +--- a/include/orcus/pstring.hpp
215 ++++ b/include/orcus/pstring.hpp
216 +@@ -71,7 +71,7 @@ public:
220 +- struct ORCUS_DLLPUBLIC hash
221 ++ struct ORCUS_PSR_DLLPUBLIC hash
223 + size_t operator() (const pstring& val) const;
225 +@@ -86,8 +86,8 @@ inline ::std::ostream& operator<< (::std::ostream& os, const pstring& str)
226 + return os << str.str();
229 +-ORCUS_DLLPUBLIC std::string operator+ (const std::string& left, const pstring& right);
230 +-ORCUS_DLLPUBLIC std::string& operator+= (std::string& left, const pstring& right);
231 ++ORCUS_PSR_DLLPUBLIC std::string operator+ (const std::string& left, const pstring& right);
232 ++ORCUS_PSR_DLLPUBLIC std::string& operator+= (std::string& left, const pstring& right);
236 +diff --git a/include/orcus/stream.hpp b/include/orcus/stream.hpp
237 +index a32f6a4..064d386 100644
238 +--- a/include/orcus/stream.hpp
239 ++++ b/include/orcus/stream.hpp
240 +@@ -20,7 +20,7 @@ namespace orcus {
241 + * @param filepath file to open
242 + * @param strm content of the file
244 +-ORCUS_DLLPUBLIC void load_file_content(const char* filepath, std::string& strm);
245 ++ORCUS_PSR_DLLPUBLIC void load_file_content(const char* filepath, std::string& strm);
249 +diff --git a/include/orcus/string_pool.hpp b/include/orcus/string_pool.hpp
250 +index e4afa4f..b895ee4 100644
251 +--- a/include/orcus/string_pool.hpp
252 ++++ b/include/orcus/string_pool.hpp
253 +@@ -21,7 +21,7 @@ namespace orcus {
255 + * Implements string hash map.
257 +-class ORCUS_DLLPUBLIC string_pool
258 ++class ORCUS_PSR_DLLPUBLIC string_pool
265 diff --git a/external/liborcus/0001-mark-more-symbols-as-public.patch b/external/liborcus/0001-mark-more-symbols-as-public.patch
267 index 0000000..ee9658e
269 +++ b/external/liborcus/0001-mark-more-symbols-as-public.patch
271 +From 718b1adfe9c327e06b1ab796c5cd9805db63c9b3 Mon Sep 17 00:00:00 2001
272 +From: David Tardon <dtardon@redhat.com>
273 +Date: Wed, 3 Jun 2015 07:46:50 +0200
274 +Subject: [PATCH] mark more symbols as public
277 + include/orcus/xml_structure_tree.hpp | 8 ++++----
278 + 1 file changed, 4 insertions(+), 4 deletions(-)
280 +diff --git a/include/orcus/xml_structure_tree.hpp b/include/orcus/xml_structure_tree.hpp
281 +index 097e56c..58cabfd 100644
282 +--- a/include/orcus/xml_structure_tree.hpp
283 ++++ b/include/orcus/xml_structure_tree.hpp
284 +@@ -31,7 +31,7 @@ class ORCUS_DLLPUBLIC xml_structure_tree
288 +- struct entity_name
289 ++ struct ORCUS_DLLPUBLIC entity_name
293 +@@ -42,7 +42,7 @@ public:
294 + bool operator< (const entity_name& r) const;
295 + bool operator== (const entity_name& r) const;
298 ++ struct ORCUS_DLLPUBLIC hash
300 + size_t operator ()(const entity_name& val) const;
302 +@@ -50,7 +50,7 @@ public:
304 + typedef std::vector<entity_name> entity_names_type;
307 ++ struct ORCUS_DLLPUBLIC element
311 +@@ -64,7 +64,7 @@ public:
313 + * This class allows client to traverse the tree.
316 ++ class ORCUS_DLLPUBLIC walker
318 + friend class xml_structure_tree;
319 + walker_impl* mp_impl;
323 diff --git a/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch b/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch
325 index 0000000..c027da6
327 +++ b/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch
329 +From 26d33d7cfd93b22e2fa13e6a3e28d133619948cf Mon Sep 17 00:00:00 2001
330 +From: David Tardon <dtardon@redhat.com>
331 +Date: Thu, 4 Jun 2015 12:33:26 +0200
332 +Subject: [PATCH] these functions are implemented in liborcus
335 + include/orcus/spreadsheet/types.hpp | 6 +++---
336 + 1 file changed, 3 insertions(+), 3 deletions(-)
338 +diff --git a/include/orcus/spreadsheet/types.hpp b/include/orcus/spreadsheet/types.hpp
339 +index a78340e..bec14c8 100644
340 +--- a/include/orcus/spreadsheet/types.hpp
341 ++++ b/include/orcus/spreadsheet/types.hpp
342 +@@ -22,8 +22,8 @@ typedef unsigned char color_elem_t;
343 + typedef unsigned short col_width_t;
344 + typedef unsigned short row_height_t;
346 +-ORCUS_SPM_DLLPUBLIC col_width_t get_default_column_width();
347 +-ORCUS_SPM_DLLPUBLIC row_height_t get_default_row_height();
348 ++ORCUS_DLLPUBLIC col_width_t get_default_column_width();
349 ++ORCUS_DLLPUBLIC row_height_t get_default_row_height();
351 + enum border_direction_t
353 +@@ -192,7 +192,7 @@ enum databar_axis_t
354 + * Convert a string representation of a totals row function name to its
355 + * equivalent enum value.
357 +-ORCUS_SPM_DLLPUBLIC totals_row_function_t to_totals_row_function_enum(const char* p, size_t n);
358 ++ORCUS_DLLPUBLIC totals_row_function_t to_totals_row_function_enum(const char* p, size_t n);
365 diff --git a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
367 index 0000000..5710877
369 +++ b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
371 +From 71841b7aa7c5e75a793cfaafb31865524a74d9fc Mon Sep 17 00:00:00 2001
372 +From: David Tardon <dtardon@redhat.com>
373 +Date: Thu, 4 Jun 2015 16:13:18 +0200
374 +Subject: [PATCH] workaround a linking problem on windows
376 +Linking scfiltlo.dll gives the following error:
378 +xmlcontext.o : error LNK2019: unresolved external symbol "char const * const orcus::XMLNS_UNKNOWN_ID" (?XMLNS_UNKNOWN_ID@orcus@@3QBDB) referenced in function "void __cdecl std::_For_each<unsigned int const *,class `anonymous namespace'::SetNamespaceAlias>(unsigned int const *,unsigned int const *,class `anonymous namespace'::SetNamespaceAlias &)" (??$_For_each@PBIVSetNamespaceAlias@?A0xafb5dd33@@@std@@YAXPBI0AAVSetNamespaceAlias@?A0xafb5dd33@@@Z)
379 +C:/cygwin/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Windows/instdir/program/scfiltlo.dll : fatal error LNK1120: 1 unresolved externals
381 +I have got no idea what is the cause of this: the constant--exported in
382 +liborcus-parser.dll--is used in liborus.dll without any problem.
384 + include/orcus/types.hpp | 2 +-
385 + src/parser/types.cpp | 1 -
386 + 2 files changed, 1 insertion(+), 2 deletions(-)
388 +diff --git a/include/orcus/types.hpp b/include/orcus/types.hpp
389 +index b6e3f83..8027f25 100644
390 +--- a/include/orcus/types.hpp
391 ++++ b/include/orcus/types.hpp
392 +@@ -21,7 +21,7 @@ namespace orcus {
393 + typedef size_t xml_token_t;
394 + typedef const char* xmlns_id_t;
396 +-ORCUS_PSR_DLLPUBLIC extern const xmlns_id_t XMLNS_UNKNOWN_ID;
397 ++const xmlns_id_t XMLNS_UNKNOWN_ID = NULL;
398 + ORCUS_PSR_DLLPUBLIC extern const xml_token_t XML_UNKNOWN_TOKEN;
399 + ORCUS_PSR_DLLPUBLIC extern const size_t index_not_found;
400 + ORCUS_PSR_DLLPUBLIC extern const size_t unspecified;
401 +diff --git a/src/parser/types.cpp b/src/parser/types.cpp
402 +index be4e304..0a1b4a7 100644
403 +--- a/src/parser/types.cpp
404 ++++ b/src/parser/types.cpp
409 +-const xmlns_id_t XMLNS_UNKNOWN_ID = NULL;
410 + const xml_token_t XML_UNKNOWN_TOKEN = 0;
412 + const size_t index_not_found = std::numeric_limits<size_t>::max();
416 diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
418 index 0000000..96899e7
420 +++ b/external/liborcus/ExternalPackage_liborcus.mk
422 +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
424 +# This file is part of the LibreOffice project.
426 +# This Source Code Form is subject to the terms of the Mozilla Public
427 +# License, v. 2.0. If a copy of the MPL was not distributed with this
428 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
431 +$(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
433 +$(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
436 +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.0.dylib,src/liborcus/.libs/liborcus-0.10.0.dylib))
437 +$(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))
438 +else ifeq ($(filter IOS ANDROID,$(OS)),)
439 +$(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))
440 +$(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))
443 +# vim: set noet sw=4 ts=4:
444 diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
445 index 90d453c..ff488bf 100644
446 --- a/external/liborcus/ExternalProject_liborcus.mk
447 +++ b/external/liborcus/ExternalProject_liborcus.mk
448 @@ -87,8 +87,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
450 MAKE=$(MAKE) ./configure \
456 $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
457 --disable-spreadsheet-model \
459 diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
461 index 0000000..c3b4eec
463 +++ b/external/liborcus/Library_orcus-parser.mk
465 +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
467 +# This file is part of the LibreOffice project.
469 +# This Source Code Form is subject to the terms of the Mozilla Public
470 +# License, v. 2.0. If a copy of the MPL was not distributed with this
471 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
474 +$(eval $(call gb_Library_Library,orcus-parser))
476 +$(eval $(call gb_Library_use_unpacked,orcus-parser,liborcus))
478 +$(eval $(call gb_Library_use_externals,orcus-parser,\
485 +$(eval $(call gb_Library_set_warnings_not_errors,orcus-parser))
487 +$(eval $(call gb_Library_set_include,orcus-parser,\
488 + -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \
492 +$(eval $(call gb_Library_add_defs,orcus-parser,\
493 + -DBOOST_ALL_NO_LIB \
494 + -D__ORCUS_PSR_BUILDING_DLL \
497 +$(eval $(call gb_Library_set_generated_cxx_suffix,orcus-parser,cpp))
499 +$(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
500 + UnpackedTarball/liborcus/src/parser/base64 \
501 + UnpackedTarball/liborcus/src/parser/cell_buffer \
502 + UnpackedTarball/liborcus/src/parser/css_parser_base \
503 + UnpackedTarball/liborcus/src/parser/css_types \
504 + UnpackedTarball/liborcus/src/parser/csv_parser_base \
505 + UnpackedTarball/liborcus/src/parser/exception \
506 + UnpackedTarball/liborcus/src/parser/parser_global \
507 + UnpackedTarball/liborcus/src/parser/pstring \
508 + UnpackedTarball/liborcus/src/parser/sax_parser_base \
509 + UnpackedTarball/liborcus/src/parser/sax_token_parser \
510 + UnpackedTarball/liborcus/src/parser/stream \
511 + UnpackedTarball/liborcus/src/parser/string_pool \
512 + UnpackedTarball/liborcus/src/parser/tokens \
513 + UnpackedTarball/liborcus/src/parser/types \
514 + UnpackedTarball/liborcus/src/parser/xml_namespace \
515 + UnpackedTarball/liborcus/src/parser/zip_archive \
516 + UnpackedTarball/liborcus/src/parser/zip_archive_stream \
519 +# vim: set noet sw=4 ts=4:
520 diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
522 index 0000000..ae98d5e
524 +++ b/external/liborcus/Library_orcus.mk
526 +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
528 +# This file is part of the LibreOffice project.
530 +# This Source Code Form is subject to the terms of the Mozilla Public
531 +# License, v. 2.0. If a copy of the MPL was not distributed with this
532 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
535 +$(eval $(call gb_Library_Library,orcus))
537 +$(eval $(call gb_Library_use_unpacked,orcus,liborcus))
539 +$(eval $(call gb_Library_use_externals,orcus,\
547 +$(eval $(call gb_Library_set_warnings_not_errors,orcus))
549 +$(eval $(call gb_Library_set_include,orcus,\
550 + -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \
554 +$(eval $(call gb_Library_add_defs,orcus,\
555 + -DBOOST_ALL_NO_LIB \
556 + -D__ORCUS_BUILDING_DLL \
559 +$(eval $(call gb_Library_use_libraries,orcus,\
563 +$(eval $(call gb_Library_set_generated_cxx_suffix,orcus,cpp))
565 +$(eval $(call gb_Library_add_generated_exception_objects,orcus,\
566 + UnpackedTarball/liborcus/src/liborcus/config \
567 + UnpackedTarball/liborcus/src/liborcus/css_document_tree \
568 + UnpackedTarball/liborcus/src/liborcus/css_selector \
569 + UnpackedTarball/liborcus/src/liborcus/detection_result \
570 + UnpackedTarball/liborcus/src/liborcus/dom_tree \
571 + UnpackedTarball/liborcus/src/liborcus/format_detection \
572 + UnpackedTarball/liborcus/src/liborcus/global \
573 + UnpackedTarball/liborcus/src/liborcus/gnumeric_cell_context \
574 + UnpackedTarball/liborcus/src/liborcus/gnumeric_context \
575 + UnpackedTarball/liborcus/src/liborcus/gnumeric_detection_handler \
576 + UnpackedTarball/liborcus/src/liborcus/gnumeric_handler \
577 + UnpackedTarball/liborcus/src/liborcus/gnumeric_helper \
578 + UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \
579 + UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \
580 + UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \
581 + UnpackedTarball/liborcus/src/liborcus/interface \
582 + UnpackedTarball/liborcus/src/liborcus/measurement \
583 + UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \
584 + UnpackedTarball/liborcus/src/liborcus/odf_para_context \
585 + UnpackedTarball/liborcus/src/liborcus/odf_styles \
586 + UnpackedTarball/liborcus/src/liborcus/odf_styles_context \
587 + UnpackedTarball/liborcus/src/liborcus/odf_tokens \
588 + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \
589 + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \
590 + UnpackedTarball/liborcus/src/liborcus/ods_session_data \
591 + UnpackedTarball/liborcus/src/liborcus/ooxml_content_types \
592 + UnpackedTarball/liborcus/src/liborcus/ooxml_global \
593 + UnpackedTarball/liborcus/src/liborcus/ooxml_namespace_types \
594 + UnpackedTarball/liborcus/src/liborcus/ooxml_schemas \
595 + UnpackedTarball/liborcus/src/liborcus/ooxml_tokens \
596 + UnpackedTarball/liborcus/src/liborcus/ooxml_types \
597 + UnpackedTarball/liborcus/src/liborcus/opc_context \
598 + UnpackedTarball/liborcus/src/liborcus/opc_reader \
599 + UnpackedTarball/liborcus/src/liborcus/orcus_csv \
600 + UnpackedTarball/liborcus/src/liborcus/orcus_gnumeric \
601 + UnpackedTarball/liborcus/src/liborcus/orcus_ods \
602 + UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \
603 + UnpackedTarball/liborcus/src/liborcus/orcus_xml \
604 + UnpackedTarball/liborcus/src/liborcus/session_context \
605 + UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \
606 + UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \
607 + UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \
608 + UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \
609 + UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \
610 + UnpackedTarball/liborcus/src/liborcus/xlsx_context \
611 + UnpackedTarball/liborcus/src/liborcus/xlsx_handler \
612 + UnpackedTarball/liborcus/src/liborcus/xlsx_helper \
613 + UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \
614 + UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \
615 + UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \
616 + UnpackedTarball/liborcus/src/liborcus/xlsx_sheet_context \
617 + UnpackedTarball/liborcus/src/liborcus/xlsx_table_context \
618 + UnpackedTarball/liborcus/src/liborcus/xlsx_types \
619 + UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \
620 + UnpackedTarball/liborcus/src/liborcus/xml_context_base \
621 + UnpackedTarball/liborcus/src/liborcus/xml_context_global \
622 + UnpackedTarball/liborcus/src/liborcus/xml_map_tree \
623 + UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \
624 + UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
625 + UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
626 + UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
629 +# vim: set noet sw=4 ts=4:
630 diff --git a/external/liborcus/Module_liborcus.mk b/external/liborcus/Module_liborcus.mk
631 index 42f1715..e75b983 100644
632 --- a/external/liborcus/Module_liborcus.mk
633 +++ b/external/liborcus/Module_liborcus.mk
635 $(eval $(call gb_Module_Module,liborcus))
637 $(eval $(call gb_Module_add_targets,liborcus,\
638 - ExternalProject_liborcus \
639 UnpackedTarball_liborcus \
644 +$(eval $(call gb_Module_add_targets,liborcus,\
646 + Library_orcus-parser \
651 +$(eval $(call gb_Module_add_targets,liborcus,\
652 + ExternalPackage_liborcus \
653 + ExternalProject_liborcus \
658 # vim: set noet sw=4 ts=4:
659 diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
660 index 126f250..ae569ed 100644
661 --- a/external/liborcus/UnpackedTarball_liborcus.mk
662 +++ b/external/liborcus/UnpackedTarball_liborcus.mk
663 @@ -11,28 +11,13 @@ $(eval $(call gb_UnpackedTarball_Unpacke
665 $(eval $(call gb_UnpackedTarball_set_tarball,liborcus,$(ORCUS_TARBALL)))
667 -$(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,0))
671 -# make config.sub recognize arm-linux-androideabi
672 -# liborcus_patches += liborcus_0.1.0-configure.patch
674 -# don't use dllimport
675 -liborcus_patches += liborcus_0.1.0-dllimport.patch
677 -# Any -fvisibility= etc. settings are passed into liborcus' CXXFLAGS via
678 -# gb_VISIBILITY_FLAGS[_CXX]:
679 -liborcus_patches += visibility.patch
681 -# <https://gitorious.org/orcus/orcus/merge_requests/2#
682 -# f60d6eecee72349993a392a9a63ddf3383d3b8c8-
683 -# f60d6eecee72349993a392a9a63ddf3383d3b8c8@2>:
685 -liborcus_patches += liborcus_0.7.0-configure.gcc5.patch.0
686 +$(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
688 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
689 - $(foreach patch,$(liborcus_patches),external/liborcus/$(patch)) \
690 + external/liborcus/0001-fix-dllexport-decls.patch \
691 + external/liborcus/0001-mark-more-symbols-as-public.patch \
692 + external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch \
693 + external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
696 # vim: set noet sw=4 ts=4:
697 diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
698 index ce19c0b..e418ed8 100644
699 --- a/sc/source/filter/html/htmlpars.cxx
700 +++ b/sc/source/filter/html/htmlpars.cxx
701 @@ -3170,6 +3170,34 @@ public:
702 maPropName = MemStr();
703 maPropValue = MemStr();
707 + void simple_selector_type(const char* /*p*/, size_t /*n*/) {}
709 + void simple_selector_class(const char* /*p*/, size_t /*n*/) {}
711 + void simple_selector_pseudo_element(orcus::css::pseudo_element_t /*pe*/) {}
713 + void simple_selector_pseudo_class(orcus::css::pseudo_class_t /*pc*/) {}
715 + void simple_selector_id(const char* /*p*/, size_t /*n*/) {}
717 + void end_simple_selector() {}
719 + void end_selector() {}
721 + void combinator(orcus::css::combinator_t /*combinator*/) {}
723 + void rgb(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ ) {}
725 + void rgba(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ , double /*alpha*/ ) {}
727 + void hsl(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ ) {}
729 + void hsla(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ , double /*alpha*/ ) {}
731 + void url(const char* /*p*/, size_t /*n*/) {}
736 @@ -3183,7 +3211,7 @@ void ScHTMLQueryParser::ParseStyle(const OUString& rStrm)
740 - catch (const orcus::css_parse_error&)
741 + catch (const orcus::css::parse_error&)
743 // TODO: Parsing of CSS failed. Do nothing for now.
745 diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
746 index a778310..633b43d 100644
747 --- a/sc/source/filter/inc/orcusinterface.hxx
748 +++ b/sc/source/filter/inc/orcusinterface.hxx
749 @@ -43,6 +43,9 @@ public:
750 ScOrcusGlobalSettings(ScDocumentImport& rDoc);
752 virtual void set_origin_date(int year, int month, int day) SAL_OVERRIDE;
754 + virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) SAL_OVERRIDE;
755 + virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const SAL_OVERRIDE;
758 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
759 @@ -120,9 +123,12 @@ public:
760 orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) SAL_OVERRIDE;
762 virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) SAL_OVERRIDE;
763 + virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
764 + orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) SAL_OVERRIDE;
766 virtual void set_formula(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) SAL_OVERRIDE;
767 virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) SAL_OVERRIDE;
768 + virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double val) SAL_OVERRIDE;
770 virtual void set_shared_formula(
771 orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, size_t sindex,
772 @@ -203,6 +209,10 @@ public:
773 virtual void set_cell_xf_count(size_t n) SAL_OVERRIDE;
774 virtual size_t commit_cell_xf() SAL_OVERRIDE;
777 + virtual void set_dxf_count(size_t count) SAL_OVERRIDE;
778 + virtual size_t commit_dxf() SAL_OVERRIDE;
780 // xf (cell format) - used both by cell xf and cell style xf.
782 virtual void set_xf_number_format(size_t index) SAL_OVERRIDE;
783 diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
784 index 3735f28..82b8f9e 100644
785 --- a/sc/source/filter/orcus/interface.cxx
786 +++ b/sc/source/filter/orcus/interface.cxx
787 @@ -35,6 +35,15 @@ void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day)
788 mrDoc.setOriginDate(year, month, day);
791 +void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t /*grammar*/)
795 +orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
797 + return orcus::spreadsheet::formula_grammar_unknown;
800 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
801 maPos(rPos), mnIndex(nIndex) {}
803 @@ -263,6 +272,11 @@ void ScOrcusSheet::set_format(os::row_t /*row*/, os::col_t /*col*/, size_t /*xf_
807 +void ScOrcusSheet::set_format(os::row_t /*row*/, os::col_t /*col*/,
808 + os::row_t /*row_end*/, os::col_t /*col_end*/, size_t /*xf_index*/)
814 formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t grammar )
815 @@ -270,16 +284,18 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t
816 formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
819 - case orcus::spreadsheet::ods:
820 + case orcus::spreadsheet::formula_grammar_ods:
821 eGrammar = formula::FormulaGrammar::GRAM_ODFF;
823 - case orcus::spreadsheet::xlsx_2007:
824 - case orcus::spreadsheet::xlsx_2010:
825 + case orcus::spreadsheet::formula_grammar_xlsx_2007:
826 + case orcus::spreadsheet::formula_grammar_xlsx_2010:
827 eGrammar = formula::FormulaGrammar::GRAM_OOXML;
829 - case orcus::spreadsheet::gnumeric:
830 + case orcus::spreadsheet::formula_grammar_gnumeric:
831 eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
833 + case orcus::spreadsheet::formula_grammar_unknown:
838 @@ -309,6 +325,19 @@ void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, const char*
839 pCell->SetHybridString(mrDoc.getDoc().GetSharedStringPool().intern(aResult));
842 +void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, double /*val*/)
844 + ScFormulaCell* pCell = mrDoc.getDoc().GetFormulaCell(ScAddress(col, row, mnTab));
847 + SAL_WARN("sc", "trying to set formula result for non formula \
848 + cell! Col: " << col << ";Row: " << row << ";Tab: " << mnTab);
855 void ScOrcusSheet::set_shared_formula(
856 os::row_t row, os::col_t col, os::formula_grammar_t grammar, size_t sindex,
857 const char* p_formula, size_t n_formula)
858 @@ -577,6 +606,17 @@ size_t ScOrcusStyles::commit_cell_xf()
864 +void ScOrcusStyles::set_dxf_count(size_t /*n*/)
868 +size_t ScOrcusStyles::commit_dxf()
873 // xf (cell format) - used both by cell xf and cell style xf.
875 void ScOrcusStyles::set_xf_number_format(size_t /*index*/)