diff options
author | Kohei Yoshida <kohei@libreoffice.org> | 2019-08-12 13:57:34 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei@libreoffice.org> | 2019-08-15 06:09:52 +0200 |
commit | 56ffe3c0a1261cd98a3d42b8b08d5f8eb013ead4 (patch) | |
tree | f8e30f9c60c10377b3ed81fbb20d6ffb672dad8a /sc/source | |
parent | 43cce4ef2cf865b2bb637e17b70102a4260295b0 (diff) |
Switch mdds to 1.5.0 and liborcus to 0.15.0.
Change-Id: Ibff9a5e0f0771e4cf12b4dc3985661a01195e265
Reviewed-on: https://gerrit.libreoffice.org/77482
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/inc/orcusinterface.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/orcus/interface.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/orcus/orcusfiltersimpl.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/orcus/xmlcontext.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/xmlsource/xmlsourcedlg.cxx | 6 |
6 files changed, 28 insertions, 9 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 04660abe195c..2c03fe0a074e 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1935,8 +1935,8 @@ public: { case mdds::mtm::element_numeric: { - numeric_element_block::const_iterator it = numeric_element_block::begin(*node.data); - numeric_element_block::const_iterator itEnd = numeric_element_block::end(*node.data); + double_element_block::const_iterator it = double_element_block::begin(*node.data); + double_element_block::const_iterator itEnd = double_element_block::end(*node.data); for (; it != itEnd; ++it, ++miPos) *miPos = *it; } @@ -2012,8 +2012,8 @@ public: { case mdds::mtm::element_numeric: { - numeric_element_block::const_iterator it = numeric_element_block::begin(*node.data); - numeric_element_block::const_iterator itEnd = numeric_element_block::end(*node.data); + double_element_block::const_iterator it = double_element_block::begin(*node.data); + double_element_block::const_iterator itEnd = double_element_block::end(*node.data); for (; it != itEnd; ++it, ++miPos) { if (GetDoubleErrorValue(*miPos) == FormulaError::ElementNaN) diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index 9d090b744619..7c7c4f20bb3c 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -332,6 +332,8 @@ public: virtual orcus::spreadsheet::range_size_t get_sheet_size() const override; + virtual void fill_down_cells(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::row_t range_size) override; + SCTAB getIndex() const { return mnTab; } const sc::SharedFormulaGroups& getSharedFormulaGroups() const; diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 833fb278e397..23f17a1dc854 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -61,8 +61,7 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t case orcus::spreadsheet::formula_grammar_t::ods: eGrammar = formula::FormulaGrammar::GRAM_ODFF; break; - case orcus::spreadsheet::formula_grammar_t::xlsx_2007: - case orcus::spreadsheet::formula_grammar_t::xlsx_2010: + case orcus::spreadsheet::formula_grammar_t::xlsx: eGrammar = formula::FormulaGrammar::GRAM_OOXML; break; case orcus::spreadsheet::formula_grammar_t::gnumeric: @@ -1188,6 +1187,11 @@ orcus::spreadsheet::range_size_t ScOrcusSheet::get_sheet_size() const return ret; } +void ScOrcusSheet::fill_down_cells(os::row_t /*row*/, os::col_t /*col*/, os::row_t /*range_size*/) +{ + // TODO : implement this. +} + const sc::SharedFormulaGroups& ScOrcusSheet::getSharedFormulaGroups() const { return maFormulaGroups; diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx index cdfb70d71c1b..8e9b0b1a5f04 100644 --- a/sc/source/filter/orcus/orcusfiltersimpl.cxx +++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx @@ -139,10 +139,10 @@ bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) con try { - std::string content = orcus::load_file_content(path); + orcus::file_content content(path); ScOrcusFactory aFactory(rDoc); ScOrcusStyles aStyles(aFactory); - orcus::import_ods::read_styles(content.c_str(), content.size(), &aStyles); + orcus::import_ods::read_styles(content.data(), content.size(), &aStyles); } catch (const std::exception& e) { diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index 2548f5b19d9f..71c44bc35823 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -269,10 +269,17 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) std::for_each(rLink.maFieldPaths.begin(), rLink.maFieldPaths.end(), InsertFieldPath(filter)); + std::for_each(rLink.maRowGroups.begin(), rLink.maRowGroups.end(), + [&filter] (const OString& rRowGroup) + { + filter.set_range_row_group(rRowGroup.getStr()); + } + ); + filter.commit_range(); } - std::string content = orcus::load_file_content(path); + orcus::file_content content(path); filter.read_stream(content.data(), content.size()); aFactory.finalize(); diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 95e80068f48d..26b0cbcf4f1a 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -533,6 +533,12 @@ void ScXMLSourceDlg::OkPressed() // Go through all its child elements. getFieldLinks(aRangeLink, aParam.maNamespaces, *mxLbTree, *rEntry); + // Add the anchor node as a grouping node, which will be used as a + // row position increment point. + OUString aThisEntry = getXPath(*mxLbTree, *rEntry, aParam.maNamespaces); + aRangeLink.maRowGroups.push_back( + OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8)); + aParam.maRangeLinks.push_back(aRangeLink); } } |