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 #pragma once
11 
12 #include <address.hxx>
13 #include <documentimport.hxx>
14 
15 #include <tools/color.hxx>
16 #include <tools/fontenum.hxx>
17 #include <editeng/svxenum.hxx>
18 
19 #include "sharedformulagroups.hxx"
20 
21 #include <conditio.hxx>
22 
23 #include <rtl/strbuf.hxx>
24 #include <editeng/borderline.hxx>
25 
26 #include <orcus/spreadsheet/import_interface.hpp>
27 
28 #include <memory>
29 #include <map>
30 #include <unordered_map>
31 #include <vector>
32 
33 class ScOrcusSheet;
34 class ScOrcusStyles;
35 class ScOrcusFactory;
36 class SfxItemSet;
37 namespace com::sun::star::task { class XStatusIndicator; }
38 
39 class ScOrcusGlobalSettings : public orcus::spreadsheet::iface::import_global_settings
40 {
43  orcus::spreadsheet::formula_grammar_t meOrcusGrammar;
44  rtl_TextEncoding mnTextEncoding;
45 
46 public:
48 
49  virtual void set_origin_date(int year, int month, int day) override;
50  virtual void set_character_set(orcus::character_set_t cs) override;
51 
52  virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override;
53  virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override;
54 
56  {
57  return meCalcGrammar;
58  }
59 
60  rtl_TextEncoding getTextEncoding() const
61  {
62  return mnTextEncoding;
63  }
64 
66  {
67  return mrDoc;
68  }
69 };
70 
71 class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_resolver
72 {
74 
75 public:
77 
78  orcus::spreadsheet::src_address_t resolve_address(const char* p, size_t n) override;
79  orcus::spreadsheet::src_range_t resolve_range(const char* p, size_t n) override;
80 };
81 
82 class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_expression
83 {
87  OUString maName;
88  OUString maExpr;
89  const SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions.
90 
91 public:
93 
94  void reset();
95 
96  virtual void set_base_position(const orcus::spreadsheet::src_address_t& pos) override;
97  virtual void set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp) override;
98  virtual void set_named_range(const char* p_name, size_t n_name, const char* p_range, size_t n_range) override;
99  virtual void commit() override;
100 };
101 
102 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
103 {
105 
106  OStringBuffer maCurSegment;
107 public:
109 
110  virtual size_t append(const char* s, size_t n) override;
111  virtual size_t add(const char* s, size_t n) override;
112 
113  virtual void set_segment_bold(bool b) override;
114  virtual void set_segment_italic(bool b) override;
115  virtual void set_segment_font(size_t font_index) override;
116  virtual void set_segment_font_name(const char* s, size_t n) override;
117  virtual void set_segment_font_size(double point) override;
118  virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha,
119  orcus::spreadsheet::color_elem_t red,
120  orcus::spreadsheet::color_elem_t green,
121  orcus::spreadsheet::color_elem_t blue) override;
122  virtual void append_segment(const char* s, size_t n) override;
123 
124  virtual size_t commit_segments() override;
125 };
126 
127 class ScOrcusConditionalFormat : public orcus::spreadsheet::iface::import_conditional_format
128 {
129 public:
131  virtual ~ScOrcusConditionalFormat() override;
132 
133  virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
134  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
135 
136  virtual void set_formula(const char* p, size_t n) override;
137 
138  virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override;
139 
140  virtual void set_date(orcus::spreadsheet::condition_date_t date) override;
141 
142  virtual void commit_condition() override;
143 
144  virtual void set_icon_name(const char* p, size_t n) override;
145 
146  virtual void set_databar_gradient(bool gradient) override;
147 
148  virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override;
149 
150  virtual void set_databar_color_positive(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
151  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
152 
153  virtual void set_databar_color_negative(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red,
154  orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
155 
156  virtual void set_min_databar_length(double length) override;
157 
158  virtual void set_max_databar_length(double length) override;
159 
160  virtual void set_show_value(bool show) override;
161 
162  virtual void set_iconset_reverse(bool reverse) override;
163 
164  virtual void set_xf_id(size_t xf) override;
165 
166  virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override;
167 
168  virtual void set_type(orcus::spreadsheet::conditional_format_t type) override;
169 
170  virtual void commit_entry() override;
171 
172  virtual void set_range(const char* p, size_t n) override;
173 
174  virtual void set_range(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
175  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end) override;
176 
177  virtual void commit_format() override;
178 
179 private:
180 
183 
184  std::unique_ptr<ScConditionalFormat> mpCurrentFormat;
185 
187 };
188 
189 class ScOrcusAutoFilter : public orcus::spreadsheet::iface::import_auto_filter
190 {
191 public:
193 
194  virtual ~ScOrcusAutoFilter() override;
195 
196  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
197 
198  virtual void set_column(orcus::spreadsheet::col_t col) override;
199 
200  virtual void append_column_match_value(const char* p, size_t n) override;
201 
202  virtual void commit_column() override;
203 
204  virtual void commit() override;
205 
206 private:
209 };
210 
211 class ScOrcusSheetProperties : public orcus::spreadsheet::iface::import_sheet_properties
212 {
215 public:
217  virtual ~ScOrcusSheetProperties() override;
218 
219  virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override;
220 
221  virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override;
222 
223  virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override;
224 
225  virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override;
226 
227  virtual void set_merge_cell_range(const orcus::spreadsheet::range_t& range) override;
228 };
229 
230 class ScOrcusFormula : public orcus::spreadsheet::iface::import_formula
231 {
232  enum class ResultType { NotSet, String, Value, Empty };
233 
234  friend class ScOrcusSheet;
235 
237 
240  OUString maFormula;
243  bool mbShared;
244 
246  size_t mnResult; // result string index.
247  double mfResult;
248 
249  void reset();
250 
251 public:
252  ScOrcusFormula( ScOrcusSheet& rSheet );
253  virtual ~ScOrcusFormula() override;
254 
255  virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
256  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
257  virtual void set_shared_formula_index(size_t index) override;
258  virtual void set_result_value(double value) override;
259  virtual void set_result_string(size_t sindex) override;
260  virtual void set_result_empty() override;
261  virtual void set_result_bool(bool value) override;
262  virtual void commit() override;
263 };
264 
265 class ScOrcusArrayFormula : public orcus::spreadsheet::iface::import_array_formula
266 {
267  friend class ScOrcusSheet;
268 
270 
273  uint32_t mnColRange;
274  uint32_t mnRowRange;
275  OUString maFormula;
277 
278  void reset();
279 
280 public:
282  virtual ~ScOrcusArrayFormula() override;
283 
284  virtual void set_range(const orcus::spreadsheet::range_t& range) override;
285  virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
286  virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
287  virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
288  virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
289  virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
290  virtual void commit() override;
291 };
292 
293 class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
294 {
295  friend class ScOrcusFormula;
296  friend class ScOrcusArrayFormula;
297 
303 
310 
312 
313  void cellInserted();
314 
316 
317 public:
318  ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
319 
320  virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override;
321  virtual orcus::spreadsheet::iface::import_table* get_table() override;
322  virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() override;
323  virtual orcus::spreadsheet::iface::import_conditional_format* get_conditional_format() override;
324  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
325  virtual orcus::spreadsheet::iface::import_formula* get_formula() override;
326  virtual orcus::spreadsheet::iface::import_array_formula* get_array_formula() override;
327 
328  // Orcus import interface
329  virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
330  virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
331  virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
332  virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
333  virtual void set_date_time(
334  orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) override;
335 
336  virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) override;
337  virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
338  orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) override;
339 
340  virtual orcus::spreadsheet::range_size_t get_sheet_size() const override;
341 
342  virtual void fill_down_cells(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::row_t range_size) override;
343 
344  SCTAB getIndex() const { return mnTab; }
345 
349 };
350 
351 class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
352 {
353 private:
355 
356  struct font
357  {
358  bool mbBold;
359  bool mbItalic;
360  OUString maName;
361  double mnSize;
363 
367 
370 
372 
373  font();
374 
375  void applyToItemSet(SfxItemSet& rSet) const;
376  };
377 
379  std::vector<font> maFonts;
380 
381  struct fill
382  {
383  orcus::spreadsheet::fill_pattern_t mePattern;
386 
388 
389  fill();
390 
391  void applyToItemSet(SfxItemSet& rSet) const;
392  };
393 
395  std::vector<fill> maFills;
396 
397  struct border
398  {
399  struct border_line
400  {
403  double mnWidth;
404 
405  border_line();
406  };
407  std::map<orcus::spreadsheet::border_direction_t, border_line> border_lines;
408 
410 
411  border();
412 
413  void applyToItemSet(SfxItemSet& rSet) const;
414  };
415 
417  std::vector<border> maBorders;
418 
419  struct protection
420  {
421  bool mbHidden;
422  bool mbLocked;
425 
427 
428  protection();
429  void applyToItemSet(SfxItemSet& rSet) const;
430  };
431 
433  std::vector<protection> maProtections;
434 
436  {
437  OUString maCode;
438 
440 
441  number_format();
442  void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
443  };
444 
446  std::vector<number_format> maNumberFormats;
447 
448  struct xf
449  {
450  size_t mnFontId;
451  size_t mnFillId;
452  size_t mnBorderId;
455  size_t mnStyleXf;
457 
462 
463  xf();
464  };
465 
467  std::vector<xf> maCellStyleXfs;
468  std::vector<xf> maCellXfs;
469 
470  struct cell_style
471  {
472  OUString maName;
473  OUString maParentName;
474  size_t mnXFId;
475  size_t mnBuiltInId;
476 
477  cell_style();
478  };
479 
481 
482  void applyXfToItemSet(SfxItemSet& rSet, const xf& rXf);
483 
484 public:
485  ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles=false );
486 
487  void applyXfToItemSet(SfxItemSet& rSet, size_t xfId);
488 
489  // font
490 
491  virtual void set_font_count(size_t n) override;
492  virtual void set_font_bold(bool b) override;
493  virtual void set_font_italic(bool b) override;
494  virtual void set_font_name(const char* s, size_t n) override;
495  virtual void set_font_size(double point) override;
496  virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
497  virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
498  virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override;
499  virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override;
500  virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
501  orcus::spreadsheet::color_elem_t red,
502  orcus::spreadsheet::color_elem_t green,
503  orcus::spreadsheet::color_elem_t blue) override;
504  virtual void set_font_color( orcus::spreadsheet::color_elem_t alpha,
505  orcus::spreadsheet::color_elem_t red,
506  orcus::spreadsheet::color_elem_t green,
507  orcus::spreadsheet::color_elem_t blue) override;
508  virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override;
509  virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override;
510  virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override;
511  virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override;
512  virtual size_t commit_font() override;
513 
514  // fill
515 
516  virtual void set_fill_count(size_t n) override;
517  virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override;
518  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;
519  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;
520  virtual size_t commit_fill() override;
521 
522  // border
523 
524  virtual void set_border_count(size_t n) override;
525 
526  virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
527  virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
528  orcus::spreadsheet::color_elem_t alpha,
529  orcus::spreadsheet::color_elem_t red,
530  orcus::spreadsheet::color_elem_t green,
531  orcus::spreadsheet::color_elem_t blue) override;
532  virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override;
533  virtual size_t commit_border() override;
534 
535  // cell protection
536  virtual void set_cell_hidden(bool b) override;
537  virtual void set_cell_locked(bool b) override;
538  virtual void set_cell_print_content(bool b) override;
539  virtual void set_cell_formula_hidden(bool b) override;
540  virtual size_t commit_cell_protection() override;
541 
542  // number format
543  virtual void set_number_format_count(size_t n) override;
544  virtual void set_number_format_identifier(size_t n) override;
545  virtual void set_number_format_code(const char* s, size_t n) override;
546  virtual size_t commit_number_format() override;
547 
548  // cell style xf
549 
550  virtual void set_cell_style_xf_count(size_t n) override;
551  virtual size_t commit_cell_style_xf() override;
552 
553  // cell xf
554 
555  virtual void set_cell_xf_count(size_t n) override;
556  virtual size_t commit_cell_xf() override;
557 
558  // dxf
559  virtual void set_dxf_count(size_t count) override;
560  virtual size_t commit_dxf() override;
561 
562  // xf (cell format) - used both by cell xf and cell style xf.
563 
564  virtual void set_xf_number_format(size_t index) override;
565  virtual void set_xf_font(size_t index) override;
566  virtual void set_xf_fill(size_t index) override;
567  virtual void set_xf_border(size_t index) override;
568  virtual void set_xf_protection(size_t index) override;
569  virtual void set_xf_style_xf(size_t index) override;
570  virtual void set_xf_apply_alignment(bool b) override;
571  virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override;
572  virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override;
573 
574  // cell style entry
575 
576  virtual void set_cell_style_count(size_t n) override;
577  virtual void set_cell_style_name(const char* s, size_t n) override;
578  virtual void set_cell_style_xf(size_t index) override;
579  virtual void set_cell_style_builtin(size_t index) override;
580  virtual void set_cell_style_parent_name(const char* s, size_t n) override;
581  virtual size_t commit_cell_style() override;
582 };
583 
584 class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory
585 {
587  {
588  enum class Type
589  {
590  Auto,
591  Numeric,
592  String,
593  Formula,
597  Matrix,
599  };
600 
603 
604  OUString maStr1;
605  OUString maStr2;
606  double mfValue;
607 
608  uint32_t mnIndex1;
609  uint32_t mnIndex2;
611 
612  CellStoreToken( const ScAddress& rPos, Type eType );
613  CellStoreToken( const ScAddress& rPos, double fValue );
614  CellStoreToken( const ScAddress& rPos, uint32_t nIndex );
615  CellStoreToken( const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
616  };
617 
618  typedef std::unordered_map<OUString, size_t> StringHashType;
619  typedef std::vector<CellStoreToken> CellStoreTokensType;
620 
622 
623  std::vector<OUString> maStrings;
624  StringHashType maStringHash;
625 
626  CellStoreTokensType maCellStoreTokens;
630  std::vector<std::unique_ptr<ScOrcusSheet>> maSheets;
632 
634 
635  css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
636 
637 public:
638  ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles=false);
639 
640  virtual orcus::spreadsheet::iface::import_sheet* append_sheet(
641  orcus::spreadsheet::sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) override;
642  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(const char *sheet_name, size_t sheet_name_length) override;
643  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(orcus::spreadsheet::sheet_t sheet_index) override;
644  virtual orcus::spreadsheet::iface::import_global_settings* get_global_settings() override;
645  virtual orcus::spreadsheet::iface::import_shared_strings* get_shared_strings() override;
646  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
647  virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
648  virtual void finalize() override;
649 
651 
652  size_t appendString(const OUString& rStr);
653  size_t addString(const OUString& rStr);
654  const OUString* getString(size_t nIndex) const;
655 
656  void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
657  void pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex );
658  void pushCellStoreToken( const ScAddress& rPos, double fValue );
659  void pushCellStoreToken(
660  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
661  void pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize );
662 
663  void pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex );
665  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar,
666  uint32_t nRowRange, uint32_t nColRange );
667 
668  void pushFormulaResult( const ScAddress& rPos, double fValue );
669  void pushFormulaResult( const ScAddress& rPos, const OUString& rValue );
670 
671  void incrementProgress();
672 
673  void setStatusIndicator(const css::uno::Reference<css::task::XStatusIndicator>& rIndicator);
674 
676 };
677 
678 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:960
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:737
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1513
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2197
virtual void set_result_empty() override
Definition: interface.cxx:978
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1657
ScOrcusFactory & mrFactory
virtual size_t append(const char *s, size_t n) override
Definition: interface.cxx:1258
virtual orcus::spreadsheet::iface::import_array_formula * get_array_formula() override
Definition: interface.cxx:1153
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:1142
virtual void commit_column() override
Definition: interface.cxx:2216
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1309
size_t appendString(const OUString &rStr)
Definition: interface.cxx:537
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1447
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:2011
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1478
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:859
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:948
virtual orcus::spreadsheet::iface::import_styles * get_styles() override
Definition: interface.cxx:398
virtual size_t commit_cell_style() override
Definition: interface.cxx:2159
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:1823
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:1805
virtual void commit() override
Definition: interface.cxx:989
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:683
ScOrcusFactory & getFactory()
Definition: interface.cxx:1250
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:2025
std::unordered_map< OUString, size_t > StringHashType
virtual size_t commit_number_format() override
Definition: interface.cxx:1987
virtual void commit_format() override
Definition: interface.cxx:901
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:1147
virtual void set_border_count(size_t n) override
Definition: interface.cxx:1841
ScOrcusArrayFormula maArrayFormula
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2056
sal_Int64 n
ScOrcusAutoFilter maAutoFilter
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1697
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2142
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:1240
ScOrcusStyles maStyles
virtual void set_number_format_code(const char *s, size_t n) override
Definition: interface.cxx:1980
virtual void set_xf_number_format(size_t index) override
Definition: interface.cxx:2036
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:783
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:832
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1593
virtual void set_number_format_count(size_t n) override
Definition: interface.cxx:1972
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2041
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:1831
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1940
rtl_TextEncoding getTextEncoding() const
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:1065
ScOrcusConditionalFormat(SCTAB nTab, ScDocument &rDoc)
Definition: interface.cxx:754
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:1302
virtual void commit() override
Definition: interface.cxx:2221
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1618
SvxBorderLineStyle
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1958
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
virtual void set_font_size(double point) override
Definition: interface.cxx:1612
virtual void set_cell_style_name(const char *s, size_t n) override
Definition: interface.cxx:2136
SvxCellVerJustify
virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override
Definition: interface.cxx:1692
formula::FormulaGrammar::Grammar meCalcGrammar
virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override
Definition: interface.cxx:772
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:2046
virtual void set_cell_style_parent_name(const char *s, size_t n) override
Definition: interface.cxx:2153
length
virtual size_t add(const char *s, size_t n) override
Definition: interface.cxx:1264
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1166
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:849
virtual void append_column_match_value(const char *p, size_t n) override
Definition: interface.cxx:2210
SvxCellJustifyMethod meVerAlignMethod
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1795
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:1735
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:819
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:1815
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:1297
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:762
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:2099
std::vector< xf > maCellXfs
virtual orcus::spreadsheet::range_size_t get_sheet_size() const override
Definition: interface.cxx:1225
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:1178
virtual void commit_entry() override
Definition: interface.cxx:883
virtual size_t commit_dxf() override
Definition: interface.cxx:2029
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1810
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:1127
std::vector< number_format > maNumberFormats
virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:1090
virtual void set_font_italic(bool b) override
Definition: interface.cxx:1599
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:806
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2188
sal_Int16 SCCOL
Definition: types.hxx:21
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:812
SCTAB getIndex() const
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:1074
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:954
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:1184
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:1717
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:766
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1846
virtual void set_result_value(double value) override
Definition: interface.cxx:966
virtual void set_show_value(bool show) override
Definition: interface.cxx:838
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:1159
ScDocumentImport & getDoc() const
virtual void commit_condition() override
Definition: interface.cxx:789
virtual orcus::spreadsheet::iface::import_sheet_properties * get_sheet_properties() override
Definition: interface.cxx:1132
virtual void set_number_format_identifier(size_t n) override
Definition: interface.cxx:1976
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:1386
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:1915
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1407
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:725
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:749
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:1357
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1063
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:659
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1964
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:1997
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:1290
virtual void set_xf_style_xf(size_t index) override
Definition: interface.cxx:2061
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2070
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:1095
std::vector< std::unique_ptr< ScOrcusSheet > > maSheets
formula::FormulaGrammar::Grammar meGrammar
virtual void set_segment_bold(bool b) override
Definition: interface.cxx:1274
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:1234
virtual void set_column(orcus::spreadsheet::col_t col) override
Definition: interface.cxx:2205
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:567
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1255
virtual void set_segment_font_name(const char *s, size_t n) override
Definition: interface.cxx:1282
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1739
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:2002
number_format maCurrentNumberFormat
virtual void set_segment_font(size_t font_index) override
Definition: interface.cxx:1270
void setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &rIndicator)
Definition: interface.cxx:678
sal_Int32 SCROW
Definition: types.hxx:17
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:1725
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1055
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:1137
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2131
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1286
virtual void commit() override
Definition: interface.cxx:1100
orcus::spreadsheet::fill_pattern_t mePattern
virtual ~ScOrcusFormula() override
Definition: interface.cxx:946
ScDocumentImport & getDoc()
Definition: interface.cxx:1117
FontStrikeout meStrikeout
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2066
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:907
ScOrcusFactory & mrFactory
virtual ~ScOrcusAutoFilter() override
Definition: interface.cxx:2193
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:731
ScFormatEntry::Type meEntryType
virtual void set_range(const char *p, size_t n) override
Definition: interface.cxx:888
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1766
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:1085
void cellInserted()
Definition: interface.cxx:1107
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:1925
virtual size_t commit_cell_xf() override
Definition: interface.cxx:2016
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:972
ScOrcusFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:935
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:743
SvxCellJustifyMethod
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1946
virtual void set_icon_name(const char *p, size_t n) override
Definition: interface.cxx:794
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1588
ScOrcusGlobalSettings maGlobalSettings
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:854
virtual size_t commit_border() override
Definition: interface.cxx:1931
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:1605
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:1172
CellStoreToken(const ScAddress &rPos, Type eType)
Definition: interface.cxx:259
virtual void set_formula(const char *p, size_t n) override
Definition: interface.cxx:778
StringHashType maStringHash
ScOrcusStyles & mrStyles
protection maCurrentProtection
virtual void set_cell_print_content(bool b) override
Definition: interface.cxx:1952
virtual orcus::spreadsheet::iface::import_auto_filter * get_auto_filter() override
Definition: interface.cxx:1122
SvxCellJustifyMethod meHorAlignMethod
virtual void set_result_bool(bool value) override
Definition: interface.cxx:983
FontStrikeout
virtual void set_iconset_reverse(bool reverse) override
Definition: interface.cxx:843
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:800
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2147
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1278
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:1779
ScDocumentImport & mrDoc
sal_Int16 SCTAB
Definition: types.hxx:22
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:1080
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2051
virtual void set_min_databar_length(double length) override
Definition: interface.cxx:826