--- configure.ac.orig 2015-08-22 06:41:35 UTC +++ configure.ac @@ -9016,7 +9016,7 @@ if test -z "$enable_orcus" -o "$enable_o ENABLE_ORCUS="TRUE" AC_DEFINE(ENABLE_ORCUS) - libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.8 >= 0.7.0]) + libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.10 >= 0.9.0]) if test "$with_system_orcus" != "yes"; then if test "$SYSTEM_BOOST" = "TRUE"; then # =========================================================== --- sc/source/filter/html/htmlpars.cxx.orig 2015-08-22 06:41:35 UTC +++ sc/source/filter/html/htmlpars.cxx @@ -3170,6 +3170,34 @@ public: maPropName = MemStr(); maPropValue = MemStr(); } + + // new members + void simple_selector_type(const char* /*p*/, size_t /*n*/) {} + + void simple_selector_class(const char* /*p*/, size_t /*n*/) {} + + void simple_selector_pseudo_element(orcus::css::pseudo_element_t /*pe*/) {} + + void simple_selector_pseudo_class(orcus::css::pseudo_class_t /*pc*/) {} + + void simple_selector_id(const char* /*p*/, size_t /*n*/) {} + + void end_simple_selector() {} + + void end_selector() {} + + void combinator(orcus::css::combinator_t /*combinator*/) {} + + void rgb(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ ) {} + + void rgba(uint8_t /*red*/ , uint8_t /*green*/ , uint8_t /*blue*/ , double /*alpha*/ ) {} + + void hsl(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ ) {} + + void hsla(uint8_t /*hue*/ , uint8_t /*sat*/ , uint8_t /*light*/ , double /*alpha*/ ) {} + + void url(const char* /*p*/, size_t /*n*/) {} + }; } @@ -3183,7 +3211,7 @@ void ScHTMLQueryParser::ParseStyle(const { aParser.parse(); } - catch (const orcus::css_parse_error&) + catch (const orcus::css::parse_error&) { // TODO: Parsing of CSS failed. Do nothing for now. } --- sc/source/filter/inc/orcusinterface.hxx.orig 2015-08-22 06:41:35 UTC +++ sc/source/filter/inc/orcusinterface.hxx @@ -43,6 +43,9 @@ public: ScOrcusGlobalSettings(ScDocumentImport& rDoc); virtual void set_origin_date(int year, int month, int day) SAL_OVERRIDE; + + virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) SAL_OVERRIDE; + virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const SAL_OVERRIDE; }; class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings @@ -120,9 +123,12 @@ public: orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) SAL_OVERRIDE; virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) SAL_OVERRIDE; + virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start, + orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) SAL_OVERRIDE; virtual void set_formula(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) SAL_OVERRIDE; virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) SAL_OVERRIDE; + virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double val) SAL_OVERRIDE; virtual void set_shared_formula( orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, size_t sindex, @@ -203,6 +209,10 @@ public: virtual void set_cell_xf_count(size_t n) SAL_OVERRIDE; virtual size_t commit_cell_xf() SAL_OVERRIDE; + // dxf + virtual void set_dxf_count(size_t count) SAL_OVERRIDE; + virtual size_t commit_dxf() SAL_OVERRIDE; + // xf (cell format) - used both by cell xf and cell style xf. virtual void set_xf_number_format(size_t index) SAL_OVERRIDE; --- sc/source/filter/orcus/interface.cxx.orig 2015-08-22 06:41:35 UTC +++ sc/source/filter/orcus/interface.cxx @@ -35,6 +35,15 @@ void ScOrcusGlobalSettings::set_origin_d mrDoc.setOriginDate(year, month, day); } +void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t /*grammar*/) +{ +} + +orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const +{ + return orcus::spreadsheet::formula_grammar_unknown; +} + ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) : maPos(rPos), mnIndex(nIndex) {} @@ -263,6 +272,11 @@ void ScOrcusSheet::set_format(os::row_t { } +void ScOrcusSheet::set_format(os::row_t /*row*/, os::col_t /*col*/, + os::row_t /*row_end*/, os::col_t /*col_end*/, size_t /*xf_index*/) +{ +} + namespace { formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t grammar ) @@ -270,16 +284,18 @@ formula::FormulaGrammar::Grammar getCalc formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF; switch(grammar) { - case orcus::spreadsheet::ods: + case orcus::spreadsheet::formula_grammar_ods: eGrammar = formula::FormulaGrammar::GRAM_ODFF; break; - case orcus::spreadsheet::xlsx_2007: - case orcus::spreadsheet::xlsx_2010: + case orcus::spreadsheet::formula_grammar_xlsx_2007: + case orcus::spreadsheet::formula_grammar_xlsx_2010: eGrammar = formula::FormulaGrammar::GRAM_OOXML; break; - case orcus::spreadsheet::gnumeric: + case orcus::spreadsheet::formula_grammar_gnumeric: eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1; break; + case orcus::spreadsheet::formula_grammar_unknown: + break; } return eGrammar; @@ -309,6 +325,19 @@ void ScOrcusSheet::set_formula_result(os pCell->SetHybridString(mrDoc.getDoc().GetSharedStringPool().intern(aResult)); } +void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, double /*val*/) +{ + ScFormulaCell* pCell = mrDoc.getDoc().GetFormulaCell(ScAddress(col, row, mnTab)); + if (!pCell) + { + SAL_WARN("sc", "trying to set formula result for non formula \ + cell! Col: " << col << ";Row: " << row << ";Tab: " << mnTab); + return; + } + + // TODO: FIXME +} + void ScOrcusSheet::set_shared_formula( os::row_t row, os::col_t col, os::formula_grammar_t grammar, size_t sindex, const char* p_formula, size_t n_formula) @@ -577,6 +606,17 @@ size_t ScOrcusStyles::commit_cell_xf() return 0; } +// dxf + +void ScOrcusStyles::set_dxf_count(size_t /*n*/) +{ +} + +size_t ScOrcusStyles::commit_dxf() +{ + return 0; +} + // xf (cell format) - used both by cell xf and cell style xf. void ScOrcusStyles::set_xf_number_format(size_t /*index*/)