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(std::string_view address) override;
79  orcus::spreadsheet::src_range_t resolve_range(std::string_view range) 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(std::string_view name, std::string_view expression) override;
98  virtual void set_named_range(std::string_view name, std::string_view 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(std::string_view s) override;
111  virtual size_t add(std::string_view s) 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(std::string_view s) 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(std::string_view s) 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(std::string_view formula) 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(std::string_view name) 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(std::string_view range) 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(std::string_view value) 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  OUString maResult; // result string.
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, std::string_view formula) 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(std::string_view value) 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, std::string_view formula) 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, std::string_view value) 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, std::string_view value) override;
330  virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::string_id_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  std::optional<OUString> maName;
359  std::optional<double> mnSize;
360  std::optional<Color> maColor;
361  std::optional<bool> mbBold;
362  std::optional<bool> mbItalic;
363  std::optional<FontLineStyle> meUnderline;
364  std::optional<Color> maUnderlineColor;
365  std::optional<FontStrikeout> meStrikeout;
366 
367  void applyToItemSet(SfxItemSet& rSet) const;
368  };
369 
371  std::vector<font> maFonts;
372 
373  struct fill
374  {
375  std::optional<orcus::spreadsheet::fill_pattern_t> mePattern;
376  std::optional<Color> maFgColor;
377  std::optional<Color> maBgColor; // currently not used.
378 
379  void applyToItemSet(SfxItemSet& rSet) const;
380  };
381 
383  std::vector<fill> maFills;
384 
385  struct border
386  {
387  struct border_line
388  {
389  std::optional<SvxBorderLineStyle> meStyle;
390  std::optional<Color> maColor;
391  std::optional<double> mnWidth;
392  };
393 
394  std::map<orcus::spreadsheet::border_direction_t, border_line> maBorders;
395 
396  void applyToItemSet(SfxItemSet& rSet) const;
397  };
398 
400  std::vector<border> maBorders;
401 
402  struct protection
403  {
404  std::optional<bool> mbLocked;
405  std::optional<bool> mbHidden;
406  std::optional<bool> mbPrintContent;
407  std::optional<bool> mbFormulaHidden;
408 
409  void applyToItemSet(SfxItemSet& rSet) const;
410  };
411 
413  std::vector<protection> maProtections;
414 
416  {
417  std::optional<OUString> maCode;
418 
419  void applyToItemSet(SfxItemSet& rSet, const ScDocument& rDoc) const;
420  };
421 
423  std::vector<number_format> maNumberFormats;
424 
425  struct xf
426  {
427  size_t mnFontId;
428  size_t mnFillId;
429  size_t mnBorderId;
432  size_t mnStyleXf;
434 
439 
440  xf();
441  };
442 
444  std::vector<xf> maCellStyleXfs;
445  std::vector<xf> maCellXfs;
446 
447  struct cell_style
448  {
449  OUString maName;
450  OUString maParentName;
451  size_t mnXFId;
452  size_t mnBuiltInId;
453 
454  cell_style();
455  };
456 
458 
459  void applyXfToItemSet(SfxItemSet& rSet, const xf& rXf);
460 
461 public:
462  ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles=false );
463 
464  void applyXfToItemSet(SfxItemSet& rSet, size_t xfId);
465 
466  // font
467 
468  virtual void set_font_count(size_t n) override;
469  virtual void set_font_bold(bool b) override;
470  virtual void set_font_italic(bool b) override;
471  virtual void set_font_name(std::string_view name) override;
472  virtual void set_font_size(double point) override;
473  virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
474  virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
475  virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override;
476  virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override;
477  virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
478  orcus::spreadsheet::color_elem_t red,
479  orcus::spreadsheet::color_elem_t green,
480  orcus::spreadsheet::color_elem_t blue) override;
481  virtual void set_font_color( orcus::spreadsheet::color_elem_t alpha,
482  orcus::spreadsheet::color_elem_t red,
483  orcus::spreadsheet::color_elem_t green,
484  orcus::spreadsheet::color_elem_t blue) override;
485  virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override;
486  virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override;
487  virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override;
488  virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override;
489  virtual size_t commit_font() override;
490 
491  // fill
492 
493  virtual void set_fill_count(size_t n) override;
494  virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override;
495  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;
496  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;
497  virtual size_t commit_fill() override;
498 
499  // border
500 
501  virtual void set_border_count(size_t n) override;
502 
503  virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
504  virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
505  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_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override;
510  virtual size_t commit_border() override;
511 
512  // cell protection
513  virtual void set_cell_hidden(bool b) override;
514  virtual void set_cell_locked(bool b) override;
515  virtual void set_cell_print_content(bool b) override;
516  virtual void set_cell_formula_hidden(bool b) override;
517  virtual size_t commit_cell_protection() override;
518 
519  // number format
520  virtual void set_number_format_count(size_t n) override;
521  virtual void set_number_format_identifier(size_t n) override;
522  virtual void set_number_format_code(std::string_view s) override;
523  virtual size_t commit_number_format() override;
524 
525  // cell style xf
526 
527  virtual void set_cell_style_xf_count(size_t n) override;
528  virtual size_t commit_cell_style_xf() override;
529 
530  // cell xf
531 
532  virtual void set_cell_xf_count(size_t n) override;
533  virtual size_t commit_cell_xf() override;
534 
535  // dxf
536  virtual void set_dxf_count(size_t count) override;
537  virtual size_t commit_dxf() override;
538 
539  // xf (cell format) - used both by cell xf and cell style xf.
540 
541  virtual void set_xf_number_format(size_t index) override;
542  virtual void set_xf_font(size_t index) override;
543  virtual void set_xf_fill(size_t index) override;
544  virtual void set_xf_border(size_t index) override;
545  virtual void set_xf_protection(size_t index) override;
546  virtual void set_xf_style_xf(size_t index) override;
547  virtual void set_xf_apply_alignment(bool b) override;
548  virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override;
549  virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override;
550 
551  // cell style entry
552 
553  virtual void set_cell_style_count(size_t n) override;
554  virtual void set_cell_style_name(std::string_view name) override;
555  virtual void set_cell_style_xf(size_t index) override;
556  virtual void set_cell_style_builtin(size_t index) override;
557  virtual void set_cell_style_parent_name(std::string_view name) override;
558  virtual size_t commit_cell_style() override;
559 };
560 
561 class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory
562 {
564  {
565  enum class Type : sal_uInt8
566  {
567  Auto,
568  Numeric,
569  String,
570  Formula,
574  Matrix,
576  };
577 
578 
579  OUString maStr1;
580  OUString maStr2;
581  double mfValue;
582 
585 
586  uint32_t mnIndex1;
587  uint32_t mnIndex2;
589 
590  CellStoreToken( const ScAddress& rPos, Type eType );
591  CellStoreToken( const ScAddress& rPos, double fValue );
592  CellStoreToken( const ScAddress& rPos, uint32_t nIndex );
593  CellStoreToken( const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
594  };
595 
596  typedef std::unordered_map<OUString, size_t> StringHashType;
597  typedef std::vector<CellStoreToken> CellStoreTokensType;
598 
600 
601  std::vector<OUString> maStrings;
602  StringHashType maStringHash;
603 
604  CellStoreTokensType maCellStoreTokens;
608  std::vector<std::unique_ptr<ScOrcusSheet>> maSheets;
610 
612 
613  css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
614 
615 public:
616  ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles=false);
617 
618  virtual orcus::spreadsheet::iface::import_sheet* append_sheet(
619  orcus::spreadsheet::sheet_t sheet_index, std::string_view sheet_name) override;
620  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(std::string_view sheet_name) override;
621  virtual orcus::spreadsheet::iface::import_sheet* get_sheet(orcus::spreadsheet::sheet_t sheet_index) override;
622  virtual orcus::spreadsheet::iface::import_global_settings* get_global_settings() override;
623  virtual orcus::spreadsheet::iface::import_shared_strings* get_shared_strings() override;
624  virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
625  virtual orcus::spreadsheet::iface::import_styles* get_styles() override;
626  virtual void finalize() override;
627 
629 
630  size_t appendString(const OUString& rStr);
631  size_t addString(const OUString& rStr);
632  const OUString* getString(size_t nIndex) const;
633 
634  void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
635  void pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex );
636  void pushCellStoreToken( const ScAddress& rPos, double fValue );
637  void pushCellStoreToken(
638  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar );
639  void pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize );
640 
641  void pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex );
643  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar,
644  uint32_t nRowRange, uint32_t nColRange );
645 
646  void pushFormulaResult( const ScAddress& rPos, double fValue );
647  void pushFormulaResult( const ScAddress& rPos, const OUString& rValue );
648 
649  void incrementProgress();
650 
651  void setStatusIndicator(const css::uno::Reference<css::task::XStatusIndicator>& rIndicator);
652 
654 };
655 
656 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_range(std::string_view range) override
Definition: interface.cxx:891
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:962
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:740
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1498
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2169
virtual void set_result_empty() override
Definition: interface.cxx:980
virtual void set_cell_style_name(std::string_view name) override
Definition: interface.cxx:2106
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1631
ScOrcusFactory & mrFactory
std::optional< double > mnSize
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:2188
virtual void set_named_expression(std::string_view name, std::string_view expression) override
Definition: interface.cxx:236
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1309
size_t appendString(const OUString &rStr)
Definition: interface.cxx:540
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1416
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:1981
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1460
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:862
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:950
virtual orcus::spreadsheet::iface::import_styles * get_styles() override
Definition: interface.cxx:401
virtual size_t commit_cell_style() override
Definition: interface.cxx:2129
std::optional< orcus::spreadsheet::fill_pattern_t > mePattern
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:1800
virtual orcus::spreadsheet::iface::import_global_settings * get_global_settings() override
Definition: interface.cxx:386
virtual void set_base_position(const orcus::spreadsheet::src_address_t &pos) override
Definition: interface.cxx:229
virtual void set_fill_count(size_t n) override
Definition: interface.cxx:1784
virtual void commit() override
Definition: interface.cxx:991
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:686
ScOrcusFactory & getFactory()
Definition: interface.cxx:1250
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:1995
std::unordered_map< OUString, size_t > StringHashType
virtual size_t commit_number_format() override
Definition: interface.cxx:1957
virtual void commit_format() override
Definition: interface.cxx:904
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:1816
ScOrcusArrayFormula maArrayFormula
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2026
virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, std::string_view value) override
Definition: interface.cxx:1085
std::optional< Color > maColor
ScOrcusAutoFilter maAutoFilter
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1674
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2112
formula::FormulaGrammar::Grammar getCalcGrammar() const
virtual void set_formula(std::string_view formula) override
Definition: interface.cxx:781
virtual void commit() override
Definition: interface.cxx:247
virtual void finalize() override
Definition: interface.cxx:406
ScOrcusFactory(ScDocument &rDoc, bool bSkipDefaultStyles=false)
Definition: interface.cxx:304
const OUString * getString(size_t nIndex) const
Definition: interface.cxx:559
std::optional< OUString > maName
const sc::SharedFormulaGroups & getSharedFormulaGroups() const
Definition: interface.cxx:1240
ScOrcusStyles maStyles
virtual orcus::spreadsheet::iface::import_sheet * get_sheet(std::string_view sheet_name) override
Definition: interface.cxx:349
virtual void set_xf_number_format(size_t index) override
Definition: interface.cxx:2006
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:786
virtual void append_segment(std::string_view s) override
Definition: interface.cxx:1297
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:835
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1572
virtual void set_number_format_count(size_t n) override
Definition: interface.cxx:1943
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2011
void pushFillDownCellsToken(const ScAddress &rPos, uint32_t nFillSize)
Definition: interface.cxx:586
std::optional< FontLineStyle > meUnderline
formula::FormulaGrammar::Grammar meGrammar
ScOrcusNamedExpression maNamedExpressions
virtual size_t commit_fill() override
Definition: interface.cxx:1806
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1915
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:757
virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override
Definition: interface.cxx:157
virtual size_t commit_segments() override
Definition: interface.cxx:1302
virtual void commit() override
Definition: interface.cxx:2193
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1593
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1930
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
std::optional< bool > mbFormulaHidden
virtual void set_font_size(double point) override
Definition: interface.cxx:1588
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:775
ScDocumentImport & getDoc()
Definition: interface.cxx:535
virtual void set_xf_fill(size_t index) override
Definition: interface.cxx:2016
virtual void set_cell_style_parent_name(std::string_view name) override
Definition: interface.cxx:2123
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:852
SvxCellJustifyMethod meVerAlignMethod
virtual void set_icon_name(std::string_view name) override
Definition: interface.cxx:797
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1774
size_t addString(const OUString &rStr)
Definition: interface.cxx:549
virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override
Definition: interface.cxx:1714
std::optional< bool > mbHidden
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:822
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:1794
virtual orcus::spreadsheet::iface::import_sheet * append_sheet(orcus::spreadsheet::sheet_t sheet_index, std::string_view sheet_name) override
Definition: interface.cxx:312
std::vector< protection > maProtections
ScOrcusRefResolver(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:162
ScOrcusSharedStrings maSharedStrings
sc::SharedFormulaGroups maFormulaGroups
ScDocumentImport maDoc
std::optional< Color > maUnderlineColor
virtual void set_format(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t xf_index) override
orcus::spreadsheet::src_range_t resolve_range(std::string_view range) override
Definition: interface.cxx:189
std::optional< SvxBorderLineStyle > meStyle
virtual ~ScOrcusConditionalFormat() override
Definition: interface.cxx:765
void pushSharedFormulaToken(const ScAddress &rPos, uint32_t nIndex)
Definition: interface.cxx:592
std::optional< bool > mbPrintContent
virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override
Definition: interface.cxx:2069
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:99
void pushFormulaResult(const ScAddress &rPos, double fValue)
Definition: interface.cxx:610
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:886
virtual size_t commit_dxf() override
Definition: interface.cxx:1999
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1789
void pushMatrixFormulaToken(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, uint32_t nRowRange, uint32_t nColRange)
Definition: interface.cxx:598
ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport &rDoc)
Definition: interface.cxx:691
std::optional< Color > maBgColor
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:1577
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:809
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2160
virtual size_t append(std::string_view s) override
Definition: interface.cxx:1258
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:815
SCTAB getIndex() const
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:391
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:1698
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:769
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1821
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, std::string_view formula) override
Definition: interface.cxx:956
virtual void set_result_value(double value) override
Definition: interface.cxx:968
virtual void set_show_value(bool show) override
Definition: interface.cxx:841
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, std::string_view formula) override
Definition: interface.cxx:1074
ResultType meResType
ScDocumentImport & getDoc() const
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::string_id_t sindex) override
Definition: interface.cxx:1166
virtual void commit_condition() override
Definition: interface.cxx:792
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:1947
std::vector< CellStoreToken > CellStoreTokensType
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1373
ScOrcusGlobalSettings(ScDocumentImport &rDoc)
Definition: interface.cxx:86
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:1890
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1382
virtual size_t add(std::string_view s) override
Definition: interface.cxx:1264
std::optional< bool > mbItalic
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:728
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:752
virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override
Definition: interface.cxx:151
std::vector< xf > maCellStyleXfs
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1329
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1063
virtual void set_number_format_code(std::string_view s) override
Definition: interface.cxx:1951
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:662
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1935
std::optional< bool > mbLocked
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:1967
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:2031
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2040
virtual ~ScOrcusSheetProperties() override
Definition: interface.cxx:697
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:2177
orcus::spreadsheet::src_address_t resolve_address(std::string_view address) override
Definition: interface.cxx:165
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:570
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1255
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1718
ScDocumentImport & mrDoc
virtual void set_font_name(std::string_view name) override
Definition: interface.cxx:1582
virtual size_t commit_cell_style_xf() override
Definition: interface.cxx:1972
number_format maCurrentNumberFormat
std::optional< OUString > maCode
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:681
sal_Int32 SCROW
Definition: types.hxx:17
std::optional< bool > mbBold
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:1706
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1055
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:396
const ScOrcusGlobalSettings & mrGlobalSettings
virtual orcus::spreadsheet::iface::import_conditional_format * get_conditional_format() override
Definition: interface.cxx:1137
virtual void set_segment_font_name(std::string_view s) override
Definition: interface.cxx:1282
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2101
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1286
virtual void commit() override
Definition: interface.cxx:1100
unsigned char sal_uInt8
virtual ~ScOrcusFormula() override
Definition: interface.cxx:948
ScDocumentImport & getDoc()
Definition: interface.cxx:1117
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2036
ScOrcusFormula maFormula
OStringBuffer maCurSegment
ScOrcusNamedExpression(ScDocumentImport &rDoc, const ScOrcusGlobalSettings &rGS, SCTAB nTab=-1)
Definition: interface.cxx:216
ScDocumentImport & mrDoc
ScOrcusNamedExpression maNamedExpressions
ScOrcusConditionalFormat maConditionalFormat
ScOrcusSheet(ScDocumentImport &rDoc, SCTAB nTab, ScOrcusFactory &rFactory)
Definition: interface.cxx:910
ScOrcusFactory & mrFactory
virtual ~ScOrcusAutoFilter() override
Definition: interface.cxx:2165
std::optional< FontStrikeout > meStrikeout
const char * name
virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override
Definition: interface.cxx:734
Any value
ScFormatEntry::Type meEntryType
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1747
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:1900
virtual size_t commit_cell_xf() override
Definition: interface.cxx:1986
ResultType type
void pushCellStoreAutoToken(const ScAddress &rPos, const OUString &rVal)
Definition: interface.cxx:564
ScOrcusFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:938
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:746
SvxCellJustifyMethod
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1920
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1567
ScOrcusGlobalSettings maGlobalSettings
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:857
virtual size_t commit_border() override
Definition: interface.cxx:1906
std::optional< Color > maFgColor
virtual void set_result_string(std::string_view value) override
Definition: interface.cxx:974
virtual void set_origin_date(int year, int month, int day) override
Definition: interface.cxx:94
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:262
virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, std::string_view value) override
Definition: interface.cxx:1159
StringHashType maStringHash
ScOrcusStyles & mrStyles
protection maCurrentProtection
virtual void set_cell_print_content(bool b) override
Definition: interface.cxx:1925
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:985
virtual void set_iconset_reverse(bool reverse) override
Definition: interface.cxx:846
virtual void set_named_range(std::string_view name, std::string_view range) override
Definition: interface.cxx:242
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:803
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2117
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1278
virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override
Definition: interface.cxx:1759
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 append_column_match_value(std::string_view value) override
Definition: interface.cxx:2182
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2021
virtual void set_min_databar_length(double length) override
Definition: interface.cxx:829
std::map< orcus::spreadsheet::border_direction_t, border_line > maBorders