summaryrefslogtreecommitdiff
path: root/external/liborcus
diff options
context:
space:
mode:
authorKohei Yoshida <kohei@libreoffice.org>2020-09-11 21:09:22 -0400
committerKohei Yoshida <kohei@libreoffice.org>2020-09-12 05:49:28 +0200
commit0ec032b6a42bcf3dee11cfd9f4fc702905b7ba94 (patch)
treef2e6ebcf53a396e89d202083d875787bcba81228 /external/liborcus
parent109ed8f775dddfede012d56d078abd70b45490c0 (diff)
Remove unused patches.
Change-Id: I2a1dbe15f2df42b4f74e0c00b91ace6c0d3f5f8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102503 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Diffstat (limited to 'external/liborcus')
-rw-r--r--external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch50
-rw-r--r--external/liborcus/0001-add-xml-path.patch119
-rw-r--r--external/liborcus/0001-workaround-a-linking-problem-on-windows.patch45
-rw-r--r--external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch81
-rw-r--r--external/liborcus/0001-xls-xml-Pick-up-border-colors.patch69
-rw-r--r--external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch49
6 files changed, 0 insertions, 413 deletions
diff --git a/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch b/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
deleted file mode 100644
index 6adae9ba2352..000000000000
--- a/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 98d2b3377da71b713a37f9004acff3c02c22ce2b Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida <kohei.yoshida@gmail.com>
-Date: Wed, 31 Jan 2018 22:11:25 -0500
-Subject: [PATCH 1/2] Alpha value of 0 means fully transparent. I'm sure 255
- was intended.
-
-(cherry picked from commit f7953a814d6a43205791b6cc01c528ef5d4b1ce3)
----
- src/liborcus/gnumeric_sheet_context.cpp | 4 ++--
- src/liborcus/odf_styles_context.cpp | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/liborcus/gnumeric_sheet_context.cpp b/src/liborcus/gnumeric_sheet_context.cpp
-index 8659cc3..6bd1471 100644
---- a/src/liborcus/gnumeric_sheet_context.cpp
-+++ b/src/liborcus/gnumeric_sheet_context.cpp
-@@ -132,7 +132,7 @@ public:
- {
- spreadsheet::color_elem_t red, green, blue;
- gnumeric_helper::parse_RGB_color_attribute(red, green, blue, attr.value);
-- m_styles.set_fill_fg_color(0, red, green, blue);
-+ m_styles.set_fill_fg_color(255, red, green, blue);
-
- m_fill = true;
-
-@@ -145,7 +145,7 @@ public:
- {
- spreadsheet::color_elem_t red, green, blue;
- gnumeric_helper::parse_RGB_color_attribute(red, green, blue, attr.value);
-- m_styles.set_fill_bg_color(0, red, green, blue);
-+ m_styles.set_fill_bg_color(255, red, green, blue);
-
- m_fill = true;
- }
-diff --git a/src/liborcus/odf_styles_context.cpp b/src/liborcus/odf_styles_context.cpp
-index d988f7d..f9c422a 100644
---- a/src/liborcus/odf_styles_context.cpp
-+++ b/src/liborcus/odf_styles_context.cpp
-@@ -739,7 +739,7 @@ void styles_context::start_element(xmlns_id_t ns, xml_token_t name, const std::v
- {
- spreadsheet::color_elem_t red, green, blue;
- func.get_background_color(red, green, blue);
-- mp_styles->set_fill_bg_color(0, red, green, blue);
-+ mp_styles->set_fill_bg_color(255, red, green, blue);
- }
-
- size_t fill_id = mp_styles->commit_fill();
---
-2.7.4
-
diff --git a/external/liborcus/0001-add-xml-path.patch b/external/liborcus/0001-add-xml-path.patch
deleted file mode 100644
index 3f9a16bb880f..000000000000
--- a/external/liborcus/0001-add-xml-path.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/include/orcus/xml_structure_tree.hpp b/include/orcus/xml_structure_tree.hpp
-index 58cabfd116fa24e35ff27cf8d7512b6e73df33f4..c88808d24bd74c175fa4017328d3e54b4c588c5e 100644
---- a/include/orcus/xml_structure_tree.hpp
-+++ b/include/orcus/xml_structure_tree.hpp
-@@ -127,6 +127,20 @@ public:
- size_t get_xmlns_index(xmlns_id_t ns) const;
-
- std::string get_xmlns_short_name(xmlns_id_t ns) const;
-+
-+ /**
-+ * Get a XPath like ID for the element inside of the XML tree.
-+ *
-+ */
-+ std::string get_path() const;
-+
-+ /**
-+ * Select an element by a path expression. The path expression may be
-+ * generated by <code>xml_structure_tree::walker::get_path</code>.
-+ *
-+ * @param path a simple XPath like expression
-+ */
-+ element select_by_path(const std::string& path);
- };
-
- xml_structure_tree(xmlns_context& xmlns_cxt);
-diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp
-index 2778bc05f32841a9441bf471913872e119256895..6622bc57cd2595f12bba80d4bbdb5c24cd6e7bc6 100644
---- a/src/liborcus/xml_structure_tree.cpp
-+++ b/src/liborcus/xml_structure_tree.cpp
-@@ -12,6 +12,7 @@
- #include "orcus/exception.hpp"
-
- #include "orcus/string_pool.hpp"
-+#include "string_helper.hpp"
-
- #include <iostream>
- #include <sstream>
-@@ -275,6 +276,15 @@ struct xml_structure_tree_impl
- {
- delete mp_root;
- }
-+
-+ std::string get_element_str(const xml_structure_tree::entity_name& name) const
-+ {
-+ ostringstream ss;
-+ if (m_xmlns_cxt.get_index(name.ns) != index_not_found)
-+ ss << m_xmlns_cxt.get_short_name(name.ns) << ":";
-+ ss << name.name;
-+ return ss.str();
-+ }
- };
-
- struct xml_structure_tree::walker_impl
-@@ -423,6 +433,66 @@ string xml_structure_tree::walker::get_xmlns_short_name(xmlns_id_t ns) const
- return mp_impl->m_parent_impl.m_xmlns_cxt.get_short_name(ns);
- }
-
-+string xml_structure_tree::walker::get_path() const
-+{
-+ ostringstream ss;
-+ for (auto& element : mp_impl->m_scopes)
-+ {
-+ ss << "/" << mp_impl->m_parent_impl.get_element_str(element.name);
-+ }
-+
-+ return ss.str();
-+}
-+
-+xml_structure_tree::element xml_structure_tree::walker::select_by_path(const std::string& path)
-+{
-+ pstring p(path);
-+ std::vector<pstring> parts = string_helper::split_string(p, '/');
-+ if (parts.empty())
-+ throw general_error("invalid format for path");
-+
-+ // string_helper::split_string will create an empty first element due to leading '/'
-+ if (parts[0] != "")
-+ {
-+ throw general_error("invalid format for path");
-+ }
-+ else
-+ {
-+ parts.erase(parts.begin());
-+ }
-+
-+ if (parts.empty())
-+ throw general_error("invalid format for path");
-+
-+ element_ref root_ref(mp_impl->mp_root->name, &mp_impl->mp_root->prop);
-+ if (pstring(mp_impl->m_parent_impl.get_element_str(root_ref.name)) != parts[0])
-+ throw general_error("path does not match any element");
-+
-+ std::vector<element_ref> scopes;
-+ scopes.push_back(root_ref);
-+
-+ for (size_t i = 1; i < parts.size(); ++i)
-+ {
-+ const elem_prop& prop = *scopes.back().prop;
-+ bool found = false;
-+ for (auto& child : prop.child_elements)
-+ {
-+ if (pstring(mp_impl->m_parent_impl.get_element_str(child.first)) == parts[i])
-+ {
-+ scopes.emplace_back(child.first, child.second);
-+ found = true;
-+ break;
-+ }
-+ }
-+ if (!found)
-+ throw general_error("path does not match any element");
-+ }
-+
-+ std::swap(mp_impl->m_scopes, scopes);
-+ const element_ref& ref = mp_impl->m_scopes.back();
-+ return element(ref.name, ref.prop->repeat);
-+}
-+
- xml_structure_tree::xml_structure_tree(xmlns_context& xmlns_cxt) :
- mp_impl(new xml_structure_tree_impl(xmlns_cxt)) {}
diff --git a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
deleted file mode 100644
index 308e51c9b4d5..000000000000
--- a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 71841b7aa7c5e75a793cfaafb31865524a74d9fc Mon Sep 17 00:00:00 2001
-From: David Tardon <dtardon@redhat.com>
-Date: Thu, 4 Jun 2015 16:13:18 +0200
-Subject: [PATCH] workaround a linking problem on windows
-
-Linking scfiltlo.dll gives the following error:
-
-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)
-C:/cygwin/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Windows/instdir/program/scfiltlo.dll : fatal error LNK1120: 1 unresolved externals
-
-I have got no idea what is the cause of this: the constant--exported in
-liborcus-parser.dll--is used in liborus.dll without any problem.
----
- include/orcus/types.hpp | 2 +-
- src/parser/types.cpp | 1 -
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/include/orcus/types.hpp b/include/orcus/types.hpp
-index b6e3f83..8027f25 100644
---- a/include/orcus/types.hpp
-+++ b/include/orcus/types.hpp
-@@ -21,7 +21,7 @@ namespace orcus {
- typedef size_t xml_token_t;
- typedef const char* xmlns_id_t;
-
--ORCUS_PSR_DLLPUBLIC extern const xmlns_id_t XMLNS_UNKNOWN_ID;
-+const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
- ORCUS_PSR_DLLPUBLIC extern const xml_token_t XML_UNKNOWN_TOKEN;
- ORCUS_PSR_DLLPUBLIC extern const size_t index_not_found;
- ORCUS_PSR_DLLPUBLIC extern const size_t unspecified;
-diff --git a/src/parser/types.cpp b/src/parser/types.cpp
-index be4e304..0a1b4a7 100644
---- a/src/parser/types.cpp
-+++ b/src/parser/types.cpp
-@@ -12,7 +12,6 @@
-
- namespace orcus {
-
--const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
- const xml_token_t XML_UNKNOWN_TOKEN = 0;
-
- const size_t index_not_found = std::numeric_limits<size_t>::max();
---
-2.4.1
-
diff --git a/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch b/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch
deleted file mode 100644
index 15a554a79cff..000000000000
--- a/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 66bbbd42f5d135b7e7dd57eaa7fdf6fd69c664df Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida <kohei.yoshida@gmail.com>
-Date: Tue, 13 Feb 2018 22:15:49 -0500
-Subject: [PATCH] xls-xml: Import hidden row and column flags.
-
-(cherry picked from commit 95420c1a1e8c082bb5953b2a49f0d56eef0e5f7e)
----
- src/liborcus/xls_xml_context.cpp | 20 ++++++++++++++++++--
- 1 file changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp
-index 917ff86..04b863a 100644
---- a/src/liborcus/xls_xml_context.cpp
-+++ b/src/liborcus/xls_xml_context.cpp
-@@ -1222,6 +1222,7 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const
- spreadsheet::col_t col_index = m_cur_prop_col;
- spreadsheet::col_t span = 0;
- double width = 0.0;
-+ bool hidden = false;
-
- std::for_each(attrs.begin(), attrs.end(),
- [&](const xml_token_attr_t& attr)
-@@ -1244,6 +1245,8 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const
- case XML_Span:
- span = to_long(attr.value);
- break;
-+ case XML_Hidden:
-+ hidden = to_long(attr.value) != 0;
- default:
- ;
- }
-@@ -1251,8 +1254,11 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const
- );
-
- for (; span >= 0; --span, ++col_index)
-+ {
- // Column widths are stored as points.
- mp_sheet_props->set_column_width(col_index, width, orcus::length_unit_t::point);
-+ mp_sheet_props->set_column_hidden(col_index, hidden);
-+ }
-
- m_cur_prop_col = col_index;
- }
-@@ -1263,6 +1269,7 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm
- m_cur_col = 0;
- spreadsheet::row_t row_index = -1;
- bool has_height = false;
-+ bool hidden = false;
- double height = 0.0;
-
- for (const xml_token_attr_t& attr : attrs)
-@@ -1281,6 +1288,9 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm
- has_height = true;
- height = to_double(attr.value);
- break;
-+ case XML_Hidden:
-+ hidden = to_long(attr.value) != 0;
-+ break;
- default:
- ;
- }
-@@ -1293,8 +1303,14 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm
- m_cur_row = row_index - 1;
- }
-
-- if (mp_sheet_props && has_height)
-- mp_sheet_props->set_row_height(m_cur_row, height, length_unit_t::point);
-+ if (mp_sheet_props)
-+ {
-+ if (has_height)
-+ mp_sheet_props->set_row_height(m_cur_row, height, length_unit_t::point);
-+
-+ if (hidden)
-+ mp_sheet_props->set_row_hidden(m_cur_row, true);
-+ }
- }
-
- void xls_xml_context::end_element_borders()
---
-2.7.4
-
diff --git a/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch b/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch
deleted file mode 100644
index 1dff6bf93415..000000000000
--- a/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0a4e8c44fc8229818191c6b9b46e4de079d0ca3b Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida <kohei.yoshida@gmail.com>
-Date: Thu, 8 Feb 2018 17:59:11 -0500
-Subject: [PATCH] xls-xml: Pick up border colors.
-
-(cherry picked from commit e065d26dabafea465ec49e7d79775e62014ac0db)
----
- src/liborcus/xls_xml_context.cpp | 10 ++++++++++
- src/liborcus/xls_xml_context.hpp | 1 +
- 2 files changed, 11 insertions(+)
-
-diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp
-index 790dfed..917ff86 100644
---- a/src/liborcus/xls_xml_context.cpp
-+++ b/src/liborcus/xls_xml_context.cpp
-@@ -1069,6 +1069,7 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const
-
- spreadsheet::border_direction_t dir = spreadsheet::border_direction_t::unknown;
- spreadsheet::border_style_t style = spreadsheet::border_style_t::unknown;
-+ spreadsheet::color_rgb_t color;
- long weight = 0;
-
- for (const xml_token_attr_t& attr : attrs)
-@@ -1093,6 +1094,11 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const
- weight = to_long(attr.value);
- break;
- }
-+ case XML_Color:
-+ {
-+ color = spreadsheet::to_color_rgb(attr.value.data(), attr.value.size());
-+ break;
-+ }
- default:
- ;
- }
-@@ -1105,6 +1111,7 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const
- border_style_type& bs = m_current_style->borders.back();
- bs.dir = dir;
- bs.style = style;
-+ bs.color = color;
-
- switch (bs.style)
- {
-@@ -1525,7 +1532,10 @@ void xls_xml_context::commit_styles()
- styles->set_border_count(style->borders.size());
-
- for (const border_style_type& b : style->borders)
-+ {
- styles->set_border_style(b.dir, b.style);
-+ styles->set_border_color(b.dir, 255, b.color.red, b.color.green, b.color.blue);
-+ }
-
- size_t border_id = styles->commit_border();
- styles->set_xf_border(border_id);
-diff --git a/src/liborcus/xls_xml_context.hpp b/src/liborcus/xls_xml_context.hpp
-index 47cd01c..93dceca 100644
---- a/src/liborcus/xls_xml_context.hpp
-+++ b/src/liborcus/xls_xml_context.hpp
-@@ -107,6 +107,7 @@ class xls_xml_context : public xml_context_base
- {
- spreadsheet::border_direction_t dir = spreadsheet::border_direction_t::unknown;
- spreadsheet::border_style_t style = spreadsheet::border_style_t::unknown;
-+ spreadsheet::color_rgb_t color;
- };
-
- struct font_style_type
---
-2.7.4
-
diff --git a/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch b/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch
deleted file mode 100644
index ebb233ac7b8d..000000000000
--- a/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 473526e1ca3a7117e2daf977e1b82a0a3977fc84 Mon Sep 17 00:00:00 2001
-From: Kohei Yoshida <kohei.yoshida@gmail.com>
-Date: Wed, 31 Jan 2018 22:24:45 -0500
-Subject: [PATCH 2/2] We are supposed to use the foreground color for solid
- fill.
-
-(cherry picked from commit f821995022df8dd1e580dd22cf131584b2b1ac4f)
----
- src/liborcus/odf_styles_context.cpp | 3 ++-
- src/liborcus/odf_styles_context_test.cpp | 9 +++++----
- 2 files changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/liborcus/odf_styles_context.cpp b/src/liborcus/odf_styles_context.cpp
-index f9c422a..e5f1cc6 100644
---- a/src/liborcus/odf_styles_context.cpp
-+++ b/src/liborcus/odf_styles_context.cpp
-@@ -739,7 +739,8 @@ void styles_context::start_element(xmlns_id_t ns, xml_token_t name, const std::v
- {
- spreadsheet::color_elem_t red, green, blue;
- func.get_background_color(red, green, blue);
-- mp_styles->set_fill_bg_color(255, red, green, blue);
-+ mp_styles->set_fill_pattern_type(ORCUS_ASCII("solid"));
-+ mp_styles->set_fill_fg_color(255, red, green, blue);
- }
-
- size_t fill_id = mp_styles->commit_fill();
-diff --git a/src/liborcus/odf_styles_context_test.cpp b/src/liborcus/odf_styles_context_test.cpp
-index 4c7eab5..7255a54 100644
---- a/src/liborcus/odf_styles_context_test.cpp
-+++ b/src/liborcus/odf_styles_context_test.cpp
-@@ -48,10 +48,11 @@ void test_odf_fill(orcus::spreadsheet::import_styles &styles)
- std::cerr << std::hex << (int)fill;
- const orcus::spreadsheet::fill_t* cell_fill = styles.get_fill(fill);
- assert(cell_fill);
-- std::cerr << std::hex << (int)cell_fill->bg_color.red;
-- assert(cell_fill->bg_color.red == 0xfe);
-- assert(cell_fill->bg_color.green == 0xff);
-- assert(cell_fill->bg_color.blue == 0xcc);
-+ std::cerr << std::hex << (int)cell_fill->fg_color.red;
-+ assert(cell_fill->fg_color.red == 0xfe);
-+ assert(cell_fill->fg_color.green == 0xff);
-+ assert(cell_fill->fg_color.blue == 0xcc);
-+ assert(cell_fill->pattern_type == "solid");
- }
-
- void test_odf_border(orcus::spreadsheet::import_styles &styles)
---
-2.7.4
-