]> git.pld-linux.org Git - packages/libreoffice.git/blame - liborcus-0.9.patch
- better fix to boost linking problems
[packages/libreoffice.git] / liborcus-0.9.patch
CommitLineData
543d891b
JR
1From edb38d702dd5a058ae0702b73a43328318b94649 Mon Sep 17 00:00:00 2001
2From: David Tardon <dtardon@redhat.com>
3Date: Thu, 4 Jun 2015 16:09:48 +0200
4Subject: [PATCH] update to liborcus 0.9.1
5
6Includes switching to dynamic libs.
7
8Change-Id: I959c4e9430f8cf95f50d48e1b01d8323dba4af81
9---
10 RepositoryExternal.mk | 55 +-
11 configure.ac | 2 +-
12 download.lst | 2 +-
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
42
43diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
44index 47e4d17..726ef75 100644
45--- a/RepositoryExternal.mk
46+++ b/RepositoryExternal.mk
47@@ -3209,35 +3209,78 @@ endef
48
49 else # !SYSTEM_LIBORCUS
50
51+ifeq ($(COM),MSC)
52+
53+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
54+ orcus \
55+ orcus-parser \
56+))
57+
58+define gb_LinkTarget__use_orcus
59+$(call gb_LinkTarget_set_include,$(1),\
60+ -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
61+ $$(INCLUDE) \
62+)
63+
64+$(call gb_LinkTarget_use_libraries,$(1),\
65+ orcus \
66+)
67+
68+endef
69+
70+define gb_LinkTarget__use_orcus-parser
71+$(call gb_LinkTarget_set_include,$(1),\
72+ -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
73+ $$(INCLUDE) \
74+)
75+
76+$(call gb_LinkTarget_use_libraries,$(1),\
77+ orcus-parser \
78+)
79+
80+endef
81+
82+else # !MSC
83+
84+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
85+ liborcus \
86+))
87+
88 define gb_LinkTarget__use_orcus
89-$(call gb_LinkTarget_use_external_project,$(1),liborcus)
90+$(call gb_LinkTarget_use_package,$(1),liborcus)
91+
92 $(call gb_LinkTarget_set_include,$(1),\
93 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
94 $$(INCLUDE) \
95 )
96+
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 \
100 )
101
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)) \
107 )
108
109 endef
110
111 define gb_LinkTarget__use_orcus-parser
112-$(call gb_LinkTarget_use_external_project,$(1),liborcus)
113+$(call gb_LinkTarget_use_package,$(1),liborcus)
114+
115 $(call gb_LinkTarget_set_include,$(1),\
116 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
117 $$(INCLUDE) \
118 )
119+
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 \
123 )
124
125 endef
126
127+endif # MSC
128+
129 endif # SYSTEM_LIBORCUS
130
131 else # ENABLE_ORCUS != TRUE
132diff --git a/configure.ac b/configure.ac
133index c7483a0..ac00539 100644
134--- a/configure.ac
135+++ b/configure.ac
136@@ -9012,7 +9012,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then
137 ENABLE_ORCUS="TRUE"
138 AC_DEFINE(ENABLE_ORCUS)
139
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 # ===========================================================
145diff --git a/download.lst b/download.lst
146index 86ce10c..7b4bfe4 100644
147--- a/download.lst
148+++ b/download.lst
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
158diff --git a/external/liborcus/0001-fix-dllexport-decls.patch b/external/liborcus/0001-fix-dllexport-decls.patch
159new file mode 100644
160index 0000000..75a4423
161--- /dev/null
162+++ b/external/liborcus/0001-fix-dllexport-decls.patch
163@@ -0,0 +1,101 @@
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
168+
169+---
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(-)
176+
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.
184+ */
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);
187+
188+ /**
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
192+ * bytes.
193+ */
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);
196+
197+ }
198+
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;
205+ };
206+
207+-class ORCUS_DLLPUBLIC xml_structure_error : public general_error
208++class ORCUS_PSR_DLLPUBLIC xml_structure_error : public general_error
209+ {
210+ public:
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:
217+ m_size = 0;
218+ }
219+
220+- struct ORCUS_DLLPUBLIC hash
221++ struct ORCUS_PSR_DLLPUBLIC hash
222+ {
223+ size_t operator() (const pstring& val) const;
224+ };
225+@@ -86,8 +86,8 @@ inline ::std::ostream& operator<< (::std::ostream& os, const pstring& str)
226+ return os << str.str();
227+ }
228+
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);
233+
234+ }
235+
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
243+ */
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);
246+
247+ }
248+
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 {
254+ /**
255+ * Implements string hash map.
256+ */
257+-class ORCUS_DLLPUBLIC string_pool
258++class ORCUS_PSR_DLLPUBLIC string_pool
259+ {
260+ struct string_hash
261+ {
262+--
263+2.4.1
264+
265diff --git a/external/liborcus/0001-mark-more-symbols-as-public.patch b/external/liborcus/0001-mark-more-symbols-as-public.patch
266new file mode 100644
267index 0000000..ee9658e
268--- /dev/null
269+++ b/external/liborcus/0001-mark-more-symbols-as-public.patch
270@@ -0,0 +1,52 @@
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
275+
276+---
277+ include/orcus/xml_structure_tree.hpp | 8 ++++----
278+ 1 file changed, 4 insertions(+), 4 deletions(-)
279+
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
285+
286+ public:
287+
288+- struct entity_name
289++ struct ORCUS_DLLPUBLIC entity_name
290+ {
291+ xmlns_id_t ns;
292+ pstring name;
293+@@ -42,7 +42,7 @@ public:
294+ bool operator< (const entity_name& r) const;
295+ bool operator== (const entity_name& r) const;
296+
297+- struct hash
298++ struct ORCUS_DLLPUBLIC hash
299+ {
300+ size_t operator ()(const entity_name& val) const;
301+ };
302+@@ -50,7 +50,7 @@ public:
303+
304+ typedef std::vector<entity_name> entity_names_type;
305+
306+- struct element
307++ struct ORCUS_DLLPUBLIC element
308+ {
309+ entity_name name;
310+ bool repeat;
311+@@ -64,7 +64,7 @@ public:
312+ /**
313+ * This class allows client to traverse the tree.
314+ */
315+- class walker
316++ class ORCUS_DLLPUBLIC walker
317+ {
318+ friend class xml_structure_tree;
319+ walker_impl* mp_impl;
320+--
321+2.4.1
322+
323diff --git a/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch b/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch
324new file mode 100644
325index 0000000..c027da6
326--- /dev/null
327+++ b/external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch
328@@ -0,0 +1,36 @@
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
333+
334+---
335+ include/orcus/spreadsheet/types.hpp | 6 +++---
336+ 1 file changed, 3 insertions(+), 3 deletions(-)
337+
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;
345+
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();
350+
351+ enum border_direction_t
352+ {
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.
356+ */
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);
359+
360+ }}
361+
362+--
363+2.4.1
364+
365diff --git a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
366new file mode 100644
367index 0000000..5710877
368--- /dev/null
369+++ b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
370@@ -0,0 +1,45 @@
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
375+
376+Linking scfiltlo.dll gives the following error:
377+
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
380+
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.
383+---
384+ include/orcus/types.hpp | 2 +-
385+ src/parser/types.cpp | 1 -
386+ 2 files changed, 1 insertion(+), 2 deletions(-)
387+
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;
395+
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
405+@@ -12,7 +12,6 @@
406+
407+ namespace orcus {
408+
409+-const xmlns_id_t XMLNS_UNKNOWN_ID = NULL;
410+ const xml_token_t XML_UNKNOWN_TOKEN = 0;
411+
412+ const size_t index_not_found = std::numeric_limits<size_t>::max();
413+--
414+2.4.1
415+
416diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
417new file mode 100644
418index 0000000..96899e7
419--- /dev/null
420+++ b/external/liborcus/ExternalPackage_liborcus.mk
421@@ -0,0 +1,22 @@
422+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
423+#
424+# This file is part of the LibreOffice project.
425+#
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/.
429+#
430+
431+$(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
432+
433+$(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
434+
435+ifeq ($(OS),MACOSX)
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))
441+endif
442+
443+# vim: set noet sw=4 ts=4:
444diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
445index 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) :
449 MDDS_LIBS=' ' \
450 MAKE=$(MAKE) ./configure \
451 --with-pic \
452- --enable-static \
453- --disable-shared \
454+ --enable-shared \
455+ --disable-static \
456 $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
457 --disable-spreadsheet-model \
458 --without-tools \
459diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
460new file mode 100644
461index 0000000..c3b4eec
462--- /dev/null
463+++ b/external/liborcus/Library_orcus-parser.mk
464@@ -0,0 +1,55 @@
465+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
466+#
467+# This file is part of the LibreOffice project.
468+#
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/.
472+#
473+
474+$(eval $(call gb_Library_Library,orcus-parser))
475+
476+$(eval $(call gb_Library_use_unpacked,orcus-parser,liborcus))
477+
478+$(eval $(call gb_Library_use_externals,orcus-parser,\
479+ boost_headers \
480+ boost_system \
481+ mdds_headers \
482+ zlib \
483+))
484+
485+$(eval $(call gb_Library_set_warnings_not_errors,orcus-parser))
486+
487+$(eval $(call gb_Library_set_include,orcus-parser,\
488+ -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \
489+ $$(INCLUDE) \
490+))
491+
492+$(eval $(call gb_Library_add_defs,orcus-parser,\
493+ -DBOOST_ALL_NO_LIB \
494+ -D__ORCUS_PSR_BUILDING_DLL \
495+))
496+
497+$(eval $(call gb_Library_set_generated_cxx_suffix,orcus-parser,cpp))
498+
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 \
517+))
518+
519+# vim: set noet sw=4 ts=4:
520diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
521new file mode 100644
522index 0000000..ae98d5e
523--- /dev/null
524+++ b/external/liborcus/Library_orcus.mk
525@@ -0,0 +1,104 @@
526+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
527+#
528+# This file is part of the LibreOffice project.
529+#
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/.
533+#
534+
535+$(eval $(call gb_Library_Library,orcus))
536+
537+$(eval $(call gb_Library_use_unpacked,orcus,liborcus))
538+
539+$(eval $(call gb_Library_use_externals,orcus,\
540+ boost_headers \
541+ boost_iostreams \
542+ boost_system \
543+ mdds_headers \
544+ zlib \
545+))
546+
547+$(eval $(call gb_Library_set_warnings_not_errors,orcus))
548+
549+$(eval $(call gb_Library_set_include,orcus,\
550+ -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \
551+ $$(INCLUDE) \
552+))
553+
554+$(eval $(call gb_Library_add_defs,orcus,\
555+ -DBOOST_ALL_NO_LIB \
556+ -D__ORCUS_BUILDING_DLL \
557+))
558+
559+$(eval $(call gb_Library_use_libraries,orcus,\
560+ orcus-parser \
561+))
562+
563+$(eval $(call gb_Library_set_generated_cxx_suffix,orcus,cpp))
564+
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 \
627+))
628+
629+# vim: set noet sw=4 ts=4:
630diff --git a/external/liborcus/Module_liborcus.mk b/external/liborcus/Module_liborcus.mk
631index 42f1715..e75b983 100644
632--- a/external/liborcus/Module_liborcus.mk
633+++ b/external/liborcus/Module_liborcus.mk
634@@ -10,8 +10,23 @@
635 $(eval $(call gb_Module_Module,liborcus))
636
637 $(eval $(call gb_Module_add_targets,liborcus,\
638- ExternalProject_liborcus \
639 UnpackedTarball_liborcus \
640 ))
641
642+ifeq ($(COM),MSC)
643+
644+$(eval $(call gb_Module_add_targets,liborcus,\
645+ Library_orcus \
646+ Library_orcus-parser \
647+))
648+
649+else # !MSC
650+
651+$(eval $(call gb_Module_add_targets,liborcus,\
652+ ExternalPackage_liborcus \
653+ ExternalProject_liborcus \
654+))
655+
656+endif
657+
658 # vim: set noet sw=4 ts=4:
659diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
660index 126f250..ae569ed 100644
661--- a/external/liborcus/UnpackedTarball_liborcus.mk
662+++ b/external/liborcus/UnpackedTarball_liborcus.mk
afce9f93 663@@ -11,28 +11,13 @@ $(eval $(call gb_UnpackedTarball_Unpacke
543d891b
JR
664
665 $(eval $(call gb_UnpackedTarball_set_tarball,liborcus,$(ORCUS_TARBALL)))
666
667-$(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,0))
668-
669-liborcus_patches :=
670-
671-# make config.sub recognize arm-linux-androideabi
672-# liborcus_patches += liborcus_0.1.0-configure.patch
673-
674-# don't use dllimport
675-liborcus_patches += liborcus_0.1.0-dllimport.patch
676-
afce9f93
AM
677-# Any -fvisibility= etc. settings are passed into liborcus' CXXFLAGS via
678-# gb_VISIBILITY_FLAGS[_CXX]:
543d891b 679-liborcus_patches += visibility.patch
543d891b
JR
680-
681-# <https://gitorious.org/orcus/orcus/merge_requests/2#
682-# f60d6eecee72349993a392a9a63ddf3383d3b8c8-
683-# f60d6eecee72349993a392a9a63ddf3383d3b8c8@2>:
684-
685-liborcus_patches += liborcus_0.7.0-configure.gcc5.patch.0
686+$(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
687
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 \
694 ))
695
696 # vim: set noet sw=4 ts=4:
543d891b
JR
697diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
698index 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();
704 }
705+
706+ // new members
707+ void simple_selector_type(const char* /*p*/, size_t /*n*/) {}
708+
709+ void simple_selector_class(const char* /*p*/, size_t /*n*/) {}
710+
711+ void simple_selector_pseudo_element(orcus::css::pseudo_element_t /*pe*/) {}
712+
713+ void simple_selector_pseudo_class(orcus::css::pseudo_class_t /*pc*/) {}
714+
715+ void simple_selector_id(const char* /*p*/, size_t /*n*/) {}
716+
717+ void end_simple_selector() {}
718+
719+ void end_selector() {}
720+
721+ void combinator(orcus::css::combinator_t /*combinator*/) {}
722+
723+ void rgb(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ ) {}
724+
725+ void rgba(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ , double /*alpha*/ ) {}
726+
727+ void hsl(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ ) {}
728+
729+ void hsla(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ , double /*alpha*/ ) {}
730+
731+ void url(const char* /*p*/, size_t /*n*/) {}
732+
733 };
734
735 }
736@@ -3183,7 +3211,7 @@ void ScHTMLQueryParser::ParseStyle(const OUString& rStrm)
737 {
738 aParser.parse();
739 }
740- catch (const orcus::css_parse_error&)
741+ catch (const orcus::css::parse_error&)
742 {
743 // TODO: Parsing of CSS failed. Do nothing for now.
744 }
745diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
746index 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);
751
752 virtual void set_origin_date(int year, int month, int day) SAL_OVERRIDE;
753+
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;
756 };
757
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;
761
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;
765
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;
769
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;
775
776+ // dxf
777+ virtual void set_dxf_count(size_t count) SAL_OVERRIDE;
778+ virtual size_t commit_dxf() SAL_OVERRIDE;
779+
780 // xf (cell format) - used both by cell xf and cell style xf.
781
782 virtual void set_xf_number_format(size_t index) SAL_OVERRIDE;
783diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
784index 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);
789 }
790
791+void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t /*grammar*/)
792+{
793+}
794+
795+orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
796+{
797+ return orcus::spreadsheet::formula_grammar_unknown;
798+}
799+
800 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
801 maPos(rPos), mnIndex(nIndex) {}
802
803@@ -263,6 +272,11 @@ void ScOrcusSheet::set_format(os::row_t /*row*/, os::col_t /*col*/, size_t /*xf_
804 {
805 }
806
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*/)
809+{
810+}
811+
812 namespace {
813
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;
817 switch(grammar)
818 {
819- case orcus::spreadsheet::ods:
820+ case orcus::spreadsheet::formula_grammar_ods:
821 eGrammar = formula::FormulaGrammar::GRAM_ODFF;
822 break;
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;
828 break;
829- case orcus::spreadsheet::gnumeric:
830+ case orcus::spreadsheet::formula_grammar_gnumeric:
831 eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
832 break;
833+ case orcus::spreadsheet::formula_grammar_unknown:
834+ break;
835 }
836
837 return eGrammar;
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));
840 }
841
842+void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, double /*val*/)
843+{
844+ ScFormulaCell* pCell = mrDoc.getDoc().GetFormulaCell(ScAddress(col, row, mnTab));
845+ if (!pCell)
846+ {
847+ SAL_WARN("sc", "trying to set formula result for non formula \
848+ cell! Col: " << col << ";Row: " << row << ";Tab: " << mnTab);
849+ return;
850+ }
851+
852+ // TODO: FIXME
853+}
854+
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()
859 return 0;
860 }
861
862+// dxf
863+
864+void ScOrcusStyles::set_dxf_count(size_t /*n*/)
865+{
866+}
867+
868+size_t ScOrcusStyles::commit_dxf()
869+{
870+ return 0;
871+}
872+
873 // xf (cell format) - used both by cell xf and cell style xf.
874
875 void ScOrcusStyles::set_xf_number_format(size_t /*index*/)
876--
8771.7.9.5
878
This page took 0.204906 seconds and 4 git commands to generate.