You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
liborcus/0001-master-now-requires-ix...

160 lines
7.0 KiB

From 67494ab53550b483beb25c1aab4c714dcebd42f3 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@gmail.com>
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