From d3690a72da8abdd8994e2be855d327d8bdcabffb Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 8 Mar 2016 16:10:16 +0100 Subject: [PATCH] new upstream release 0.11.0 --- .gitignore | 1 + ...Fix-for-OSX-build-inside-LibreOffice.patch | 770 ++++++++++++++++++ ...-of-boost-in-orcus-spreadsheet-model.patch | 395 --------- ...w-requires-ixion-master-branch-build.patch | 159 ---- LICENSE | 4 + liborcus.spec | 43 +- sources | 2 +- 7 files changed, 791 insertions(+), 583 deletions(-) create mode 100644 0001-Fix-for-OSX-build-inside-LibreOffice.patch delete mode 100644 0001-Remove-use-of-boost-in-orcus-spreadsheet-model.patch delete mode 100644 0001-master-now-requires-ixion-master-branch-build.patch create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore index ce18367..87781c7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /liborcus-0.7.0.tar.bz2 /liborcus-0.7.1.tar.xz /liborcus-0.9.2.tar.xz +/liborcus-0.11.0.tar.xz diff --git a/0001-Fix-for-OSX-build-inside-LibreOffice.patch b/0001-Fix-for-OSX-build-inside-LibreOffice.patch new file mode 100644 index 0000000..beb8fb8 --- /dev/null +++ b/0001-Fix-for-OSX-build-inside-LibreOffice.patch @@ -0,0 +1,770 @@ +From a1df2d984d527931c6cbbe6547856283bdbf6a9b Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida +Date: Sun, 6 Mar 2016 21:21:31 -0500 +Subject: [PATCH] Fix for OSX build inside LibreOffice. + +--- + include/orcus/sax_ns_parser.hpp | 2 +- + slickedit/orcus.vpj | 178 ++++--------------------------- + src/liborcus/dom_tree.cpp | 12 +-- + src/liborcus/json_document_tree.cpp | 29 +++-- + src/liborcus/json_document_tree_test.cpp | 2 +- + src/liborcus/ods_content_xml_context.cpp | 2 +- + src/liborcus/opc_reader.cpp | 2 +- + src/liborcus/orcus_gnumeric.cpp | 2 +- + src/liborcus/orcus_import_ods.cpp | 2 +- + src/liborcus/orcus_import_xlsx.cpp | 2 +- + src/liborcus/orcus_xls_xml.cpp | 2 +- + src/liborcus/orcus_xlsx.cpp | 20 ++-- + src/liborcus/orcus_xml.cpp | 4 +- + src/liborcus/xlsx_sheet_context.cpp | 8 +- + src/liborcus/xml_map_tree.cpp | 6 +- + src/liborcus/xml_structure_tree.cpp | 4 +- + src/liborcus/yaml_document_tree.cpp | 34 +++--- + src/mso/encryption_info.cpp | 3 +- + src/orcus_filter_global.cpp | 2 +- + src/orcus_json_main.cpp | 2 +- + src/orcus_yaml_main.cpp | 2 +- + src/parser/json_parser_base.cpp | 2 +- + src/parser/sax_parser_base.cpp | 2 +- + src/parser/string_pool.cpp | 4 +- + src/parser/yaml_parser_base.cpp | 2 +- + src/spreadsheet/document.cpp | 2 +- + 26 files changed, 95 insertions(+), 237 deletions(-) + +diff --git a/include/orcus/sax_ns_parser.hpp b/include/orcus/sax_ns_parser.hpp +index 680f39d..49a2b48 100644 +--- a/include/orcus/sax_ns_parser.hpp ++++ b/include/orcus/sax_ns_parser.hpp +@@ -142,7 +142,7 @@ private: + + void start_element(const sax::parser_element& elem) + { +- m_scopes.push_back(make_unique<__sax::elem_scope>()); ++ m_scopes.push_back(orcus::make_unique<__sax::elem_scope>()); + __sax::elem_scope& scope = *m_scopes.back(); + scope.ns = m_ns_cxt.get(elem.ns); + scope.name = elem.name; +diff --git a/src/liborcus/dom_tree.cpp b/src/liborcus/dom_tree.cpp +index 255a7d7..1b4588b 100644 +--- a/src/liborcus/dom_tree.cpp ++++ b/src/liborcus/dom_tree.cpp +@@ -177,7 +177,7 @@ void dom_tree::content::print(ostream& os, const xmlns_context& /*cxt*/) const + dom_tree::content::~content() {} + + dom_tree::dom_tree(xmlns_context& cxt) : +- mp_impl(make_unique(cxt)) {} ++ mp_impl(orcus::make_unique(cxt)) {} + + dom_tree::~dom_tree() {} + +@@ -242,7 +242,7 @@ void dom_tree::start_element(xmlns_id_t ns, const pstring& name) + + // Append new element as a child element of the current element. + p = mp_impl->m_elem_stack.back(); +- p->child_nodes.push_back(make_unique(ns, name_safe)); ++ p->child_nodes.push_back(orcus::make_unique(ns, name_safe)); + p = static_cast(p->child_nodes.back().get()); + p->attrs.swap(mp_impl->m_cur_attrs); + mp_impl->m_elem_stack.push_back(p); +@@ -269,7 +269,7 @@ void dom_tree::set_characters(const pstring& val) + + element* p = mp_impl->m_elem_stack.back(); + val2 = mp_impl->m_pool.intern(val2).first; // Make sure the string is persistent. +- p->child_nodes.push_back(make_unique(val2)); ++ p->child_nodes.push_back(orcus::make_unique(val2)); + } + + void dom_tree::set_attribute(xmlns_id_t ns, const pstring& name, const pstring& val) +@@ -283,7 +283,7 @@ void dom_tree::set_attribute(xmlns_id_t ns, const pstring& name, const pstring& + + void dom_tree::set_doctype(const sax::doctype_declaration& dtd) + { +- mp_impl->m_doctype = make_unique(dtd); // make a copy. ++ mp_impl->m_doctype = orcus::make_unique(dtd); // make a copy. + + sax::doctype_declaration& this_dtd = *mp_impl->m_doctype; + string_pool& pool = mp_impl->m_pool; +@@ -360,7 +360,7 @@ void dom_tree::dump_compact(ostream& os) const + + scopes_type scopes; + +- scopes.push_back(make_unique(string(), mp_impl->m_root)); ++ scopes.push_back(orcus::make_unique(string(), mp_impl->m_root)); + while (!scopes.empty()) + { + bool new_scope = false; +@@ -418,7 +418,7 @@ void dom_tree::dump_compact(ostream& os) const + ++cur_scope.current_pos; + ostringstream elem_name; + elem->print(elem_name, mp_impl->m_ns_cxt); +- scopes.push_back(make_unique(elem_name.str())); ++ scopes.push_back(orcus::make_unique(elem_name.str())); + scope& child_scope = *scopes.back(); + child_scope.nodes.swap(nodes); + child_scope.current_pos = child_scope.nodes.begin(); +diff --git a/src/liborcus/json_document_tree.cpp b/src/liborcus/json_document_tree.cpp +index adafcbf..81289e1 100644 +--- a/src/liborcus/json_document_tree.cpp ++++ b/src/liborcus/json_document_tree.cpp +@@ -55,7 +55,6 @@ using node_t = json::detail::node_t; + + const char* tab = " "; + constexpr char quote = '"'; +-constexpr char backslash = '\\'; + + const xmlns_id_t NS_orcus_json_xml = "http://schemas.kohei.us/orcus/2015/json"; + +@@ -455,13 +454,13 @@ public: + { + if (m_root) + { +- json_value* jv = push_value(make_unique()); ++ json_value* jv = push_value(orcus::make_unique()); + assert(jv && jv->type == node_t::array); + m_stack.push_back(parser_stack(jv)); + } + else + { +- m_root = make_unique(); ++ m_root = orcus::make_unique(); + m_stack.push_back(parser_stack(m_root.get())); + } + } +@@ -476,13 +475,13 @@ public: + { + if (m_root) + { +- json_value* jv = push_value(make_unique()); ++ json_value* jv = push_value(orcus::make_unique()); + assert(jv && jv->type == node_t::object); + m_stack.push_back(parser_stack(jv)); + } + else + { +- m_root = make_unique(); ++ m_root = orcus::make_unique(); + m_stack.push_back(parser_stack(m_root.get())); + } + } +@@ -504,17 +503,17 @@ public: + + void boolean_true() + { +- push_value(make_unique(node_t::boolean_true)); ++ push_value(orcus::make_unique(node_t::boolean_true)); + } + + void boolean_false() + { +- push_value(make_unique(node_t::boolean_false)); ++ push_value(orcus::make_unique(node_t::boolean_false)); + } + + void null() + { +- push_value(make_unique(node_t::null)); ++ push_value(orcus::make_unique(node_t::null)); + } + + void string(const char* p, size_t len, bool transient) +@@ -524,12 +523,12 @@ public: + // The tree manages the life cycle of this string value. + s = m_pool.intern(s).first; + +- push_value(make_unique(s)); ++ push_value(orcus::make_unique(s)); + } + + void number(double val) + { +- push_value(make_unique(val)); ++ push_value(orcus::make_unique(val)); + } + + void swap(std::unique_ptr& other_root) +@@ -554,8 +553,8 @@ struct node::impl + impl(const json_value* jv) : m_node(jv) {} + }; + +-node::node(const json_value* jv) : mp_impl(make_unique(jv)) {} +-node::node(const node& other) : mp_impl(make_unique(other.mp_impl->m_node)) {} ++node::node(const json_value* jv) : mp_impl(orcus::make_unique(jv)) {} ++node::node(const node& other) : mp_impl(orcus::make_unique(other.mp_impl->m_node)) {} + node::node(node&& rhs) : mp_impl(std::move(rhs.mp_impl)) {} + node::~node() {} + +@@ -720,12 +719,12 @@ struct json_document_tree::impl + std::unique_ptr m_own_pool; + string_pool& m_pool; + +- impl() : m_own_pool(make_unique()), m_pool(*m_own_pool) {} ++ impl() : m_own_pool(orcus::make_unique()), m_pool(*m_own_pool) {} + impl(string_pool& pool) : m_pool(pool) {} + }; + +-json_document_tree::json_document_tree() : mp_impl(make_unique()) {} +-json_document_tree::json_document_tree(string_pool& pool) : mp_impl(make_unique(pool)) {} ++json_document_tree::json_document_tree() : mp_impl(orcus::make_unique()) {} ++json_document_tree::json_document_tree(string_pool& pool) : mp_impl(orcus::make_unique(pool)) {} + json_document_tree::~json_document_tree() {} + + void json_document_tree::load(const std::string& strm, const json_config& config) +diff --git a/src/liborcus/json_document_tree_test.cpp b/src/liborcus/json_document_tree_test.cpp +index da16150..4b4fcbd 100644 +--- a/src/liborcus/json_document_tree_test.cpp ++++ b/src/liborcus/json_document_tree_test.cpp +@@ -193,7 +193,7 @@ std::unique_ptr get_doc_tree(const char* filepath) + cout << "--- original" << endl; + cout << strm << endl; + +- auto doc = make_unique(); ++ auto doc = orcus::make_unique(); + doc->load(strm, test_config); + + return doc; +diff --git a/src/liborcus/ods_content_xml_context.cpp b/src/liborcus/ods_content_xml_context.cpp +index f496353..c4e706d 100644 +--- a/src/liborcus/ods_content_xml_context.cpp ++++ b/src/liborcus/ods_content_xml_context.cpp +@@ -588,7 +588,7 @@ void ods_content_xml_context::push_cell_value() + ods_session_data& ods_data = + static_cast(*get_session_context().mp_data); + ods_data.m_formulas.push_back( +- make_unique( ++ orcus::make_unique( + m_tables.size()-1, m_row, m_col, m_cell_attr.formula_grammar, m_cell_attr.formula)); + + ods_session_data::formula& formula_data = *ods_data.m_formulas.back(); +diff --git a/src/liborcus/opc_reader.cpp b/src/liborcus/opc_reader.cpp +index 814b2cf..666530e 100644 +--- a/src/liborcus/opc_reader.cpp ++++ b/src/liborcus/opc_reader.cpp +@@ -244,7 +244,7 @@ void opc_reader::read_content_types() + m_config, m_ns_repo, opc_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new opc_content_types_context(m_session_cxt, opc_tokens)); + + parser.set_handler(handler.get()); +diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp +index 1873c0e..c29bef9 100644 +--- a/src/liborcus/orcus_gnumeric.cpp ++++ b/src/liborcus/orcus_gnumeric.cpp +@@ -82,7 +82,7 @@ void orcus_gnumeric::read_content_xml(const char* p, size_t size) + { + xml_stream_parser parser(get_config(), mp_impl->m_ns_repo, gnumeric_tokens, p, size); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + mp_impl->m_cxt, gnumeric_tokens, mp_impl->mp_factory); + + parser.set_handler(handler.get()); +diff --git a/src/liborcus/orcus_import_ods.cpp b/src/liborcus/orcus_import_ods.cpp +index af1135e..2d76dbb 100644 +--- a/src/liborcus/orcus_import_ods.cpp ++++ b/src/liborcus/orcus_import_ods.cpp +@@ -32,7 +32,7 @@ void import_ods::read_styles(const char* p, size_t n, spreadsheet::iface::import + + session_context cxt; + odf_styles_map_type styles_map; +- auto context = make_unique(cxt, odf_tokens, styles_map, styles); ++ auto context = orcus::make_unique(cxt, odf_tokens, styles_map, styles); + + xml_simple_stream_handler stream_handler(context.release()); + +diff --git a/src/liborcus/orcus_import_xlsx.cpp b/src/liborcus/orcus_import_xlsx.cpp +index 2f9f172..0d4a933 100644 +--- a/src/liborcus/orcus_import_xlsx.cpp ++++ b/src/liborcus/orcus_import_xlsx.cpp +@@ -33,7 +33,7 @@ void import_xlsx::read_table(const char* p, size_t n, spreadsheet::iface::import + return; + + session_context cxt; +- auto handler = make_unique(cxt, ooxml_tokens, *table); ++ auto handler = orcus::make_unique(cxt, ooxml_tokens, *table); + + xmlns_repository ns_repo; + ns_repo.add_predefined_values(NS_ooxml_all); +diff --git a/src/liborcus/orcus_xls_xml.cpp b/src/liborcus/orcus_xls_xml.cpp +index 2849219..22ffeab 100644 +--- a/src/liborcus/orcus_xls_xml.cpp ++++ b/src/liborcus/orcus_xls_xml.cpp +@@ -92,7 +92,7 @@ void orcus_xls_xml::read_stream(const char* content, size_t len) + xml_stream_parser parser( + get_config(), mp_impl->m_ns_repo, xls_xml_tokens, content, len); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + mp_impl->m_cxt, xls_xml_tokens, mp_impl->mp_factory); + + parser.set_handler(handler.get()); +diff --git a/src/liborcus/orcus_xlsx.cpp b/src/liborcus/orcus_xlsx.cpp +index 8c578e6..7c1e46c 100644 +--- a/src/liborcus/orcus_xlsx.cpp ++++ b/src/liborcus/orcus_xlsx.cpp +@@ -286,7 +286,7 @@ void orcus_xlsx::read_workbook(const string& dir_path, const string& file_name) + if (buffer.empty()) + return; + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new xlsx_workbook_context(mp_impl->m_cxt, ooxml_tokens)); + + xml_stream_parser parser( +@@ -341,7 +341,7 @@ void orcus_xlsx::read_sheet(const string& dir_path, const string& file_name, xls + get_config(), mp_impl->m_ns_repo, ooxml_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + mp_impl->m_cxt, ooxml_tokens, data->id-1, sheet); + + parser.set_handler(handler.get()); +@@ -373,7 +373,7 @@ void orcus_xlsx::read_shared_strings(const string& dir_path, const string& file_ + get_config(), mp_impl->m_ns_repo, ooxml_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new xlsx_shared_strings_context( + mp_impl->m_cxt, ooxml_tokens, mp_impl->mp_factory->get_shared_strings())); + +@@ -406,7 +406,7 @@ void orcus_xlsx::read_styles(const string& dir_path, const string& file_name) + get_config(), mp_impl->m_ns_repo, ooxml_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new xlsx_styles_context( + mp_impl->m_cxt, ooxml_tokens, mp_impl->mp_factory->get_styles())); + +@@ -441,7 +441,7 @@ void orcus_xlsx::read_table(const std::string& dir_path, const std::string& file + if (buffer.empty()) + return; + +- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens, *table); ++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens, *table); + + xml_stream_parser parser( + get_config(), mp_impl->m_ns_repo, ooxml_tokens, +@@ -471,7 +471,7 @@ void orcus_xlsx::read_pivot_cache_def(const std::string& dir_path, const std::st + if (buffer.empty()) + return; + +- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); ++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); + + xml_stream_parser parser( + get_config(), mp_impl->m_ns_repo, ooxml_tokens, +@@ -502,7 +502,7 @@ void orcus_xlsx::read_pivot_cache_rec(const std::string& dir_path, const std::st + if (buffer.empty()) + return; + +- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); ++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); + + xml_stream_parser parser( + get_config(), mp_impl->m_ns_repo, ooxml_tokens, +@@ -532,7 +532,7 @@ void orcus_xlsx::read_pivot_table(const std::string& dir_path, const std::string + if (buffer.empty()) + return; + +- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); ++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); + + xml_stream_parser parser( + get_config(), mp_impl->m_ns_repo, ooxml_tokens, +@@ -567,7 +567,7 @@ void orcus_xlsx::read_rev_headers(const std::string& dir_path, const std::string + get_config(), mp_impl->m_ns_repo, ooxml_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new xlsx_revheaders_context(mp_impl->m_cxt, ooxml_tokens)); + + parser.set_handler(handler.get()); +@@ -600,7 +600,7 @@ void orcus_xlsx::read_rev_log(const std::string& dir_path, const std::string& fi + get_config(), mp_impl->m_ns_repo, ooxml_tokens, + reinterpret_cast(&buffer[0]), buffer.size()); + +- auto handler = make_unique( ++ auto handler = orcus::make_unique( + new xlsx_revlog_context(mp_impl->m_cxt, ooxml_tokens)); + + parser.set_handler(handler.get()); +diff --git a/src/liborcus/orcus_xml.cpp b/src/liborcus/orcus_xml.cpp +index 2cb7fa3..f97c4f9 100644 +--- a/src/liborcus/orcus_xml.cpp ++++ b/src/liborcus/orcus_xml.cpp +@@ -343,7 +343,7 @@ void write_range_reference_group( + scopes_type scopes; + for (spreadsheet::row_t current_row = 0; current_row < ref.row_size; ++current_row) + { +- scopes.push_back(make_unique(root)); // root element ++ scopes.push_back(orcus::make_unique(root)); // root element + + while (!scopes.empty()) + { +@@ -378,7 +378,7 @@ void write_range_reference_group( + // This is a non-leaf element. Push a new scope with this + // element and re-start the loop. + ++cur_scope.current_child_pos; +- scopes.push_back(make_unique(child_elem)); ++ scopes.push_back(orcus::make_unique(child_elem)); + new_scope = true; + break; + } +diff --git a/src/liborcus/xlsx_sheet_context.cpp b/src/liborcus/xlsx_sheet_context.cpp +index f350049..720319a 100644 +--- a/src/liborcus/xlsx_sheet_context.cpp ++++ b/src/liborcus/xlsx_sheet_context.cpp +@@ -547,7 +547,7 @@ void xlsx_sheet_context::end_element_cell() + { + // shared formula expression + session_data.m_shared_formulas.push_back( +- make_unique( ++ orcus::make_unique( + m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.shared_id, + m_cur_formula.str.str(), m_cur_formula.ref.str())); + } +@@ -555,14 +555,14 @@ void xlsx_sheet_context::end_element_cell() + { + // array formula expression + session_data.m_formulas.push_back( +- make_unique( ++ orcus::make_unique( + m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.str.str(), m_cur_formula.ref.str())); + } + else + { + // normal (non-shared) formula expression + session_data.m_formulas.push_back( +- make_unique( ++ orcus::make_unique( + m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.str.str())); + } + } +@@ -570,7 +570,7 @@ void xlsx_sheet_context::end_element_cell() + { + // shared formula without formula expression + session_data.m_shared_formulas.push_back( +- make_unique( ++ orcus::make_unique( + m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.shared_id)); + } + else if (m_cur_formula.type == spreadsheet::formula_t::data_table) +diff --git a/src/liborcus/xml_map_tree.cpp b/src/liborcus/xml_map_tree.cpp +index 132ccb9..69fbc75 100644 +--- a/src/liborcus/xml_map_tree.cpp ++++ b/src/liborcus/xml_map_tree.cpp +@@ -666,7 +666,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( + { + // Insert a new element of this name. + children.push_back( +- make_unique( ++ orcus::make_unique( + token.ns, m_names.intern(token.name.get(), token.name.size()).first, + element_unlinked, reference_unknown)); + cur_element = children.back().get(); +@@ -695,7 +695,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( + throw xpath_error("This attribute is already linked. You can't link the same attribute twice."); + + attrs.push_back( +- make_unique( ++ orcus::make_unique( + token.ns, m_names.intern(token.name.get(), token.name.size()).first, ref_type)); + + ret = attrs.back().get(); +@@ -710,7 +710,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( + { + // No element of that name exists. + children.push_back( +- make_unique( ++ orcus::make_unique( + token.ns, m_names.intern(token.name.get(), token.name.size()).first, + element_linked, ref_type)); + +diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp +index f2d62bd..3a08c64 100644 +--- a/src/liborcus/xml_structure_tree.cpp ++++ b/src/liborcus/xml_structure_tree.cpp +@@ -451,7 +451,7 @@ void xml_structure_tree::dump_compact(ostream& os) const + cxt.dump(os); + + element_ref ref(mp_impl->mp_root->name, &mp_impl->mp_root->prop); +- scopes.push_back(make_unique(entity_name(), false, ref)); ++ scopes.push_back(orcus::make_unique(entity_name(), false, ref)); + while (!scopes.empty()) + { + bool new_scope = false; +@@ -505,7 +505,7 @@ void xml_structure_tree::dump_compact(ostream& os) const + + // Push a new scope, and restart the loop with the new scope. + ++cur_scope.current_pos; +- scopes.push_back(make_unique(this_elem.name, this_elem.prop->repeat)); ++ scopes.push_back(orcus::make_unique(this_elem.name, this_elem.prop->repeat)); + scope& child_scope = *scopes.back(); + child_scope.elements.swap(elems); + child_scope.current_pos = child_scope.elements.begin(); +diff --git a/src/liborcus/yaml_document_tree.cpp b/src/liborcus/yaml_document_tree.cpp +index b7cc4bc..5aad4f2 100644 +--- a/src/liborcus/yaml_document_tree.cpp ++++ b/src/liborcus/yaml_document_tree.cpp +@@ -254,13 +254,13 @@ public: + + if (m_root) + { +- yaml_value* yv = push_value(make_unique()); ++ yaml_value* yv = push_value(orcus::make_unique()); + assert(yv && yv->type == node_t::sequence); + m_stack.push_back(parser_stack(yv)); + } + else + { +- m_root = make_unique(); ++ m_root = orcus::make_unique(); + m_stack.push_back(parser_stack(m_root.get())); + } + } +@@ -276,13 +276,13 @@ public: + assert(m_in_document); + if (m_root) + { +- yaml_value* yv = push_value(make_unique()); ++ yaml_value* yv = push_value(orcus::make_unique()); + assert(yv && yv->type == node_t::map); + m_stack.push_back(parser_stack(yv)); + } + else + { +- m_root = make_unique(); ++ m_root = orcus::make_unique(); + m_stack.push_back(parser_stack(m_root.get())); + } + } +@@ -319,11 +319,11 @@ public: + + if (m_root) + { +- yaml_value* yv = push_value(make_unique(p, n)); ++ yaml_value* yv = push_value(orcus::make_unique(p, n)); + assert(yv && yv->type == node_t::string); + } + else +- m_root = make_unique(p, n); ++ m_root = orcus::make_unique(p, n); + } + + void number(double val) +@@ -331,11 +331,11 @@ public: + assert(m_in_document); + if (m_root) + { +- yaml_value* yv = push_value(make_unique(val)); ++ yaml_value* yv = push_value(orcus::make_unique(val)); + assert(yv && yv->type == node_t::number); + } + else +- m_root = make_unique(val); ++ m_root = orcus::make_unique(val); + } + + void boolean_true() +@@ -343,11 +343,11 @@ public: + assert(m_in_document); + if (m_root) + { +- yaml_value* yv = push_value(make_unique(node_t::boolean_true)); ++ yaml_value* yv = push_value(orcus::make_unique(node_t::boolean_true)); + assert(yv && yv->type == node_t::boolean_true); + } + else +- m_root = make_unique(node_t::boolean_true); ++ m_root = orcus::make_unique(node_t::boolean_true); + } + + void boolean_false() +@@ -355,11 +355,11 @@ public: + assert(m_in_document); + if (m_root) + { +- yaml_value* yv = push_value(make_unique(node_t::boolean_false)); ++ yaml_value* yv = push_value(orcus::make_unique(node_t::boolean_false)); + assert(yv && yv->type == node_t::boolean_false); + } + else +- m_root = make_unique(node_t::boolean_false); ++ m_root = orcus::make_unique(node_t::boolean_false); + } + + void null() +@@ -367,11 +367,11 @@ public: + assert(m_in_document); + if (m_root) + { +- yaml_value* yv = push_value(make_unique(node_t::null)); ++ yaml_value* yv = push_value(orcus::make_unique(node_t::null)); + assert(yv && yv->type == node_t::null); + } + else +- m_root = make_unique(node_t::null); ++ m_root = orcus::make_unique(node_t::null); + } + + void swap(std::vector& docs) +@@ -396,8 +396,8 @@ struct node::impl + impl(const yaml_value* yv) : m_node(yv) {} + }; + +-node::node(const yaml_value* yv) : mp_impl(make_unique(yv)) {} +-node::node(const node& other) : mp_impl(make_unique(other.mp_impl->m_node)) {} ++node::node(const yaml_value* yv) : mp_impl(orcus::make_unique(yv)) {} ++node::node(const node& other) : mp_impl(orcus::make_unique(other.mp_impl->m_node)) {} + node::node(node&& rhs) : mp_impl(std::move(rhs.mp_impl)) {} + node::~node() {} + +@@ -548,7 +548,7 @@ double node::numeric_value() const + + }} + +-yaml_document_tree::yaml_document_tree() : mp_impl(make_unique()) {} ++yaml_document_tree::yaml_document_tree() : mp_impl(orcus::make_unique()) {} + yaml_document_tree::~yaml_document_tree() {} + + void yaml_document_tree::load(const std::string& strm) +diff --git a/src/mso/encryption_info.cpp b/src/mso/encryption_info.cpp +index 1d428fc..e9bc3ad 100644 +--- a/src/mso/encryption_info.cpp ++++ b/src/mso/encryption_info.cpp +@@ -143,11 +143,10 @@ public: + + class sax_handler + { +- xmlns_context& m_ns_cxt; + vector m_attrs; + + public: +- sax_handler(xmlns_context& ns_cxt) : m_ns_cxt(ns_cxt) {} ++ sax_handler(xmlns_context& /*ns_cxt*/) {} + void doctype(const sax::doctype_declaration&) {} + void start_declaration(const pstring&) {} + void end_declaration(const pstring&) {} +diff --git a/src/orcus_filter_global.cpp b/src/orcus_filter_global.cpp +index 09c2ab6..df50496 100644 +--- a/src/orcus_filter_global.cpp ++++ b/src/orcus_filter_global.cpp +@@ -239,7 +239,7 @@ std::unique_ptr parse_json_args(int argc, char** argv) + return nullptr; + } + +- std::unique_ptr config = make_unique(); ++ std::unique_ptr config = orcus::make_unique(); + + if (vm.count("input")) + config->input_path = vm["input"].as(); +diff --git a/src/orcus_json_main.cpp b/src/orcus_json_main.cpp +index edca63a..6a739b2 100644 +--- a/src/orcus_json_main.cpp ++++ b/src/orcus_json_main.cpp +@@ -25,7 +25,7 @@ using namespace orcus; + + std::unique_ptr load_doc(const std::string& strm, const json_config& config) + { +- std::unique_ptr doc(make_unique()); ++ std::unique_ptr doc(orcus::make_unique()); + try + { + doc->load(strm, config); +diff --git a/src/orcus_yaml_main.cpp b/src/orcus_yaml_main.cpp +index 3d15742..c028f64 100644 +--- a/src/orcus_yaml_main.cpp ++++ b/src/orcus_yaml_main.cpp +@@ -76,7 +76,7 @@ std::unique_ptr parse_yaml_args(int argc, char** argv) + return nullptr; + } + +- std::unique_ptr config = make_unique(); ++ std::unique_ptr config = orcus::make_unique(); + + if (vm.count("input")) + config->input_path = vm["input"].as(); +diff --git a/src/parser/json_parser_base.cpp b/src/parser/json_parser_base.cpp +index 50e3f36..eff27b7 100644 +--- a/src/parser/json_parser_base.cpp ++++ b/src/parser/json_parser_base.cpp +@@ -35,7 +35,7 @@ struct parser_base::impl + }; + + parser_base::parser_base(const char* p, size_t n) : +- ::orcus::parser_base(p, n), mp_impl(make_unique()) {} ++ ::orcus::parser_base(p, n), mp_impl(orcus::make_unique()) {} + + parser_base::~parser_base() {} + +diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp +index 51d56a4..3cd4f25 100644 +--- a/src/parser/sax_parser_base.cpp ++++ b/src/parser/sax_parser_base.cpp +@@ -57,7 +57,7 @@ struct parser_base::impl + + parser_base::parser_base(const char* content, size_t size) : + ::orcus::parser_base(content, size), +- mp_impl(make_unique()), ++ mp_impl(orcus::make_unique()), + m_nest_level(0), + m_buffer_pos(0), + m_root_elem_open(true) +diff --git a/src/parser/string_pool.cpp b/src/parser/string_pool.cpp +index 83c0501..baba88a 100644 +--- a/src/parser/string_pool.cpp ++++ b/src/parser/string_pool.cpp +@@ -61,7 +61,7 @@ struct string_pool::impl + string_store_type m_store; + }; + +-string_pool::string_pool() : mp_impl(make_unique()) {} ++string_pool::string_pool() : mp_impl(orcus::make_unique()) {} + + string_pool::~string_pool() + { +@@ -82,7 +82,7 @@ pair string_pool::intern(const char* str, size_t n) + if (itr == mp_impl->m_set.end()) + { + // This string has not been interned. Intern it. +- mp_impl->m_store.push_back(make_unique(str, n)); ++ mp_impl->m_store.push_back(orcus::make_unique(str, n)); + pair r = mp_impl->m_set.insert(pstring(mp_impl->m_store.back()->data(), n)); + if (!r.second) + throw general_error("failed to intern a new string instance."); +diff --git a/src/parser/yaml_parser_base.cpp b/src/parser/yaml_parser_base.cpp +index 656dfdc..3c93266 100644 +--- a/src/parser/yaml_parser_base.cpp ++++ b/src/parser/yaml_parser_base.cpp +@@ -59,7 +59,7 @@ const size_t parser_base::parse_indent_end_of_stream = std::numeric_limits::max() - 2; + + parser_base::parser_base(const char* p, size_t n) : +- ::orcus::parser_base(p, n), mp_impl(make_unique()) {} ++ ::orcus::parser_base(p, n), mp_impl(orcus::make_unique()) {} + + parser_base::~parser_base() {} + +diff --git a/src/spreadsheet/document.cpp b/src/spreadsheet/document.cpp +index a80646c..17cc113 100644 +--- a/src/spreadsheet/document.cpp ++++ b/src/spreadsheet/document.cpp +@@ -448,7 +448,7 @@ sheet* document::append_sheet(const pstring& sheet_name, row_t row_size, col_t c + sheet_t sheet_index = static_cast(mp_impl->m_sheets.size()); + + mp_impl->m_sheets.push_back( +- make_unique( ++ orcus::make_unique( + *this, sheet_name_safe, sheet_index, row_size, col_size)); + + mp_impl->m_context.append_sheet( +-- +2.5.0 + diff --git a/0001-Remove-use-of-boost-in-orcus-spreadsheet-model.patch b/0001-Remove-use-of-boost-in-orcus-spreadsheet-model.patch deleted file mode 100644 index ba9a330..0000000 --- a/0001-Remove-use-of-boost-in-orcus-spreadsheet-model.patch +++ /dev/null @@ -1,395 +0,0 @@ -From 1f12d182ca0fa4f3f0fd017cce551d8fdc30a1a2 Mon Sep 17 00:00:00 2001 -From: Kohei Yoshida -Date: Sat, 20 Jun 2015 14:46:56 -0400 -Subject: [PATCH] Remove use of boost in orcus-spreadsheet-model. - ---- - src/spreadsheet/document.cpp | 100 +++++++++++++++++++++++-------------------- - src/spreadsheet/sheet.cpp | 18 ++++---- - src/spreadsheet/table.cpp | 6 ++- - 3 files changed, 68 insertions(+), 56 deletions(-) - -diff --git a/src/spreadsheet/document.cpp b/src/spreadsheet/document.cpp -index c33a30e..02850ce 100644 ---- a/src/spreadsheet/document.cpp -+++ b/src/spreadsheet/document.cpp -@@ -16,6 +16,7 @@ - #include "orcus/pstring.hpp" - #include "orcus/types.hpp" - #include "orcus/string_pool.hpp" -+#include "orcus/global.hpp" - - #include - #include -@@ -26,9 +27,7 @@ - - #include - #include --#include --#include --#include -+#include - - using namespace std; - -@@ -41,47 +40,50 @@ namespace { - * Use the printer function object to print sheet content with for_each - * function. - */ --struct sheet_item : private boost::noncopyable -+struct sheet_item - { -+ sheet_item(const sheet_item&) = delete; -+ sheet_item& operator=(const sheet_item&) = delete; -+ - pstring name; - sheet data; - sheet_item(document& doc, const pstring& _name, sheet_t sheet_index, row_t row_size, col_t col_size); - -- class flat_printer : public ::std::unary_function -+ class flat_printer : public ::std::unary_function, void> - { - const std::string& m_outdir; - public: - flat_printer(const std::string& outdir); -- void operator() (const sheet_item& item) const; -+ void operator() (const std::unique_ptr& item) const; - }; - -- class check_printer : public std::unary_function -+ class check_printer : public std::unary_function, void> - { - std::ostream& m_os; - public: - check_printer(std::ostream& os); -- void operator() (const sheet_item& item) const; -+ void operator() (const std::unique_ptr& item) const; - }; - -- struct html_printer : public ::std::unary_function -+ struct html_printer : public ::std::unary_function, void> - { - html_printer(const ::std::string& filepath); -- void operator() (const sheet_item& item) const; -+ void operator() (const std::unique_ptr& item) const; - private: - const ::std::string& m_filepath; - }; - }; - --typedef boost::ptr_map table_store_type; -+typedef std::map> table_store_type; - - sheet_item::sheet_item(document& doc, const pstring& _name, sheet_t sheet_index, row_t row_size, col_t col_size) : - name(_name), data(doc, sheet_index, row_size, col_size) {} - - sheet_item::flat_printer::flat_printer(const string& outdir) : m_outdir(outdir) {} - --void sheet_item::flat_printer::operator() (const sheet_item& item) const -+void sheet_item::flat_printer::operator() (const std::unique_ptr& item) const - { -- string this_file = m_outdir + '/' + item.name.str() + ".txt"; -+ string this_file = m_outdir + '/' + item->name.str() + ".txt"; - - ofstream file(this_file.c_str()); - if (!file) -@@ -91,35 +93,35 @@ void sheet_item::flat_printer::operator() (const sheet_item& item) const - } - - file << "---" << endl; -- file << "Sheet name: " << item.name << endl; -- item.data.dump_flat(file); -+ file << "Sheet name: " << item->name << endl; -+ item->data.dump_flat(file); - } - - sheet_item::check_printer::check_printer(std::ostream& os) : m_os(os) {} - --void sheet_item::check_printer::operator() (const sheet_item& item) const -+void sheet_item::check_printer::operator() (const std::unique_ptr& item) const - { -- item.data.dump_check(m_os, item.name); -+ item->data.dump_check(m_os, item->name); - } - - sheet_item::html_printer::html_printer(const string& filepath) : - m_filepath(filepath) {} - --void sheet_item::html_printer::operator() (const sheet_item& item) const -+void sheet_item::html_printer::operator() (const std::unique_ptr& item) const - { - // file path is expected to be a directory. -- string this_file = m_filepath + '/' + item.name.str() + ".html"; -- item.data.dump_html(this_file); -+ string this_file = m_filepath + '/' + item->name.str() + ".html"; -+ item->data.dump_html(this_file); - } - --class find_sheet_by_name : std::unary_function -+class find_sheet_by_name : std::unary_function , bool> - { - const pstring& m_name; - public: - find_sheet_by_name(const pstring& name) : m_name(name) {} -- bool operator() (const sheet_item & v) const -+ bool operator() (const std::unique_ptr& v) const - { -- return v.name == m_name; -+ return v->name == m_name; - } - }; - -@@ -208,10 +210,10 @@ class table_handler : public ixion::iface::table_handler - - const table_t* find_table(const ixion::abs_address_t& pos) const - { -- table_store_type::const_iterator it = m_tables.begin(), it_end = m_tables.end(); -+ auto it = m_tables.begin(), it_end = m_tables.end(); - for (; it != it_end; ++it) - { -- const table_t* p = it->second; -+ const table_t* p = it->second.get(); - if (p->range.contains(pos)) - return p; - } -@@ -310,31 +312,36 @@ public: - // no table name given. - return ixion::abs_range_t(ixion::abs_range_t::invalid); - -- table_store_type::const_iterator it = m_tables.find(tab_name); -+ auto it = m_tables.find(tab_name); - if (it == m_tables.end()) - // no table by this name found. - return ixion::abs_range_t(ixion::abs_range_t::invalid); - -- const table_t* tab = it->second; -+ const table_t* tab = it->second.get(); - return get_range_from_table(*tab, column_first, column_last, areas); - } - }; - -+typedef std::vector> sheet_items_type; -+ - } - - struct document_impl - { -+ document_impl(const document_impl&) = delete; -+ document_impl& operator=(const document_impl&) = delete; -+ - document& m_doc; - - string_pool m_string_pool; - ixion::model_context m_context; - date_time_t m_origin_date; -- boost::ptr_vector m_sheets; -+ sheet_items_type m_sheets; - import_styles* mp_styles; - import_shared_strings* mp_strings; - ixion::dirty_formula_cells_t m_dirty_cells; - -- boost::scoped_ptr mp_name_resolver; -+ std::unique_ptr mp_name_resolver; - formula_grammar_t m_grammar; - - table_store_type m_tables; -@@ -407,22 +414,23 @@ void document::insert_table(table_t* p) - return; - - pstring name = p->name; -- mp_impl->m_tables.insert(name, p); -+ mp_impl->m_tables.insert( -+ table_store_type::value_type(name, std::unique_ptr(p))); - } - - const table_t* document::get_table(const pstring& name) const - { -- table_store_type::const_iterator it = mp_impl->m_tables.find(name); -- return it == mp_impl->m_tables.end() ? NULL : it->second; -+ auto it = mp_impl->m_tables.find(name); -+ return it == mp_impl->m_tables.end() ? NULL : it->second.get(); - } - - namespace { - --struct sheet_finalizer : unary_function -+struct sheet_finalizer : std::unary_function, void> - { -- void operator() (sheet_item& sh) -+ void operator() (std::unique_ptr& sh) - { -- sh.data.finalize(); -+ sh->data.finalize(); - } - }; - -@@ -440,24 +448,24 @@ sheet* document::append_sheet(const pstring& sheet_name, row_t row_size, col_t c - sheet_t sheet_index = static_cast(mp_impl->m_sheets.size()); - - mp_impl->m_sheets.push_back( -- new sheet_item( -+ make_unique( - *this, sheet_name_safe, sheet_index, row_size, col_size)); - - mp_impl->m_context.append_sheet( - sheet_name_safe.get(), sheet_name_safe.size(), row_size, col_size); - -- return &mp_impl->m_sheets.back().data; -+ return &mp_impl->m_sheets.back()->data; - } - - sheet* document::get_sheet(const pstring& sheet_name) - { -- boost::ptr_vector::iterator it = -- std::find_if(mp_impl->m_sheets.begin(), mp_impl->m_sheets.end(), find_sheet_by_name(sheet_name)); -+ auto it = std::find_if( -+ mp_impl->m_sheets.begin(), mp_impl->m_sheets.end(), find_sheet_by_name(sheet_name)); - - if (it == mp_impl->m_sheets.end()) - return NULL; - -- return &it->data; -+ return &(*it)->data; - } - - sheet* document::get_sheet(sheet_t sheet_pos) -@@ -465,7 +473,7 @@ sheet* document::get_sheet(sheet_t sheet_pos) - if (static_cast(sheet_pos) >= mp_impl->m_sheets.size()) - return NULL; - -- return &mp_impl->m_sheets[sheet_pos].data; -+ return &mp_impl->m_sheets[sheet_pos]->data; - } - - const sheet* document::get_sheet(sheet_t sheet_pos) const -@@ -473,7 +481,7 @@ const sheet* document::get_sheet(sheet_t sheet_pos) const - if (static_cast(sheet_pos) >= mp_impl->m_sheets.size()) - return NULL; - -- return &mp_impl->m_sheets[sheet_pos].data; -+ return &mp_impl->m_sheets[sheet_pos]->data; - } - - void document::calc_formulas() -@@ -516,13 +524,13 @@ void document::dump_html(const string& outdir) const - - sheet_t document::get_sheet_index(const pstring& name) const - { -- boost::ptr_vector::const_iterator it = -- std::find_if(mp_impl->m_sheets.begin(), mp_impl->m_sheets.end(), find_sheet_by_name(name)); -+ auto it = std::find_if( -+ mp_impl->m_sheets.begin(), mp_impl->m_sheets.end(), find_sheet_by_name(name)); - - if (it == mp_impl->m_sheets.end()) - return ixion::invalid_sheet; - -- boost::ptr_vector::const_iterator it_beg = mp_impl->m_sheets.begin(); -+ auto it_beg = mp_impl->m_sheets.begin(); - size_t pos = std::distance(it_beg, it); - return static_cast(pos); - } -@@ -536,7 +544,7 @@ pstring document::get_sheet_name(sheet_t sheet_pos) const - if (pos >= mp_impl->m_sheets.size()) - return pstring(); - -- return mp_impl->m_sheets[pos].name; -+ return mp_impl->m_sheets[pos]->name; - } - - size_t document::sheet_size() const -diff --git a/src/spreadsheet/sheet.cpp b/src/spreadsheet/sheet.cpp -index 8e9db3b..a9d423f 100644 ---- a/src/spreadsheet/sheet.cpp -+++ b/src/spreadsheet/sheet.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -43,9 +44,6 @@ - #include - #include - --#include --#include -- - #define ORCUS_DEBUG_SHEET 0 - - using namespace std; -@@ -64,15 +62,15 @@ struct merge_size - }; - - // Merged cell data stored in sheet. --typedef boost::unordered_map merge_size_type; --typedef boost::unordered_map col_merge_size_type; -+typedef std::unordered_map merge_size_type; -+typedef std::unordered_map col_merge_size_type; - - // Overlapped cells per row, used when rendering sheet content. - typedef mdds::flat_segment_tree overlapped_col_index_type; --typedef boost::unordered_map overlapped_cells_type; -+typedef std::unordered_map overlapped_cells_type; - - typedef mdds::flat_segment_tree segment_row_index_type; --typedef boost::unordered_map cell_format_type; -+typedef std::unordered_map cell_format_type; - - // Widths and heights are stored in twips. - typedef mdds::flat_segment_tree col_widths_store_type; -@@ -156,7 +154,7 @@ public: - - } - --struct sheet_impl : boost::noncopyable -+struct sheet_impl - { - document& m_doc; - sheet_properties m_sheet_props; /// sheet properties import interface. -@@ -184,6 +182,10 @@ struct sheet_impl : boost::noncopyable - col_t m_col_size; - const sheet_t m_sheet; /// sheet ID - -+ sheet_impl() = delete; -+ sheet_impl(const sheet_impl&) = delete; -+ sheet_impl& operator=(const sheet_impl&) = delete; -+ - sheet_impl(document& doc, sheet& sh, sheet_t sheet_index, row_t row_size, col_t col_size) : - m_doc(doc), - m_sheet_props(doc, sh), m_data_table(sh), -diff --git a/src/spreadsheet/table.cpp b/src/spreadsheet/table.cpp -index 9abc978..9dc7564 100644 ---- a/src/spreadsheet/table.cpp -+++ b/src/spreadsheet/table.cpp -@@ -15,7 +15,6 @@ - #include "orcus/spreadsheet/auto_filter.hpp" - - #include --#include - - namespace orcus { namespace spreadsheet { - -@@ -84,7 +83,7 @@ public: - - } - --struct table_impl : boost::noncopyable -+struct table_impl - { - document& m_doc; - sheet& m_sheet; -@@ -94,6 +93,9 @@ struct table_impl : boost::noncopyable - std::unique_ptr mp_data; - table_column_t m_column; - -+ table_impl(const table_impl&) = delete; -+ table_impl& operator=(const table_impl&) = delete; -+ - table_impl(document& doc, sheet& sh) : - m_doc(doc), m_sheet(sh), m_auto_filter(doc) {} - }; --- -2.5.0 - diff --git a/0001-master-now-requires-ixion-master-branch-build.patch b/0001-master-now-requires-ixion-master-branch-build.patch deleted file mode 100644 index 1dcf937..0000000 --- a/0001-master-now-requires-ixion-master-branch-build.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 67494ab53550b483beb25c1aab4c714dcebd42f3 Mon Sep 17 00:00:00 2001 -From: Kohei Yoshida -Date: Wed, 1 Jul 2015 19:33:34 -0400 -Subject: [PATCH] master now requires ixion master branch build. - -Mostly the new C++11 stuff. ---- - configure.ac | 2 +- - src/spreadsheet/document.cpp | 14 +++++++------- - src/spreadsheet/sheet.cpp | 24 ++++++++++++------------ - 3 files changed, 20 insertions(+), 20 deletions(-) - -diff --git a/src/spreadsheet/document.cpp b/src/spreadsheet/document.cpp -index 02850ce..b5e1dc0 100644 ---- a/src/spreadsheet/document.cpp -+++ b/src/spreadsheet/document.cpp -@@ -351,7 +351,7 @@ struct document_impl - m_doc(doc), - mp_styles(new import_styles(m_string_pool)), - mp_strings(new import_shared_strings(m_string_pool, m_context, *mp_styles)), -- mp_name_resolver(ixion::formula_name_resolver::get(ixion::formula_name_resolver_excel_a1, &m_context)), -+ mp_name_resolver(ixion::formula_name_resolver::get(ixion::formula_name_resolver_t::excel_a1, &m_context)), - m_grammar(formula_grammar_xlsx_2007), - m_table_handler(m_context, m_tables) - { -@@ -569,20 +569,20 @@ void document::set_formula_grammar(formula_grammar_t grammar) - { - case formula_grammar_xlsx_2007: - case formula_grammar_xlsx_2010: -- mp_impl->mp_name_resolver.reset( -+ mp_impl->mp_name_resolver = - ixion::formula_name_resolver::get( -- ixion::formula_name_resolver_excel_a1, &mp_impl->m_context)); -+ ixion::formula_name_resolver_t::excel_a1, &mp_impl->m_context); - break; - case formula_grammar_ods: -- mp_impl->mp_name_resolver.reset( -+ mp_impl->mp_name_resolver = - ixion::formula_name_resolver::get( -- ixion::formula_name_resolver_odff, &mp_impl->m_context)); -+ ixion::formula_name_resolver_t::odff, &mp_impl->m_context); - break; - case formula_grammar_gnumeric: - // TODO : Use Excel A1 name resolver for now. -- mp_impl->mp_name_resolver.reset( -+ mp_impl->mp_name_resolver = - ixion::formula_name_resolver::get( -- ixion::formula_name_resolver_excel_a1, &mp_impl->m_context)); -+ ixion::formula_name_resolver_t::excel_a1, &mp_impl->m_context); - break; - default: - mp_impl->mp_name_resolver.reset(); -diff --git a/src/spreadsheet/sheet.cpp b/src/spreadsheet/sheet.cpp -index a9d423f..6485334 100644 ---- a/src/spreadsheet/sheet.cpp -+++ b/src/spreadsheet/sheet.cpp -@@ -501,7 +501,7 @@ void sheet::write_string(ostream& os, row_t row, col_t col) const - ixion::abs_address_t pos(mp_impl->m_sheet, row, col); - switch (cxt.get_celltype(pos)) - { -- case ixion::celltype_string: -+ case ixion::celltype_t::string: - { - size_t str_id = cxt.get_string_identifier(pos); - const string* p = cxt.get_string(str_id); -@@ -509,7 +509,7 @@ void sheet::write_string(ostream& os, row_t row, col_t col) const - os << *p; - } - break; -- case ixion::celltype_numeric: -+ case ixion::celltype_t::numeric: - os << cxt.get_numeric_value(pos); - break; - default: -@@ -668,7 +668,7 @@ void sheet::dump_flat(std::ostream& os) const - ixion::abs_address_t pos(mp_impl->m_sheet,row,col); - switch (cxt.get_celltype(pos)) - { -- case ixion::celltype_string: -+ case ixion::celltype_t::string: - { - size_t sindex = cxt.get_string_identifier(pos); - const string* p = cxt.get_string(sindex); -@@ -676,14 +676,14 @@ void sheet::dump_flat(std::ostream& os) const - mx.set(row, col, *p); - } - break; -- case ixion::celltype_numeric: -+ case ixion::celltype_t::numeric: - { - ostringstream os2; - os2 << cxt.get_numeric_value(pos) << " [v]"; - mx.set(row, col, os2.str()); - } - break; -- case ixion::celltype_formula: -+ case ixion::celltype_t::formula: - { - // print the formula and the formula result. - const ixion::formula_cell* cell = cxt.get_formula_cell(pos); -@@ -829,7 +829,7 @@ void sheet::dump_check(ostream& os, const pstring& sheet_name) const - ixion::abs_address_t pos(mp_impl->m_sheet, row, col); - switch (cxt.get_celltype(pos)) - { -- case ixion::celltype_string: -+ case ixion::celltype_t::string: - { - write_cell_position(os, sheet_name, row, col); - size_t sindex = cxt.get_string_identifier(pos); -@@ -838,13 +838,13 @@ void sheet::dump_check(ostream& os, const pstring& sheet_name) const - os << "string:\"" << escape_chars(*p) << '"' << endl; - } - break; -- case ixion::celltype_numeric: -+ case ixion::celltype_t::numeric: - { - write_cell_position(os, sheet_name, row, col); - os << "numeric:" << cxt.get_numeric_value(pos) << endl; - } - break; -- case ixion::celltype_formula: -+ case ixion::celltype_t::formula: - { - write_cell_position(os, sheet_name, row, col); - os << "formula"; -@@ -1373,7 +1373,7 @@ void sheet::dump_html(const string& filepath) const - } - - ixion::celltype_t ct = cxt.get_celltype(pos); -- if (ct == ixion::celltype_empty) -+ if (ct == ixion::celltype_t::empty) - { - html_elem::attrs_type attrs; - build_html_elem_attributes(attrs, style, p_merge_size); -@@ -1390,7 +1390,7 @@ void sheet::dump_html(const string& filepath) const - ostringstream os; - switch (ct) - { -- case ixion::celltype_string: -+ case ixion::celltype_t::string: - { - size_t sindex = cxt.get_string_identifier(pos); - const string* p = cxt.get_string(sindex); -@@ -1402,10 +1402,10 @@ void sheet::dump_html(const string& filepath) const - os << *p; - } - break; -- case ixion::celltype_numeric: -+ case ixion::celltype_t::numeric: - os << cxt.get_numeric_value(pos); - break; -- case ixion::celltype_formula: -+ case ixion::celltype_t::formula: - { - // print the formula and the formula result. - const ixion::formula_cell* cell = cxt.get_formula_cell(pos); --- -2.5.0 - diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fc06f95 --- /dev/null +++ b/LICENSE @@ -0,0 +1,4 @@ +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. + diff --git a/liborcus.spec b/liborcus.spec index 64958cd..893fbeb 100644 --- a/liborcus.spec +++ b/liborcus.spec @@ -1,37 +1,27 @@ -%global apiversion 0.10 +%global apiversion 0.11 # build conversion tools %bcond_without convtools Name: liborcus -Version: 0.9.2 -Release: 4%{?dist} +Version: 0.11.0 +Release: 1%{?dist} Summary: Standalone file import filter library for spreadsheet documents License: MPLv2.0 URL: https://gitlab.com/orcus/orcus -Source: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz +Source0: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz +Source1: LICENSE BuildRequires: boost-devel %if %{with convtools} BuildRequires: help2man -%if 0%{?fedora} >= 24 BuildRequires: pkgconfig(libixion-0.11) -%else -BuildRequires: pkgconfig(libixion-0.10) %endif -%endif -%if 0%{?fedora} >= 24 BuildRequires: pkgconfig(mdds-1.0) -%else -BuildRequires: pkgconfig(mdds) >= 0.12.0 -%endif BuildRequires: pkgconfig(zlib) -%if 0%{?fedora} >= 24 -Patch0: 0001-master-now-requires-ixion-master-branch-build.patch -Patch1: 0001-Remove-use-of-boost-in-orcus-spreadsheet-model.patch -%endif +Patch0: 0001-Fix-for-OSX-build-inside-LibreOffice.patch %description %{name} is a standalone file import filter library for spreadsheet @@ -66,23 +56,15 @@ and text. %prep %autosetup -p1 +cp %{SOURCE1} . %if %{without convtools} %global condopts --disable-spreadsheet-model %endif %build -%if 0%{?fedora} >= 24 -%if %{with convtools} -export LIBIXION_CFLAGS=`pkg-config --cflags libixion-0.11` -export LIBIXION_LIBS=`pkg-config --libs libixion-0.11` -%endif -export MDDS_CFLAGS=`pkg-config --cflags mdds-1.0` -export MDDS_LIBS=' ' -%endif - %configure --disable-debug --disable-silent-rules --disable-static \ - --disable-werror --with-pic %{?condopts} + --disable-werror --with-pic --disable-python %{?condopts} sed -i \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ @@ -121,8 +103,8 @@ make check %{?_smp_mflags} %endif %files -%doc AUTHORS NEWS -%license COPYING +%doc AUTHORS +%license LICENSE %{_libdir}/%{name}-%{apiversion}.so.* %{_libdir}/%{name}-mso-%{apiversion}.so.* %{_libdir}/%{name}-parser-%{apiversion}.so.* @@ -152,10 +134,12 @@ make check %{?_smp_mflags} %if %{with convtools} %{_bindir}/orcus-csv %{_bindir}/orcus-gnumeric +%{_bindir}/orcus-json %{_bindir}/orcus-ods %{_bindir}/orcus-xls-xml %{_bindir}/orcus-xlsx %{_bindir}/orcus-xml +%{_bindir}/orcus-yaml %{_mandir}/man1/orcus-csv.1* %{_mandir}/man1/orcus-gnumeric.1* %{_mandir}/man1/orcus-ods.1* @@ -165,6 +149,9 @@ make check %{?_smp_mflags} %endif %changelog +* Tue Mar 08 2016 David Tardon - 0.11.0-1 +- new upstream release + * Sun Feb 14 2016 David Tardon - 0.9.2-4 - switch to new mdds and libixion diff --git a/sources b/sources index e255292..c1fbeef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3ff918cc988cb325e12d8bbc7f8c3deb liborcus-0.9.2.tar.xz +30ab8039a98d0122cbe66f5b974ded18 liborcus-0.11.0.tar.xz