parent
f746502ea0
commit
00632eb3ab
@ -0,0 +1,110 @@
|
||||
From 6da3d8f4922e501f9685761e91e6014ab565835a Mon Sep 17 00:00:00 2001
|
||||
From: Kohei Yoshida <kohei.yoshida@gmail.com>
|
||||
Date: Fri, 15 Jul 2016 22:30:58 -0400
|
||||
Subject: [PATCH] We now require ixion 0.12.0 (API version 0.12).
|
||||
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
src/python/sheet_rows.cpp | 16 ++++++++--------
|
||||
src/spreadsheet/formula_global.cpp | 6 +++---
|
||||
src/spreadsheet/json_dumper.cpp | 19 +++++++------------
|
||||
src/spreadsheet/sheet.cpp | 19 ++++++++-----------
|
||||
5 files changed, 28 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 118f4e0..05f28a0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -66,7 +66,7 @@ AC_DEFINE([BOOST_ALL_NO_LIB], [], [Disable boost's evil autolink.])
|
||||
# ======================
|
||||
# Set required ixion api
|
||||
# ======================
|
||||
-IXION_REQUIRED_API_VERSION=0.11
|
||||
+IXION_REQUIRED_API_VERSION=0.12
|
||||
AC_SUBST(IXION_REQUIRED_API_VERSION)
|
||||
|
||||
# =============
|
||||
@@ -215,3 +215,4 @@ AC_ARG_ENABLE(spreadsheet-model,
|
||||
AS_IF([test "x$enable_spreadsheet_model" != "xno"], [
|
||||
- PKG_CHECK_MODULES([LIBIXION],[libixion-$IXION_REQUIRED_API_VERSION])
|
||||
+ PKG_CHECK_MODULES([LIBIXION],[libixion-$IXION_REQUIRED_API_VERSION >= 0.12.0])
|
||||
+ CXXFLAGS="$CXXFLAGS -D__ORCUS_SPREADSHEET_MODEL"
|
||||
])
|
||||
diff --git a/src/spreadsheet/sheet.cpp b/src/spreadsheet/sheet.cpp
|
||||
index f9eaa5b..734d0e0 100644
|
||||
--- a/src/spreadsheet/sheet.cpp
|
||||
+++ b/src/spreadsheet/sheet.cpp
|
||||
@@ -582,8 +582,8 @@ void sheet::set_merge_cell_range(const char* p_ref, size_t p_ref_len)
|
||||
if (!resolver)
|
||||
return;
|
||||
|
||||
- ixion::formula_name_type res = resolver->resolve(p_ref, p_ref_len, ixion::abs_address_t());
|
||||
- if (res.type != ixion::formula_name_type::range_reference)
|
||||
+ ixion::formula_name_t res = resolver->resolve(p_ref, p_ref_len, ixion::abs_address_t());
|
||||
+ if (res.type != ixion::formula_name_t::range_reference)
|
||||
return;
|
||||
|
||||
col_merge_size_type::iterator it_col = mp_impl->m_merge_ranges.find(res.range.first.col);
|
||||
@@ -737,9 +737,8 @@ void sheet::dump_flat(std::ostream& os) const
|
||||
|
||||
os2 << formula;
|
||||
|
||||
- const ixion::formula_result* res = cell->get_result_cache();
|
||||
- if (res)
|
||||
- os2 << " (" << res->str(mp_impl->m_doc.get_model_context()) << ")";
|
||||
+ const ixion::formula_result& res = cell->get_result_cache();
|
||||
+ os2 << " (" << res.str(mp_impl->m_doc.get_model_context()) << ")";
|
||||
|
||||
mx.set(row, col, os2.str());
|
||||
}
|
||||
@@ -900,9 +899,8 @@ void sheet::dump_check(ostream& os, const pstring& sheet_name) const
|
||||
|
||||
os << ':' << formula;
|
||||
|
||||
- const ixion::formula_result* res = cell->get_result_cache();
|
||||
- if (res)
|
||||
- os << ':' << res->str(mp_impl->m_doc.get_model_context());
|
||||
+ const ixion::formula_result& res = cell->get_result_cache();
|
||||
+ os << ':' << res.str(mp_impl->m_doc.get_model_context());
|
||||
}
|
||||
os << endl;
|
||||
}
|
||||
@@ -1458,9 +1456,8 @@ void sheet::dump_html(const string& filepath) const
|
||||
|
||||
os << formula;
|
||||
|
||||
- const ixion::formula_result* res = cell->get_result_cache();
|
||||
- if (res)
|
||||
- os << " (" << res->str(mp_impl->m_doc.get_model_context()) << ")";
|
||||
+ const ixion::formula_result& res = cell->get_result_cache();
|
||||
+ os << " (" << res.str(mp_impl->m_doc.get_model_context()) << ")";
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
diff --git a/src/spreadsheet/formula_global.cpp b/src/spreadsheet/formula_global.cpp
|
||||
index 7755f8e..9e7c7d4 100644
|
||||
--- a/src/spreadsheet/formula_global.cpp
|
||||
+++ b/src/spreadsheet/formula_global.cpp
|
||||
@@ -18,15 +18,15 @@ ixion::abs_range_t to_abs_range(
|
||||
ixion::abs_range_t range(ixion::abs_range_t::invalid);
|
||||
ixion::abs_address_t pos(0,0,0);
|
||||
|
||||
- ixion::formula_name_type res = resolver.resolve(p_ref, n_ref, pos);
|
||||
+ ixion::formula_name_t res = resolver.resolve(p_ref, n_ref, pos);
|
||||
switch (res.type)
|
||||
{
|
||||
- case ixion::formula_name_type::cell_reference:
|
||||
+ case ixion::formula_name_t::cell_reference:
|
||||
// Single cell reference.
|
||||
range.first = ixion::to_address(res.address).to_abs(pos);
|
||||
range.last = range.first;
|
||||
break;
|
||||
- case ixion::formula_name_type::range_reference:
|
||||
+ case ixion::formula_name_t::range_reference:
|
||||
// Range reference.
|
||||
range = ixion::to_range(res.range).to_abs(pos);
|
||||
break;
|
||||
--
|
||||
2.7.4
|
||||
|
Loading…
Reference in new issue