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 
67  {
68  return mrDoc;
69  }
70 };
71 
72 class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_resolver
73 {
75 
76 public:
78 
79  orcus::spreadsheet::src_address_t resolve_address(const char* p, size_t n) override;
80  orcus::spreadsheet::src_range_t resolve_range(const char* p, size_t n) override;
81 };
82 
83 class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_expression
84 {
88  OUString maName;
89  OUString maExpr;
90  const SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions.
91 
92 public:
94 
95  void reset();
96 
97  virtual void set_base_position(const orcus::spreadsheet::src_address_t& pos) override;
98  virtual void set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override;
99  virtual void set_named_range(const char* p_name, size_t n_name, const char* p_range, size_t n_range) override;
100  virtual void commit() override;
101 };
102 
103 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
104 {
106 
107  OStringBuffer maCurSegment;
108 public:
110 
111  virtual size_t append(const char* s, size_t n) override;
112  virtual size_t add(const char* s, size_t n) override;
113 
114  virtual void set_segment_bold(bool b) override;
115  virtual void set_segment_italic(bool b) override;
116  virtual void set_segment_font(size_t font_index) override;
117  virtual void set_segment_font_name(const char* s, size_t n) override;
118  virtual void set_segment_font_size(double point) override;
119  virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha,
120  orcus::spreadsheet::color_elem_t red,
121  orcus::spreadsheet::color_elem_t green,
122  orcus::spreadsheet::color_elem_t blue) override;
123  virtual void append_segment(const char* s, size_t n) override;
124 
125  virtual size_t commit_segments() override;
126 };
127 
128 class ScOrcusConditionalFormat : public orcus::spreadsheet::iface::import_conditional_format
129 {
130 public:
132  virtual ~ScOrcusConditionalFormat() override;
133 
134  virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
135  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
136 
137  virtual void set_formula(const char* p, size_t n) override;
138 
139  virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override;
140 
141  virtual void set_date(orcus::spreadsheet::condition_date_t date) override;
142 
143  virtual void commit_condition() override;
144 
145  virtual void set_icon_name(const char* p, size_t n) override;
146 
147  virtual void set_databar_gradient(bool gradient) override;
148 
149  virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override;
150 
151  virtual void set_databar_color_positive(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
152  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
153 
154  virtual void set_databar_color_negative(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
155  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
156 
157  virtual void set_min_databar_length(double length) override;
158 
159  virtual void set_max_databar_length(double length) override;
160 
161  virtual void set_show_value(bool show) override;
162 
163  virtual void set_iconset_reverse(bool reverse) override;
164 
165  virtual void set_xf_id(size_t xf) override;
166 
167  virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override;
168 
169  virtual void set_type(orcus::spreadsheet::conditional_format_t type) override;
170 
171  virtual void commit_entry() override;
172 
173  virtual void set_range(const char* p, size_t n) override;
174 
175  virtual void set_range(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
176  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end) override;
177 
178  virtual void commit_format() override;
179 
180 private:
181 
184 
185  std::unique_ptr<ScConditionalFormat> mpCurrentFormat;
186 
188 };
189 
190 class ScOrcusAutoFilter : public orcus::spreadsheet::iface::import_auto_filter
191 {
192 public:
194 
195  virtual ~ScOrcusAutoFilter() override;
196 
197  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
198 
199  virtual void set_column(orcus::spreadsheet::col_t col) override;
200 
201  virtual void append_column_match_value(const char* p, size_t n) override;
202 
203  virtual void commit_column() override;
204 
205  virtual void commit() override;
206 
207 private:
210 };
211 
212 class ScOrcusSheetProperties : public orcus::spreadsheet::iface::import_sheet_properties
213 {
216 public:
218  virtual ~ScOrcusSheetProperties() override;
219 
220  virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override;
221 
222  virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override;
223 
224  virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override;
225 
226  virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override;
227 
228  virtual void set_merge_cell_range(const orcus::spreadsheet::range_t& range) override;
229 };
230 
231 class ScOrcusFormula : public orcus::spreadsheet::iface::import_formula
232 {
233  enum class ResultType { NotSet, String, Value, Empty };
234 
235  friend class ScOrcusSheet;
236 
238 
241  OUString maFormula;
244  bool mbShared;
245 
247  size_t mnResult; // result string index.
248  double mfResult;
249 
250  void reset();
251 
252 public:
253  ScOrcusFormula( ScOrcusSheet& rSheet );
254  virtual ~ScOrcusFormula() override;
255 
256  virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
257  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
258  virtual void set_shared_formula_index(size_t index) override;
259  virtual void set_result_value(double value) override;
260  virtual void set_result_string(size_t sindex) override;
261  virtual void set_result_empty() override;
262  virtual void set_result_bool(bool value) override;
263  virtual void commit() override;
264 };
265 
266 class ScOrcusArrayFormula : public orcus::spreadsheet::iface::import_array_formula
267 {
268  friend class ScOrcusSheet;
269 
271 
274  uint32_t mnColRange;
275  uint32_t mnRowRange;
276  OUString maFormula;
278 
279  void reset();
280 
281 public:
283  virtual ~ScOrcusArrayFormula() override;
284 
285  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
286  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
287  virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
288  virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
289  virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
290  virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
291  virtual void commit() override;
292 };
293 
294 class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
295 {
296  friend class ScOrcusFormula;
297  friend class ScOrcusArrayFormula;
298 
304 
311 
313 
314  void cellInserted();
315 
317 
318 public:
319  ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
320 
321  virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override;
322  virtual orcus::spreadsheet::iface::import_table* get_table() override;
323  virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() override;
324  virtual orcus::spreadsheet::iface::import_conditional_format* get_conditional_format() override;
325  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
326  virtual orcus::spreadsheet::iface::import_formula* get_formula() override;
327  virtual orcus::spreadsheet::iface::import_array_formula* get_array_formula() override;
328 
329  // Orcus import interface
330  virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
331  virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
332  virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
333  virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
334  virtual void set_date_time(
335  orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) override;
336 
337  virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) override;
338  virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
339  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) override;
340 
341  virtual orcus::spreadsheet::range_size_t get_sheet_size() const override;
342 
343  virtual void fill_down_cells(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::row_t range_size) override;
344 
345  SCTAB getIndex() const { return mnTab; }
346 
350 };
351 
352 class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
353 {
354 private:
356 
357  struct font
358  {
359  bool mbBold;
360  bool mbItalic;
361  OUString maName;
362  double mnSize;
364 
368 
371 
373 
374  font();
375 
376  void applyToItemSet(SfxItemSet& rSet) const;
377  };
378 
380  std::vector<font> maFonts;
381 
382  struct fill
383  {
384  orcus::spreadsheet::fill_pattern_t mePattern;
387 
389 
390  fill();
391 
392  void applyToItemSet(SfxItemSet& rSet) const;
393  };
394 
396  std::vector<fill> maFills;
397 
398  struct border
399  {
400  struct border_line
401  {
404  double mnWidth;
405 
406  border_line();
407  };
408  std::map<orcus::spreadsheet::border_direction_t, border_line> border_lines;
409 
411 
412  border();
413 
414  void applyToItemSet(SfxItemSet& rSet) const;
415  };
416 
418  std::vector<border> maBorders;
419 
420  struct protection
421  {
422  bool mbHidden;
423  bool mbLocked;
426 
428 
429  protection();
430  void applyToItemSet(SfxItemSet& rSet) const;
431  };
432 
434  std::vector<protection> maProtections;
435 
437  {
438  OUString maCode;
439 
441 
442  number_format();
443  void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
444  };
445 
447  std::vector<number_format> maNumberFormats;
448 
449  struct xf
450  {
451  size_t mnFontId;
452  size_t mnFillId;
453  size_t mnBorderId;
456  size_t mnStyleXf;
458 
463 
464  xf();
465  };
466 
468  std::vector<xf> maCellStyleXfs;
469  std::vector<xf> maCellXfs;
470 
471  struct cell_style
472  {
473  OUString maName;
474  OUString maParentName;
475  size_t mnXFId;
476  size_t mnBuiltInId;
477 
478  cell_style();
479  };
480 
482 
483  void applyXfToItemSet(SfxItemSet& rSet, const xf& rXf);
484 
485 public:
486  ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles=false );
487 
488  void applyXfToItemSet(SfxItemSet& rSet, size_t xfId);
489 
490  // font
491 
492  virtual void set_font_count(size_t n) override;
493  virtual void set_font_bold(bool b) override;
494  virtual void set_font_italic(bool b) override;
495  virtual void set_font_name(const char* s, size_t n) override;
496  virtual void set_font_size(double point) override;
497  virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
498  virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
499  virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override;
500  virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override;
501  virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
502  orcus::spreadsheet::color_elem_t red,
503  orcus::spreadsheet::color_elem_t green,
504  orcus::spreadsheet::color_elem_t blue) override;
505  virtual void set_font_color( orcus::spreadsheet::color_elem_t alpha,
506  orcus::spreadsheet::color_elem_t red,
507  orcus::spreadsheet::color_elem_t green,
508  orcus::spreadsheet::color_elem_t blue) override;
509  virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override;
510  virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override;
511  virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override;
512  virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override;
513  virtual size_t commit_font() override;
514 
515  // fill
516 
517  virtual void set_fill_count(size_t n) override;
518  virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override;
519  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;
520  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;
521  virtual size_t commit_fill() override;
522 
523  // border
524 
525  virtual void set_border_count(size_t n) override;
526 
527  virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
528  virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
529  orcus::spreadsheet::color_elem_t alpha,
530  orcus::spreadsheet::color_elem_t red,
531  orcus::spreadsheet::color_elem_t green,
532  orcus::spreadsheet::color_elem_t blue) override;
533  virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override;
534  virtual size_t commit_border() override;
535 
536  // cell protection
537  virtual void set_cell_hidden(bool b) override;
538  virtual void set_cell_locked(bool b) override;
539  virtual void set_cell_print_content(bool b) override;
540  virtual void set_cell_formula_hidden(bool b) override;
541  virtual size_t commit_cell_protection() override;
542 
543  // number format
544  virtual void set_number_format_count(size_t n) override;
545  virtual void set_number_format_identifier(size_t n) override;
546  virtual void set_number_format_code(const char* s, size_t n) override;
547  virtual size_t commit_number_format() override;
548 
549  // cell style xf
550 
551  virtual void set_cell_style_xf_count(size_t n) override;
552  virtual size_t commit_cell_style_xf() override;
553 
554  // cell xf
555 
556  virtual void set_cell_xf_count(size_t n) override;
557  virtual size_t commit_cell_xf() override;
558 
559  // dxf
560  virtual void set_dxf_count(size_t count) override;
561  virtual size_t commit_dxf() override;
562 
563  // xf (cell format) - used both by cell xf and cell style xf.
564 
565  virtual void set_xf_number_format(size_t index) override;
566  virtual void set_xf_font(size_t index) override;
567  virtual void set_xf_fill(size_t index) override;
568  virtual void set_xf_border(size_t index) override;
569  virtual void set_xf_protection(size_t index) override;
570  virtual void set_xf_style_xf(size_t index) override;
571  virtual void set_xf_apply_alignment(bool b) override;
572  virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override;
573  virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override;
574 
575  // cell style entry
576 
577  virtual void set_cell_style_count(size_t n) override;
578  virtual void set_cell_style_name(const char* s, size_t n) override;
579  virtual void set_cell_style_xf(size_t index) override;
580  virtual void set_cell_style_builtin(size_t index) override;
581  virtual void set_cell_style_parent_name(const char* s, size_t n) override;
582  virtual size_t commit_cell_style() override;
583 };
584 
585 class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory
586 {
588  {
589  enum class Type
590  {
591  Auto,
592  Numeric,
593  String,
594  Formula,
598  Matrix,
600  };
601 
604 
605  OUString maStr1;
606  OUString maStr2;
607  double mfValue;
608 
609  uint32_t mnIndex1;
610  uint32_t mnIndex2;
612 
613  CellStoreToken( const ScAddress& rPos, Type eType );
614  CellStoreToken( const ScAddress& rPos, double fValue );
615  CellStoreToken( const ScAddress& rPos, uint32_t nIndex );
616  CellStoreToken( const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
617  };
618 
619  typedef std::unordered_map<OUString, size_t> StringHashType;
620  typedef std::vector<CellStoreToken> CellStoreTokensType;
621 
623 
624  std::vector<OUString> maStrings;
625  StringHashType maStringHash;
626 
627  CellStoreTokensType maCellStoreTokens;
631  std::vector<std::unique_ptr<ScOrcusSheet>> maSheets;
633 
635 
636  css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
637 
638 public:
639  ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles=false);
640 
641  virtual orcus::spreadsheet::iface::import_sheet* append_sheet(
642  orcus::spreadsheet::sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) override;
643  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(const char *sheet_name, size_t sheet_name_length) override;
644  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(orcus::spreadsheet::sheet_t sheet_index) override;
645  virtual orcus::spreadsheet::iface::import_global_settings* get_global_settings() override;
646  virtual orcus::spreadsheet::iface::import_shared_strings* get_shared_strings() override;
647  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
648  virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
649  virtual void finalize() override;
650 
652 
653  size_t appendString(const OUString& rStr);
654  size_t addString(const OUString& rStr);
655  const OUString* getString(size_t nIndex) const;
656 
657  void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
658  void pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex );
659  void pushCellStoreToken( const ScAddress& rPos, double fValue );
660  void pushCellStoreToken(
661  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
662  void pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize );
663 
664  void pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex );
666  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar,
667  uint32_t nRowRange, uint32_t nColRange );
668 
669  void pushFormulaResult( const ScAddress& rPos, double fValue );
670  void pushFormulaResult( const ScAddress& rPos, const OUString& rValue );
671 
672  void incrementProgress();
673 
674  void setStatusIndicator(const css::uno::Reference<css::task::XStatusIndicator>& rIndicator);
675 
677 };
678 
679 #endif
680 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:964
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:741
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1521
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2205
virtual void set_result_empty() override
Definition: interface.cxx:982
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1665
ScOrcusFactory & mrFactory
virtual size_t append(const char *s, size_t n) override
Definition: interface.cxx:1262
virtual orcus::spreadsheet::iface::import_array_formula * get_array_formula() override
Definition: interface.cxx:1157
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:1146
virtual void commit_column() override
Definition: interface.cxx:2224
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1313
size_t appendString(const OUString &rStr)
Definition: interface.cxx:537
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1455
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:2019
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1486
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:863
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:952
virtual orcus::spreadsheet::iface::import_styles * get_styles() override
Definition: interface.cxx:398
virtual size_t commit_cell_style() override
Definition: interface.cxx:2167
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:1831
virtual orcus::spreadsheet::iface::import_global_settings * get_global_settings() override
Definition: interface.cxx:383
virtual void set_base_position(const orcus::spreadsheet::src_address_t &pos) override
Definition: interface.cxx:226
virtual void set_fill_count(size_t n) override
Definition: interface.cxx:1813
virtual void commit() override
Definition: interface.cxx:993
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:683
ScOrcusFactory & getFactory()
Definition: interface.cxx:1254
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:2033
std::unordered_map< OUString, size_t > StringHashType
virtual size_t commit_number_format() override
Definition: interface.cxx:1995
virtual void commit_format() override
Definition: interface.cxx:905
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:1151
virtual void set_border_count(size_t n) override
Definition: interface.cxx:1849
ScOrcusArrayFormula maArrayFormula
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2064
sal_Int64 n
ScOrcusAutoFilter maAutoFilter
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1705
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2150
formula::FormulaGrammar::Grammar getCalcGrammar() const
virtual void commit() override
Definition: interface.cxx:244
virtual void finalize() override
Definition: interface.cxx:403
ScOrcusFactory(ScDocument &rDoc, bool bSkipDefaultStyles=false)
Definition: interface.cxx:301
const OUString * getString(size_t nIndex) const
Definition: interface.cxx:556
const sc::SharedFormulaGroups & getSharedFormulaGroups() const
Definition: interface.cxx:1244
ScOrcusStyles maStyles
virtual void set_number_format_code(const char *s, size_t n) override
Definition: interface.cxx:1988
virtual void set_xf_number_format(size_t index) override
Definition: interface.cxx:2044
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:787
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:836
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1601
virtual void set_number_format_count(size_t n) override
Definition: interface.cxx:1980
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2049
void pushFillDownCellsToken(const ScAddress &rPos, uint32_t nFillSize)
Definition: interface.cxx:583
formula::FormulaGrammar::Grammar meGrammar
ScOrcusNamedExpression maNamedExpressions
virtual size_t commit_fill() override
Definition: interface.cxx:1839
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1948
rtl_TextEncoding getTextEncoding() const
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:1069
ScOrcusConditionalFormat(SCTAB nTab, ScDocument &rDoc)
Definition: interface.cxx:758
virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override
Definition: interface.cxx:154
virtual size_t commit_segments() override
Definition: interface.cxx:1306
virtual void commit() override
Definition: interface.cxx:2229
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1626
SvxBorderLineStyle
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1966
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
virtual void set_font_size(double point) override
Definition: interface.cxx:1620
virtual void set_cell_style_name(const char *s, size_t n) override
Definition: interface.cxx:2144
SvxCellVerJustify
virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override
Definition: interface.cxx:1700
formula::FormulaGrammar::Grammar meCalcGrammar
virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override
Definition: interface.cxx:776
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:309
ScDocumentImport & getDoc()
Definition: interface.cxx:532
virtual void set_xf_fill(size_t index) override
Definition: interface.cxx:2054
virtual void set_cell_style_parent_name(const char *s, size_t n) override
Definition: interface.cxx:2161
length
virtual size_t add(const char *s, size_t n) override
Definition: interface.cxx:1268
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1170
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:853
virtual void append_column_match_value(const char *p, size_t n) override
Definition: interface.cxx:2218
SvxCellJustifyMethod meVerAlignMethod
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1803
size_t addString(const OUString &rStr)
Definition: interface.cxx:546
virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override
Definition: interface.cxx:1743
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:823
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:1823
std::vector< protection > maProtections
ScOrcusRefResolver(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:159
virtual void append_segment(const char *s, size_t n) override
Definition: interface.cxx:1301
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:766
void pushSharedFormulaToken(const ScAddress &rPos, uint32_t nIndex)
Definition: interface.cxx:589
virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override
Definition: interface.cxx:2107
std::vector< xf > maCellXfs
virtual orcus::spreadsheet::range_size_t get_sheet_size() const override
Definition: interface.cxx:1229
virtual void set_character_set(orcus::character_set_t cs) override
Definition: interface.cxx:96
void pushFormulaResult(const ScAddress &rPos, double fValue)
Definition: interface.cxx:607
ScDocumentImport & mrDoc
virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1182
virtual void commit_entry() override
Definition: interface.cxx:887
virtual size_t commit_dxf() override
Definition: interface.cxx:2037
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1818
void pushMatrixFormulaToken(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, uint32_t nRowRange, uint32_t nColRange)
Definition: interface.cxx:595
ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport &rDoc)
Definition: interface.cxx:688
ScOrcusFactory & mrFactory
virtual orcus::spreadsheet::iface::import_table * get_table() override
Definition: interface.cxx:1131
std::vector< number_format > maNumberFormats
virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:1094
virtual void set_font_italic(bool b) override
Definition: interface.cxx:1607
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:810
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2196
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:816
SCTAB getIndex() const
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:1078
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:958
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:1188
virtual orcus::spreadsheet::iface::import_shared_strings * get_shared_strings() override
Definition: interface.cxx:388
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:1725
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:770
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1854
virtual void set_result_value(double value) override
Definition: interface.cxx:970
virtual void set_show_value(bool show) override
Definition: interface.cxx:842
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:1163
ScDocumentImport & getDoc() const
virtual void commit_condition() override
Definition: interface.cxx:793
virtual orcus::spreadsheet::iface::import_sheet_properties * get_sheet_properties() override
Definition: interface.cxx:1136
virtual void set_number_format_identifier(size_t n) override
Definition: interface.cxx:1984
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:346
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1390
ScOrcusGlobalSettings(ScDocumentImport &rDoc)
Definition: interface.cxx:83
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:1923
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1411
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:729
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:753
virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override
Definition: interface.cxx:148
std::vector< xf > maCellStyleXfs
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1361
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1067
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:659
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1972
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:2005
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:1294
virtual void set_xf_style_xf(size_t index) override
Definition: interface.cxx:2069
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2078
FontLineStyle meUnderline
virtual ~ScOrcusSheetProperties() override
Definition: interface.cxx:694
virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1099
std::vector< std::unique_ptr< ScOrcusSheet > > maSheets
formula::FormulaGrammar::Grammar meGrammar
virtual void set_segment_bold(bool b) override
Definition: interface.cxx:1278
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:1238
virtual void set_column(orcus::spreadsheet::col_t col) override
Definition: interface.cxx:2213
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:567
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1259
virtual void set_segment_font_name(const char *s, size_t n) override
Definition: interface.cxx:1286
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1747
ScDocumentImport & mrDoc
virtual void set_named_range(const char *p_name, size_t n_name, const char *p_range, size_t n_range) override
Definition: interface.cxx:239
virtual size_t commit_cell_style_xf() override
Definition: interface.cxx:2010
number_format maCurrentNumberFormat
virtual void set_segment_font(size_t font_index) override
Definition: interface.cxx:1274
void setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &rIndicator)
Definition: interface.cxx:678
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:1733
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1059
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:393
const ScOrcusGlobalSettings & mrGlobalSettings
virtual orcus::spreadsheet::iface::import_conditional_format * get_conditional_format() override
Definition: interface.cxx:1141
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2139
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1290
virtual void commit() override
Definition: interface.cxx:1104
orcus::spreadsheet::fill_pattern_t mePattern
virtual ~ScOrcusFormula() override
Definition: interface.cxx:950
ScDocumentImport & getDoc()
Definition: interface.cxx:1121
FontStrikeout meStrikeout
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2074
ScOrcusFormula maFormula
OStringBuffer maCurSegment
ScOrcusNamedExpression(ScDocumentImport &rDoc, const ScOrcusGlobalSettings &rGS, SCTAB nTab=-1)
Definition: interface.cxx:213
ScDocumentImport & mrDoc
ScOrcusNamedExpression maNamedExpressions
ScOrcusConditionalFormat maConditionalFormat
ScOrcusSheet(ScDocumentImport &rDoc, SCTAB nTab, ScOrcusFactory &rFactory)
Definition: interface.cxx:911
ScOrcusFactory & mrFactory
virtual ~ScOrcusAutoFilter() override
Definition: interface.cxx:2201
void * p
orcus::spreadsheet::src_range_t resolve_range(const char *p, size_t n) override
Definition: interface.cxx:186
virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override
Definition: interface.cxx:735
ScFormatEntry::Type meEntryType
virtual void set_range(const char *p, size_t n) override
Definition: interface.cxx:892
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1774
orcus::spreadsheet::src_address_t resolve_address(const char *p, size_t n) override
Definition: interface.cxx:162
virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1089
void cellInserted()
Definition: interface.cxx:1111
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:1933
virtual size_t commit_cell_xf() override
Definition: interface.cxx:2024
ResultType type
void pushCellStoreAutoToken(const ScAddress &rPos, const OUString &rVal)
Definition: interface.cxx:561
virtual void set_result_string(size_t sindex) override
Definition: interface.cxx:976
ScOrcusFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:939
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:747
SvxCellJustifyMethod
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1954
virtual void set_icon_name(const char *p, size_t n) override
Definition: interface.cxx:798
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1596
ScOrcusGlobalSettings maGlobalSettings
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:858
virtual size_t commit_border() override
Definition: interface.cxx:1939
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:1613
virtual void set_origin_date(int year, int month, int day) override
Definition: interface.cxx:91
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:1176
CellStoreToken(const ScAddress &rPos, Type eType)
Definition: interface.cxx:259
virtual void set_formula(const char *p, size_t n) override
Definition: interface.cxx:782
StringHashType maStringHash
ScOrcusStyles & mrStyles
protection maCurrentProtection
virtual void set_cell_print_content(bool b) override
Definition: interface.cxx:1960
virtual orcus::spreadsheet::iface::import_auto_filter * get_auto_filter() override
Definition: interface.cxx:1126
SvxCellJustifyMethod meHorAlignMethod
virtual void set_result_bool(bool value) override
Definition: interface.cxx:987
FontStrikeout
virtual void set_iconset_reverse(bool reverse) override
Definition: interface.cxx:847
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:804
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2155
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1282
virtual void set_named_expression(const char *p_name, size_t n_name, const char *p_exp, size_t n_exp) override
Definition: interface.cxx:233
virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override
Definition: interface.cxx:1787
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:1084
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2059
virtual void set_min_databar_length(double length) override
Definition: interface.cxx:830