LibreOffice Module sc (master)  1
orcusinterface.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_ORCUSINTERFACE_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_INC_ORCUSINTERFACE_HXX
12 
13 #include <address.hxx>
14 #include <documentimport.hxx>
15 
16 #include <tools/color.hxx>
17 #include <tools/fontenum.hxx>
18 #include <editeng/svxenum.hxx>
19 
20 #include "sharedformulagroups.hxx"
21 
22 #include <conditio.hxx>
23 
24 #include <rtl/strbuf.hxx>
25 #include <editeng/borderline.hxx>
26 
27 #include <orcus/spreadsheet/import_interface.hpp>
28 
29 #include <memory>
30 #include <map>
31 #include <unordered_map>
32 #include <vector>
33 
34 class ScOrcusSheet;
35 class ScOrcusStyles;
36 class ScOrcusFactory;
37 class SfxItemSet;
38 namespace com::sun::star::task { class XStatusIndicator; }
39 
40 class ScOrcusGlobalSettings : public orcus::spreadsheet::iface::import_global_settings
41 {
44  orcus::spreadsheet::formula_grammar_t meOrcusGrammar;
45  rtl_TextEncoding mnTextEncoding;
46 
47 public:
49 
50  virtual void set_origin_date(int year, int month, int day) override;
51  virtual void set_character_set(orcus::character_set_t cs) override;
52 
53  virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override;
54  virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override;
55 
57  {
58  return meCalcGrammar;
59  }
60 
61  rtl_TextEncoding getTextEncoding() const
62  {
63  return mnTextEncoding;
64  }
65 };
66 
67 class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_resolver
68 {
70 
71 public:
73 
74  orcus::spreadsheet::address_t resolve_address(const char* p, size_t n) override;
75  orcus::spreadsheet::range_t resolve_range(const char* p, size_t n) override;
76 };
77 
78 class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_expression
79 {
82  SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions.
83 
84 public:
86 
87  virtual void define_name(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override;
88 };
89 
90 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
91 {
93 
94  OStringBuffer maCurSegment;
95 public:
97 
98  virtual size_t append(const char* s, size_t n) override;
99  virtual size_t add(const char* s, size_t n) override;
100 
101  virtual void set_segment_bold(bool b) override;
102  virtual void set_segment_italic(bool b) override;
103  virtual void set_segment_font(size_t font_index) override;
104  virtual void set_segment_font_name(const char* s, size_t n) override;
105  virtual void set_segment_font_size(double point) override;
106  virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha,
107  orcus::spreadsheet::color_elem_t red,
108  orcus::spreadsheet::color_elem_t green,
109  orcus::spreadsheet::color_elem_t blue) override;
110  virtual void append_segment(const char* s, size_t n) override;
111 
112  virtual size_t commit_segments() override;
113 };
114 
115 class ScOrcusConditionalFormat : public orcus::spreadsheet::iface::import_conditional_format
116 {
117 public:
119  virtual ~ScOrcusConditionalFormat() override;
120 
121  virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
122  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
123 
124  virtual void set_formula(const char* p, size_t n) override;
125 
126  virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override;
127 
128  virtual void set_date(orcus::spreadsheet::condition_date_t date) override;
129 
130  virtual void commit_condition() override;
131 
132  virtual void set_icon_name(const char* p, size_t n) override;
133 
134  virtual void set_databar_gradient(bool gradient) override;
135 
136  virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override;
137 
138  virtual void set_databar_color_positive(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
139  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
140 
141  virtual void set_databar_color_negative(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
142  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
143 
144  virtual void set_min_databar_length(double length) override;
145 
146  virtual void set_max_databar_length(double length) override;
147 
148  virtual void set_show_value(bool show) override;
149 
150  virtual void set_iconset_reverse(bool reverse) override;
151 
152  virtual void set_xf_id(size_t xf) override;
153 
154  virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override;
155 
156  virtual void set_type(orcus::spreadsheet::conditional_format_t type) override;
157 
158  virtual void commit_entry() override;
159 
160  virtual void set_range(const char* p, size_t n) override;
161 
162  virtual void set_range(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
163  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end) override;
164 
165  virtual void commit_format() override;
166 
167 private:
168 
171 
172  std::unique_ptr<ScConditionalFormat> mpCurrentFormat;
173 
175 };
176 
177 class ScOrcusAutoFilter : public orcus::spreadsheet::iface::import_auto_filter
178 {
179 public:
181 
182  virtual ~ScOrcusAutoFilter() override;
183 
184  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
185 
186  virtual void set_column(orcus::spreadsheet::col_t col) override;
187 
188  virtual void append_column_match_value(const char* p, size_t n) override;
189 
190  virtual void commit_column() override;
191 
192  virtual void commit() override;
193 
194 private:
197 };
198 
199 class ScOrcusSheetProperties : public orcus::spreadsheet::iface::import_sheet_properties
200 {
203 public:
205  virtual ~ScOrcusSheetProperties() override;
206 
207  virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override;
208 
209  virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override;
210 
211  virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override;
212 
213  virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override;
214 
215  virtual void set_merge_cell_range(const orcus::spreadsheet::range_t& range) override;
216 };
217 
218 class ScOrcusFormula : public orcus::spreadsheet::iface::import_formula
219 {
220  enum class ResultType { NotSet, String, Value, Empty };
221 
222  friend class ScOrcusSheet;
223 
225 
228  OUString maFormula;
231  bool mbShared;
232 
234  size_t mnResult; // result string index.
235  double mfResult;
236 
237  void reset();
238 
239 public:
240  ScOrcusFormula( ScOrcusSheet& rSheet );
241  virtual ~ScOrcusFormula() override;
242 
243  virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
244  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
245  virtual void set_shared_formula_index(size_t index) override;
246  virtual void set_result_value(double value) override;
247  virtual void set_result_string(size_t sindex) override;
248  virtual void set_result_empty() override;
249  virtual void set_result_bool(bool value) override;
250  virtual void commit() override;
251 };
252 
253 class ScOrcusArrayFormula : public orcus::spreadsheet::iface::import_array_formula
254 {
255  friend class ScOrcusSheet;
256 
258 
261  uint32_t mnColRange;
262  uint32_t mnRowRange;
263  OUString maFormula;
265 
266  void reset();
267 
268 public:
270  virtual ~ScOrcusArrayFormula() override;
271 
272  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
273  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
274  virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
275  virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
276  virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
277  virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
278  virtual void commit() override;
279 };
280 
281 class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
282 {
283  friend class ScOrcusFormula;
284  friend class ScOrcusArrayFormula;
285 
291 
298 
300 
301  void cellInserted();
302 
304 
305 public:
306  ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
307 
308  virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override;
309  virtual orcus::spreadsheet::iface::import_table* get_table() override;
310  virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() override;
311  virtual orcus::spreadsheet::iface::import_conditional_format* get_conditional_format() override;
312  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
313  virtual orcus::spreadsheet::iface::import_formula* get_formula() override;
314  virtual orcus::spreadsheet::iface::import_array_formula* get_array_formula() override;
315 
316  // Orcus import interface
317  virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
318  virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
319  virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
320  virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
321  virtual void set_date_time(
322  orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) override;
323 
324  virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) override;
325  virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
326  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) override;
327 
328  virtual orcus::spreadsheet::range_size_t get_sheet_size() const override;
329 
330  virtual void fill_down_cells(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::row_t range_size) override;
331 
332  SCTAB getIndex() const { return mnTab; }
333 
337 };
338 
339 class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
340 {
341 private:
343 
344  struct font
345  {
346  bool mbBold;
347  bool mbItalic;
348  OUString maName;
349  double mnSize;
351 
355 
358 
360 
361  font();
362 
363  void applyToItemSet(SfxItemSet& rSet) const;
364  };
365 
367  std::vector<font> maFonts;
368 
369  struct fill
370  {
371  orcus::spreadsheet::fill_pattern_t mePattern;
374 
376 
377  fill();
378 
379  void applyToItemSet(SfxItemSet& rSet) const;
380  };
381 
383  std::vector<fill> maFills;
384 
385  struct border
386  {
387  struct border_line
388  {
391  double mnWidth;
392 
393  border_line();
394  };
395  std::map<orcus::spreadsheet::border_direction_t, border_line> border_lines;
396 
398 
399  border();
400 
401  void applyToItemSet(SfxItemSet& rSet) const;
402  };
403 
405  std::vector<border> maBorders;
406 
407  struct protection
408  {
409  bool mbHidden;
410  bool mbLocked;
413 
415 
416  protection();
417  void applyToItemSet(SfxItemSet& rSet) const;
418  };
419 
421  std::vector<protection> maProtections;
422 
424  {
425  OUString maCode;
426 
428 
429  number_format();
430  void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
431  };
432 
434  std::vector<number_format> maNumberFormats;
435 
436  struct xf
437  {
438  size_t mnFontId;
439  size_t mnFillId;
440  size_t mnBorderId;
443  size_t mnStyleXf;
445 
450 
451  xf();
452  };
453 
455  std::vector<xf> maCellStyleXfs;
456  std::vector<xf> maCellXfs;
457 
458  struct cell_style
459  {
460  OUString maName;
461  OUString maParentName;
462  size_t mnXFId;
463  size_t mnBuiltInId;
464 
465  cell_style();
466  };
467 
469 
470  void applyXfToItemSet(SfxItemSet& rSet, const xf& rXf);
471 
472 public:
473  ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles=false );
474 
475  void applyXfToItemSet(SfxItemSet& rSet, size_t xfId);
476 
477  // font
478 
479  virtual void set_font_count(size_t n) override;
480  virtual void set_font_bold(bool b) override;
481  virtual void set_font_italic(bool b) override;
482  virtual void set_font_name(const char* s, size_t n) override;
483  virtual void set_font_size(double point) override;
484  virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
485  virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
486  virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override;
487  virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override;
488  virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
489  orcus::spreadsheet::color_elem_t red,
490  orcus::spreadsheet::color_elem_t green,
491  orcus::spreadsheet::color_elem_t blue) override;
492  virtual void set_font_color( orcus::spreadsheet::color_elem_t alpha,
493  orcus::spreadsheet::color_elem_t red,
494  orcus::spreadsheet::color_elem_t green,
495  orcus::spreadsheet::color_elem_t blue) override;
496  virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override;
497  virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override;
498  virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override;
499  virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override;
500  virtual size_t commit_font() override;
501 
502  // fill
503 
504  virtual void set_fill_count(size_t n) override;
505  virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override;
506  virtual void set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
507  virtual void set_fill_bg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
508  virtual size_t commit_fill() override;
509 
510  // border
511 
512  virtual void set_border_count(size_t n) override;
513 
514  virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
515  virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
516  orcus::spreadsheet::color_elem_t alpha,
517  orcus::spreadsheet::color_elem_t red,
518  orcus::spreadsheet::color_elem_t green,
519  orcus::spreadsheet::color_elem_t blue) override;
520  virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override;
521  virtual size_t commit_border() override;
522 
523  // cell protection
524  virtual void set_cell_hidden(bool b) override;
525  virtual void set_cell_locked(bool b) override;
526  virtual void set_cell_print_content(bool b) override;
527  virtual void set_cell_formula_hidden(bool b) override;
528  virtual size_t commit_cell_protection() override;
529 
530  // number format
531  virtual void set_number_format_count(size_t n) override;
532  virtual void set_number_format_identifier(size_t n) override;
533  virtual void set_number_format_code(const char* s, size_t n) override;
534  virtual size_t commit_number_format() override;
535 
536  // cell style xf
537 
538  virtual void set_cell_style_xf_count(size_t n) override;
539  virtual size_t commit_cell_style_xf() override;
540 
541  // cell xf
542 
543  virtual void set_cell_xf_count(size_t n) override;
544  virtual size_t commit_cell_xf() override;
545 
546  // dxf
547  virtual void set_dxf_count(size_t count) override;
548  virtual size_t commit_dxf() override;
549 
550  // xf (cell format) - used both by cell xf and cell style xf.
551 
552  virtual void set_xf_number_format(size_t index) override;
553  virtual void set_xf_font(size_t index) override;
554  virtual void set_xf_fill(size_t index) override;
555  virtual void set_xf_border(size_t index) override;
556  virtual void set_xf_protection(size_t index) override;
557  virtual void set_xf_style_xf(size_t index) override;
558  virtual void set_xf_apply_alignment(bool b) override;
559  virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override;
560  virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override;
561 
562  // cell style entry
563 
564  virtual void set_cell_style_count(size_t n) override;
565  virtual void set_cell_style_name(const char* s, size_t n) override;
566  virtual void set_cell_style_xf(size_t index) override;
567  virtual void set_cell_style_builtin(size_t index) override;
568  virtual void set_cell_style_parent_name(const char* s, size_t n) override;
569  virtual size_t commit_cell_style() override;
570 };
571 
572 class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory
573 {
575  {
576  enum class Type
577  {
578  Auto,
579  Numeric,
580  String,
581  Formula,
585  Matrix,
587  };
588 
591 
592  OUString maStr1;
593  OUString maStr2;
594  double mfValue;
595 
596  uint32_t mnIndex1;
597  uint32_t mnIndex2;
599 
600  CellStoreToken( const ScAddress& rPos, Type eType );
601  CellStoreToken( const ScAddress& rPos, double fValue );
602  CellStoreToken( const ScAddress& rPos, uint32_t nIndex );
603  CellStoreToken( const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
604  };
605 
606  typedef std::unordered_map<OUString, size_t> StringHashType;
607  typedef std::vector<CellStoreToken> CellStoreTokensType;
608 
610 
611  std::vector<OUString> maStrings;
612  StringHashType maStringHash;
613 
614  CellStoreTokensType maCellStoreTokens;
618  std::vector<std::unique_ptr<ScOrcusSheet>> maSheets;
620 
622 
623  css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
624 
625 public:
626  ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles=false);
627 
628  virtual orcus::spreadsheet::iface::import_sheet* append_sheet(
629  orcus::spreadsheet::sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) override;
630  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(const char *sheet_name, size_t sheet_name_length) override;
631  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(orcus::spreadsheet::sheet_t sheet_index) override;
632  virtual orcus::spreadsheet::iface::import_global_settings* get_global_settings() override;
633  virtual orcus::spreadsheet::iface::import_shared_strings* get_shared_strings() override;
634  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
635  virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
636  virtual void finalize() override;
637 
639 
640  size_t appendString(const OUString& rStr);
641  size_t addString(const OUString& rStr);
642  const OUString* getString(size_t nIndex) const;
643 
644  void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
645  void pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex );
646  void pushCellStoreToken( const ScAddress& rPos, double fValue );
647  void pushCellStoreToken(
648  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
649  void pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize );
650 
651  void pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex );
653  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar,
654  uint32_t nRowRange, uint32_t nColRange );
655 
656  void pushFormulaResult( const ScAddress& rPos, double fValue );
657  void pushFormulaResult( const ScAddress& rPos, const OUString& rValue );
658 
659  void incrementProgress();
660 
661  void setStatusIndicator(const css::uno::Reference<css::task::XStatusIndicator>& rIndicator);
662 
664 };
665 
666 #endif
667 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:934
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:711
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1491
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2175
virtual void set_result_empty() override
Definition: interface.cxx:952
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1635
ScOrcusFactory & mrFactory
orcus::spreadsheet::address_t resolve_address(const char *p, size_t n) override
Definition: interface.cxx:161
virtual size_t append(const char *s, size_t n) override
Definition: interface.cxx:1232
virtual orcus::spreadsheet::iface::import_array_formula * get_array_formula() override
Definition: interface.cxx:1127
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:1116
virtual void commit_column() override
Definition: interface.cxx:2194
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1283
size_t appendString(const OUString &rStr)
Definition: interface.cxx:507
orcus::spreadsheet::range_t resolve_range(const char *p, size_t n) override
Definition: interface.cxx:183
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1425
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:1989
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1456
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:833
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:922
virtual orcus::spreadsheet::iface::import_styles * get_styles() override
Definition: interface.cxx:368
virtual size_t commit_cell_style() override
Definition: interface.cxx:2137
virtual void set_fill_bg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1801
virtual orcus::spreadsheet::iface::import_global_settings * get_global_settings() override
Definition: interface.cxx:353
virtual void set_fill_count(size_t n) override
Definition: interface.cxx:1783
virtual void commit() override
Definition: interface.cxx:963
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:653
ScOrcusFactory & getFactory()
Definition: interface.cxx:1224
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:2003
std::unordered_map< OUString, size_t > StringHashType
virtual size_t commit_number_format() override
Definition: interface.cxx:1965
virtual void commit_format() override
Definition: interface.cxx:875
std::vector< OUString > maStrings
std::vector< font > maFonts
css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator
virtual orcus::spreadsheet::iface::import_formula * get_formula() override
Definition: interface.cxx:1121
virtual void set_border_count(size_t n) override
Definition: interface.cxx:1819
ScOrcusArrayFormula maArrayFormula
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2034
sal_Int64 n
ScOrcusAutoFilter maAutoFilter
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1675
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2120
formula::FormulaGrammar::Grammar getCalcGrammar() const
virtual void finalize() override
Definition: interface.cxx:373
ScOrcusFactory(ScDocument &rDoc, bool bSkipDefaultStyles=false)
Definition: interface.cxx:271
const OUString * getString(size_t nIndex) const
Definition: interface.cxx:526
const sc::SharedFormulaGroups & getSharedFormulaGroups() const
Definition: interface.cxx:1214
ScOrcusStyles maStyles
virtual void set_number_format_code(const char *s, size_t n) override
Definition: interface.cxx:1958
virtual void set_xf_number_format(size_t index) override
Definition: interface.cxx:2014
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:757
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:806
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1571
virtual void set_number_format_count(size_t n) override
Definition: interface.cxx:1950
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2019
void pushFillDownCellsToken(const ScAddress &rPos, uint32_t nFillSize)
Definition: interface.cxx:553
formula::FormulaGrammar::Grammar meGrammar
ScOrcusNamedExpression maNamedExpressions
virtual size_t commit_fill() override
Definition: interface.cxx:1809
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1918
rtl_TextEncoding getTextEncoding() const
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:1039
ScOrcusConditionalFormat(SCTAB nTab, ScDocument &rDoc)
Definition: interface.cxx:728
virtual void define_name(const char *p_name, size_t n_name, const char *p_exp, size_t n_exp) override
Definition: interface.cxx:213
virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override
Definition: interface.cxx:153
virtual size_t commit_segments() override
Definition: interface.cxx:1276
virtual void commit() override
Definition: interface.cxx:2199
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1596
SvxBorderLineStyle
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1936
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
virtual void set_font_size(double point) override
Definition: interface.cxx:1590
virtual void set_cell_style_name(const char *s, size_t n) override
Definition: interface.cxx:2114
SvxCellVerJustify
virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override
Definition: interface.cxx:1670
formula::FormulaGrammar::Grammar meCalcGrammar
virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override
Definition: interface.cxx:746
virtual orcus::spreadsheet::iface::import_sheet * append_sheet(orcus::spreadsheet::sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) override
Definition: interface.cxx:279
ScDocumentImport & getDoc()
Definition: interface.cxx:502
virtual void set_xf_fill(size_t index) override
Definition: interface.cxx:2024
virtual void set_cell_style_parent_name(const char *s, size_t n) override
Definition: interface.cxx:2131
length
virtual size_t add(const char *s, size_t n) override
Definition: interface.cxx:1238
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1140
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:823
virtual void append_column_match_value(const char *p, size_t n) override
Definition: interface.cxx:2188
SvxCellJustifyMethod meVerAlignMethod
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1773
size_t addString(const OUString &rStr)
Definition: interface.cxx:516
virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override
Definition: interface.cxx:1713
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_databar_color_negative(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:793
virtual void set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1793
std::vector< protection > maProtections
ScOrcusRefResolver(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:158
virtual void append_segment(const char *s, size_t n) override
Definition: interface.cxx:1271
ScOrcusSharedStrings maSharedStrings
sc::SharedFormulaGroups maFormulaGroups
ScDocumentImport maDoc
virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) override
virtual ~ScOrcusConditionalFormat() override
Definition: interface.cxx:736
void pushSharedFormulaToken(const ScAddress &rPos, uint32_t nIndex)
Definition: interface.cxx:559
virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override
Definition: interface.cxx:2077
std::vector< xf > maCellXfs
virtual orcus::spreadsheet::range_size_t get_sheet_size() const override
Definition: interface.cxx:1199
virtual void set_character_set(orcus::character_set_t cs) override
Definition: interface.cxx:95
void pushFormulaResult(const ScAddress &rPos, double fValue)
Definition: interface.cxx:577
ScDocumentImport & mrDoc
virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1152
virtual void commit_entry() override
Definition: interface.cxx:857
virtual size_t commit_dxf() override
Definition: interface.cxx:2007
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1788
void pushMatrixFormulaToken(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, uint32_t nRowRange, uint32_t nColRange)
Definition: interface.cxx:565
ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport &rDoc)
Definition: interface.cxx:658
ScOrcusFactory & mrFactory
virtual orcus::spreadsheet::iface::import_table * get_table() override
Definition: interface.cxx:1101
std::vector< number_format > maNumberFormats
virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:1064
virtual void set_font_italic(bool b) override
Definition: interface.cxx:1577
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:780
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2166
sal_Int16 SCCOL
Definition: types.hxx:22
SvxCellHorJustify meHorAlignment
virtual void set_databar_color_positive(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:786
SCTAB getIndex() const
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:1048
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:928
virtual void set_date_time(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) override
Definition: interface.cxx:1158
virtual orcus::spreadsheet::iface::import_shared_strings * get_shared_strings() override
Definition: interface.cxx:358
virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1695
CellStoreTokensType maCellStoreTokens
virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:740
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1824
virtual void set_result_value(double value) override
Definition: interface.cxx:940
virtual void set_show_value(bool show) override
Definition: interface.cxx:812
ResultType meResType
virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char *p, size_t n) override
Definition: interface.cxx:1133
virtual void commit_condition() override
Definition: interface.cxx:763
virtual orcus::spreadsheet::iface::import_sheet_properties * get_sheet_properties() override
Definition: interface.cxx:1106
virtual void set_number_format_identifier(size_t n) override
Definition: interface.cxx:1954
std::vector< CellStoreToken > CellStoreTokensType
virtual orcus::spreadsheet::iface::import_sheet * get_sheet(const char *sheet_name, size_t sheet_name_length) override
Definition: interface.cxx:316
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1360
ScOrcusGlobalSettings(ScDocumentImport &rDoc)
Definition: interface.cxx:82
virtual void set_border_color(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1893
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1381
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:699
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:723
virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override
Definition: interface.cxx:147
std::vector< xf > maCellStyleXfs
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1331
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1037
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:629
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1942
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:1975
virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1264
virtual void set_xf_style_xf(size_t index) override
Definition: interface.cxx:2039
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2048
FontLineStyle meUnderline
virtual ~ScOrcusSheetProperties() override
Definition: interface.cxx:664
virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1069
std::vector< std::unique_ptr< ScOrcusSheet > > maSheets
formula::FormulaGrammar::Grammar meGrammar
virtual void set_segment_bold(bool b) override
Definition: interface.cxx:1248
virtual void fill_down_cells(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::row_t range_size) override
Definition: interface.cxx:1208
virtual void set_column(orcus::spreadsheet::col_t col) override
Definition: interface.cxx:2183
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:537
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1229
virtual void set_segment_font_name(const char *s, size_t n) override
Definition: interface.cxx:1256
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1717
ScDocumentImport & mrDoc
virtual size_t commit_cell_style_xf() override
Definition: interface.cxx:1980
number_format maCurrentNumberFormat
virtual void set_segment_font(size_t font_index) override
Definition: interface.cxx:1244
void setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &rIndicator)
Definition: interface.cxx:648
sal_Int32 SCROW
Definition: types.hxx:18
virtual void set_font_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1703
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1029
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:363
const ScOrcusGlobalSettings & mrGlobalSettings
virtual orcus::spreadsheet::iface::import_conditional_format * get_conditional_format() override
Definition: interface.cxx:1111
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2109
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1260
virtual void commit() override
Definition: interface.cxx:1074
orcus::spreadsheet::fill_pattern_t mePattern
virtual ~ScOrcusFormula() override
Definition: interface.cxx:920
ScDocumentImport & getDoc()
Definition: interface.cxx:1091
FontStrikeout meStrikeout
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2044
ScOrcusFormula maFormula
OStringBuffer maCurSegment
ScOrcusNamedExpression(ScDocumentImport &rDoc, const ScOrcusGlobalSettings &rGS, SCTAB nTab=-1)
Definition: interface.cxx:209
ScDocumentImport & mrDoc
ScOrcusNamedExpression maNamedExpressions
ScOrcusConditionalFormat maConditionalFormat
ScOrcusSheet(ScDocumentImport &rDoc, SCTAB nTab, ScOrcusFactory &rFactory)
Definition: interface.cxx:881
ScOrcusFactory & mrFactory
virtual ~ScOrcusAutoFilter() override
Definition: interface.cxx:2171
void * p
virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override
Definition: interface.cxx:705
ScFormatEntry::Type meEntryType
virtual void set_range(const char *p, size_t n) override
Definition: interface.cxx:862
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1744
virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1059
void cellInserted()
Definition: interface.cxx:1081
ScOrcusSheet & mrSheet
cell_style maCurrentCellStyle
virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override
Definition: interface.cxx:1903
virtual size_t commit_cell_xf() override
Definition: interface.cxx:1994
ResultType type
void pushCellStoreAutoToken(const ScAddress &rPos, const OUString &rVal)
Definition: interface.cxx:531
virtual void set_result_string(size_t sindex) override
Definition: interface.cxx:946
ScOrcusFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:909
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:717
SvxCellJustifyMethod
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1924
virtual void set_icon_name(const char *p, size_t n) override
Definition: interface.cxx:768
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1566
ScOrcusGlobalSettings maGlobalSettings
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:828
virtual size_t commit_border() override
Definition: interface.cxx:1909
std::map< orcus::spreadsheet::border_direction_t, border_line > border_lines
virtual void set_font_name(const char *s, size_t n) override
Definition: interface.cxx:1583
virtual void set_origin_date(int year, int month, int day) override
Definition: interface.cxx:90
FontLineStyle
std::vector< border > maBorders
virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override
Definition: interface.cxx:1146
CellStoreToken(const ScAddress &rPos, Type eType)
Definition: interface.cxx:229
virtual void set_formula(const char *p, size_t n) override
Definition: interface.cxx:752
StringHashType maStringHash
ScOrcusStyles & mrStyles
protection maCurrentProtection
virtual void set_cell_print_content(bool b) override
Definition: interface.cxx:1930
virtual orcus::spreadsheet::iface::import_auto_filter * get_auto_filter() override
Definition: interface.cxx:1096
SvxCellJustifyMethod meHorAlignMethod
virtual void set_result_bool(bool value) override
Definition: interface.cxx:957
FontStrikeout
virtual void set_iconset_reverse(bool reverse) override
Definition: interface.cxx:817
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:774
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2125
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1252
virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override
Definition: interface.cxx:1757
ScDocumentImport & mrDoc
sal_Int16 SCTAB
Definition: types.hxx:23
std::vector< fill > maFills
virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override
Definition: interface.cxx:1054
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2029
virtual void set_min_databar_length(double length) override
Definition: interface.cxx:800