diff options
author | David Tardon <dtardon@redhat.com> | 2015-06-04 16:09:48 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-06-04 21:45:12 +0200 |
commit | edb38d702dd5a058ae0702b73a43328318b94649 (patch) | |
tree | 049bd0ca88771b45940aa3211c5332513fa24379 /sc | |
parent | a3afa22ba4069212213009fc7304adc3c339b68b (diff) |
update to liborcus 0.9.1
Includes switching to dynamic libs.
Change-Id: I959c4e9430f8cf95f50d48e1b01d8323dba4af81
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 30 | ||||
-rw-r--r-- | sc/source/filter/inc/orcusinterface.hxx | 10 | ||||
-rw-r--r-- | sc/source/filter/orcus/interface.cxx | 48 |
3 files changed, 83 insertions, 5 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index ce19c0b35387..e418ed8e9ade 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/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 OUString& rStrm) { aParser.parse(); } - catch (const orcus::css_parse_error&) + catch (const orcus::css::parse_error&) { // TODO: Parsing of CSS failed. Do nothing for now. } diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index a77831043c8c..633b43d17d3a 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/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; diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 3735f28c82b2..82b8f9e4f704 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -35,6 +35,15 @@ void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day) 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 /*row*/, os::col_t /*col*/, size_t /*xf_ { } +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 getCalcGrammarFromOrcus( os::formula_grammar_t 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::row_t row, os::col_t col, const char* 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*/) |