LibreOffice Module sc (master)  1
interface.cxx
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 #include <limits>
11 #include <memory>
12 #include <orcusinterface.hxx>
13 
14 #include <document.hxx>
15 #include <formulacell.hxx>
16 #include <rangenam.hxx>
17 #include <tokenarray.hxx>
18 #include <globalnames.hxx>
19 #include <globstr.hrc>
20 #include <scresid.hxx>
21 #include <compiler.hxx>
22 #include <stlpool.hxx>
23 #include <scitems.hxx>
24 #include <patattr.hxx>
25 #include <docpool.hxx>
26 #include <attrib.hxx>
27 
28 #include <editeng/postitem.hxx>
29 #include <editeng/wghtitem.hxx>
30 #include <editeng/colritem.hxx>
31 #include <editeng/brushitem.hxx>
32 #include <editeng/udlnitem.hxx>
33 #include <editeng/boxitem.hxx>
34 #include <editeng/borderline.hxx>
35 #include <editeng/fontitem.hxx>
36 #include <editeng/fhgtitem.hxx>
37 #include <editeng/lineitem.hxx>
39 #include <editeng/justifyitem.hxx>
40 
41 #include <svl/sharedstringpool.hxx>
42 #include <svl/zforlist.hxx>
43 #include <svl/intitem.hxx>
44 #include <com/sun/star/task/XStatusIndicator.hpp>
45 #include <i18nlangtag/lang.h>
46 #include <tools/fontenum.hxx>
47 #include <sal/log.hxx>
48 
49 #include <stylesbuffer.hxx>
50 #include <orcus/exception.hpp>
51 
52 using namespace com::sun::star;
53 
54 namespace os = orcus::spreadsheet;
55 
56 namespace {
57 
58 formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t grammar )
59 {
61  switch(grammar)
62  {
63  case orcus::spreadsheet::formula_grammar_t::ods:
65  break;
66  case orcus::spreadsheet::formula_grammar_t::xlsx:
68  break;
69  case orcus::spreadsheet::formula_grammar_t::gnumeric:
71  break;
72  case orcus::spreadsheet::formula_grammar_t::xls_xml:
74  break;
75  case orcus::spreadsheet::formula_grammar_t::unknown:
76  break;
77  }
78 
79  return eGrammar;
80 }
81 
82 }
83 
85  : mrDoc(rDoc)
86  , meCalcGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED)
87  , meOrcusGrammar(os::formula_grammar_t::unknown)
88  , mnTextEncoding(RTL_TEXTENCODING_UTF8)
89 {
90 }
91 
92 void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day)
93 {
94  mrDoc.setOriginDate(year, month, day);
95 }
96 
97 void ScOrcusGlobalSettings::set_character_set(orcus::character_set_t cs)
98 {
99  switch (cs)
100  {
101  case orcus::character_set_t::iso_2022_jp:
102  case orcus::character_set_t::iso_2022_jp_2:
103  mnTextEncoding = RTL_TEXTENCODING_ISO_2022_JP;
104  break;
105  case orcus::character_set_t::jis_x0201:
106  mnTextEncoding = RTL_TEXTENCODING_JIS_X_0201;
107  break;
108  case orcus::character_set_t::shift_jis:
109  mnTextEncoding = RTL_TEXTENCODING_SHIFT_JIS;
110  break;
111  case orcus::character_set_t::us_ascii:
112  mnTextEncoding = RTL_TEXTENCODING_ASCII_US;
113  break;
114  case orcus::character_set_t::utf_7:
115  mnTextEncoding = RTL_TEXTENCODING_UTF7;
116  break;
117  case orcus::character_set_t::windows_1250:
118  mnTextEncoding = RTL_TEXTENCODING_MS_1250;
119  break;
120  case orcus::character_set_t::windows_1251:
121  mnTextEncoding = RTL_TEXTENCODING_MS_1251;
122  break;
123  case orcus::character_set_t::windows_1252:
124  mnTextEncoding = RTL_TEXTENCODING_MS_1252;
125  break;
126  case orcus::character_set_t::windows_1253:
127  mnTextEncoding = RTL_TEXTENCODING_MS_1253;
128  break;
129  case orcus::character_set_t::windows_1254:
130  mnTextEncoding = RTL_TEXTENCODING_MS_1254;
131  break;
132  case orcus::character_set_t::windows_1255:
133  mnTextEncoding = RTL_TEXTENCODING_MS_1255;
134  break;
135  case orcus::character_set_t::windows_1256:
136  mnTextEncoding = RTL_TEXTENCODING_MS_1256;
137  break;
138  case orcus::character_set_t::windows_1257:
139  mnTextEncoding = RTL_TEXTENCODING_MS_1257;
140  break;
141  case orcus::character_set_t::windows_1258:
142  mnTextEncoding = RTL_TEXTENCODING_MS_1258;
143  break;
144  default:
145  ; // Add more as needed.
146  }
147 }
148 
149 void ScOrcusGlobalSettings::set_default_formula_grammar(os::formula_grammar_t grammar)
150 {
151  meCalcGrammar = getCalcGrammarFromOrcus(grammar);
152  meOrcusGrammar = grammar;
153 }
154 
155 orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
156 {
157  return meOrcusGrammar;
158 }
159 
161  mrGlobalSettings(rGS) {}
162 
163 os::src_address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
164 {
165  OUString aStr(p, n, mrGlobalSettings.getTextEncoding());
166 
167  ScAddress aAddr;
171 
172  if (!aAddr.IsValid())
173  {
174  std::ostringstream os;
175  os << "'" << std::string(p, n) << "' is not a valid address expression.";
176  throw orcus::invalid_arg_error(os.str());
177  }
178 
179  os::src_address_t ret;
180  ret.sheet = aAddr.Tab();
181  ret.column = aAddr.Col();
182  ret.row = aAddr.Row();
183 
184  return ret;
185 }
186 
187 os::src_range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n)
188 {
189  OUString aStr(p, n, mrGlobalSettings.getTextEncoding());
190 
191  ScRange aRange;
195 
196  if (!aRange.IsValid())
197  {
198  std::ostringstream os;
199  os << "'" << std::string(p, n) << "' is not a valid range expression.";
200  throw orcus::invalid_arg_error(os.str());
201  }
202 
203  os::src_range_t ret;
204  ret.first.sheet = aRange.aStart.Tab();
205  ret.first.column = aRange.aStart.Col();
206  ret.first.row = aRange.aStart.Row();
207  ret.last.sheet = aRange.aEnd.Tab();
208  ret.last.column = aRange.aEnd.Col();
209  ret.last.row = aRange.aEnd.Row();
210 
211  return ret;
212 }
213 
215  ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS, SCTAB nTab ) :
216  mrDoc(rDoc), mrGlobalSettings(rGS), mnTab(nTab) {}
217 
219 {
220  maBasePos.SetTab(0);
221  maBasePos.SetCol(0);
222  maBasePos.SetRow(0);
223  maName.clear();
224  maExpr.clear();
225 }
226 
227 void ScOrcusNamedExpression::set_base_position(const orcus::spreadsheet::src_address_t& pos)
228 {
229  maBasePos.SetTab(pos.sheet);
230  maBasePos.SetCol(pos.column);
231  maBasePos.SetRow(pos.row);
232 }
233 
234 void ScOrcusNamedExpression::set_named_expression(const char* p_name, size_t n_name, const char* p_exp, size_t n_exp)
235 {
236  maName = OUString(p_name, n_name, mrGlobalSettings.getTextEncoding());
237  maExpr = OUString(p_exp, n_exp, mrGlobalSettings.getTextEncoding());
238 }
239 
240 void ScOrcusNamedExpression::set_named_range(const char* /*p_name*/, size_t /*n_name*/, const char* /*p_range*/, size_t /*n_range*/)
241 {
242  throw std::runtime_error("ScOrcusNamedExpression::set_named_range not implemented yet.");
243 }
244 
246 {
248  if (!pNames)
249  return;
250 
251  ScRangeData* pRange = new ScRangeData(
254 
255  pNames->insert(pRange, false);
256 
257  reset(); // make sure to reset the state for the next run.
258 }
259 
261  : maPos(rPos)
262  , meType(eType)
263  , mfValue(std::numeric_limits<double>::quiet_NaN())
264  , mnIndex1(0)
265  , mnIndex2(0)
266  , meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED)
267 {
268 }
269 
271  : maPos(rPos)
272  , meType(Type::Numeric)
273  , mfValue(fValue)
274  , mnIndex1(0)
275  , mnIndex2(0)
276  , meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED)
277 {
278 }
279 
281  : maPos(rPos)
282  , meType(Type::String)
283  , mfValue(std::numeric_limits<double>::quiet_NaN())
284  , mnIndex1(nIndex)
285  , mnIndex2(0)
286  , meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED)
287 {
288 }
289 
290 ScOrcusFactory::CellStoreToken::CellStoreToken(const ScAddress& rPos, const OUString& rFormula,
292  : maPos(rPos)
293  , meType(Type::Formula)
294  , maStr1(rFormula)
295  , mfValue(std::numeric_limits<double>::quiet_NaN())
296  , mnIndex1(0)
297  , mnIndex2(0)
298  , meGrammar(eGrammar)
299 {
300 }
301 
302 ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc, bool bSkipDefaultStyles) :
303  maDoc(rDoc),
305  maSharedStrings(*this),
307  maStyles(*this, bSkipDefaultStyles),
308  mnProgress(0) {}
309 
310 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(
311  orcus::spreadsheet::sheet_t sheet_index, const char* sheet_name, size_t sheet_name_length)
312 {
313  OUString aTabName(sheet_name, sheet_name_length, maGlobalSettings.getTextEncoding());
314 
315  if (sheet_index == 0)
316  {
317  // The calc document initializes with one sheet already present.
318  assert(maDoc.getSheetCount() == 1);
319  maDoc.setSheetName(0, aTabName);
320  maSheets.push_back(std::make_unique<ScOrcusSheet>(maDoc, 0, *this));
321  return maSheets.back().get();
322  }
323 
324  if (!maDoc.appendSheet(aTabName))
325  return nullptr;
326 
327  SCTAB nTab = maDoc.getSheetCount() - 1;
328  maSheets.push_back(std::make_unique<ScOrcusSheet>(maDoc, nTab, *this));
329  return maSheets.back().get();
330 }
331 
332 namespace {
333 
334 class FindSheetByIndex
335 {
336  SCTAB mnTab;
337 public:
338  explicit FindSheetByIndex(SCTAB nTab) : mnTab(nTab) {}
339  bool operator() (const std::unique_ptr<ScOrcusSheet>& rSheet) const
340  {
341  return rSheet->getIndex() == mnTab;
342  }
343 };
344 
345 }
346 
347 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::get_sheet(const char* sheet_name, size_t sheet_name_length)
348 {
349  OUString aTabName(sheet_name, sheet_name_length, maGlobalSettings.getTextEncoding());
350  SCTAB nTab = maDoc.getSheetIndex(aTabName);
351  if (nTab < 0)
352  // Sheet by that name not found.
353  return nullptr;
354 
355  // See if we already have an orcus sheet instance by that index.
356  std::vector< std::unique_ptr<ScOrcusSheet> >::iterator it =
357  std::find_if(maSheets.begin(), maSheets.end(), FindSheetByIndex(nTab));
358 
359  if (it != maSheets.end())
360  // We already have one. Return it.
361  return it->get();
362 
363  // Create a new orcus sheet instance for this.
364  maSheets.push_back(std::make_unique<ScOrcusSheet>(maDoc, nTab, *this));
365  return maSheets.back().get();
366 }
367 
368 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::get_sheet(orcus::spreadsheet::sheet_t sheet_index)
369 {
370  SCTAB nTab = static_cast<SCTAB>(sheet_index);
371  // See if we already have an orcus sheet instance by that index.
372  std::vector< std::unique_ptr<ScOrcusSheet> >::iterator it =
373  std::find_if(maSheets.begin(), maSheets.end(), FindSheetByIndex(nTab));
374 
375  if (it != maSheets.end())
376  // We already have one. Return it.
377  return it->get();
378 
379  // Create a new orcus sheet instance for this.
380  maSheets.push_back(std::make_unique<ScOrcusSheet>(maDoc, nTab, *this));
381  return maSheets.back().get();
382 }
383 
384 orcus::spreadsheet::iface::import_global_settings* ScOrcusFactory::get_global_settings()
385 {
386  return &maGlobalSettings;
387 }
388 
389 orcus::spreadsheet::iface::import_shared_strings* ScOrcusFactory::get_shared_strings()
390 {
391  return &maSharedStrings;
392 }
393 
394 orcus::spreadsheet::iface::import_named_expression* ScOrcusFactory::get_named_expression()
395 {
396  return &maNamedExpressions;
397 }
398 
399 orcus::spreadsheet::iface::import_styles* ScOrcusFactory::get_styles()
400 {
401  return &maStyles;
402 }
403 
405 {
406  auto toFormulaCell = [this]( const CellStoreToken& rToken ) -> std::unique_ptr<ScFormulaCell>
407  {
408  const ScOrcusSheet& rSheet = *maSheets.at(rToken.maPos.Tab());
409  const sc::SharedFormulaGroups& rSFG = rSheet.getSharedFormulaGroups();
410  const ScTokenArray* pArray = rSFG.get(rToken.mnIndex1);
411  if (!pArray)
412  return std::unique_ptr<ScFormulaCell>();
413 
414  return std::make_unique<ScFormulaCell>(maDoc.getDoc(), rToken.maPos, *pArray);
415  };
416 
417  int nCellCount = 0;
418 
419  for (const CellStoreToken& rToken : maCellStoreTokens)
420  {
421  switch (rToken.meType)
422  {
424  {
425  maDoc.setAutoInput(rToken.maPos, rToken.maStr1);
426  ++nCellCount;
427  break;
428  }
430  {
431  if (rToken.mnIndex1 >= maStrings.size())
432  // String index out-of-bound! Something is up.
433  break;
434 
435  maDoc.setStringCell(rToken.maPos, maStrings[rToken.mnIndex1]);
436  ++nCellCount;
437  break;
438  }
440  {
441  maDoc.setNumericCell(rToken.maPos, rToken.mfValue);
442  ++nCellCount;
443  break;
444  }
446  {
448  rToken.maPos, rToken.maStr1, rToken.meGrammar);
449 
450  ++nCellCount;
451  break;
452  }
454  {
455  if (std::isfinite(rToken.mfValue))
456  maDoc.setFormulaCell(rToken.maPos, rToken.maStr1, rToken.meGrammar, &rToken.mfValue);
457  else
458  maDoc.setFormulaCell(rToken.maPos, rToken.maStr1, rToken.meGrammar, rToken.maStr2);
459 
460  ++nCellCount;
461  break;
462  }
464  {
465  std::unique_ptr<ScFormulaCell> pCell = toFormulaCell(rToken);
466  if (!pCell)
467  break;
468 
469  maDoc.setFormulaCell(rToken.maPos, pCell.release());
470 
471  ++nCellCount;
472  break;
473  }
475  {
476  std::unique_ptr<ScFormulaCell> pCell = toFormulaCell(rToken);
477  if (!pCell)
478  break;
479 
480  if (std::isfinite(rToken.mfValue))
481  pCell->SetResultDouble(rToken.mfValue);
482  else
483  pCell->SetHybridString(
484  maDoc.getDoc().GetSharedStringPool().intern(rToken.maStr2));
485 
486  maDoc.setFormulaCell(rToken.maPos, pCell.release());
487 
488  ++nCellCount;
489  break;
490  }
492  {
493  if (!rToken.mnIndex1 || !rToken.mnIndex2)
494  break;
495 
496  ScRange aRange(rToken.maPos);
497  aRange.aEnd.IncCol(rToken.mnIndex1-1);
498  aRange.aEnd.IncRow(rToken.mnIndex2-1);
499 
500  ScCompiler aComp(maDoc.getDoc(), aRange.aStart, rToken.meGrammar);
501  std::unique_ptr<ScTokenArray> pArray(aComp.CompileString(rToken.maStr1));
502  if (!pArray)
503  break;
504 
505  maDoc.setMatrixCells(aRange, *pArray, rToken.meGrammar);
506  break;
507  }
509  {
510  if (!rToken.mnIndex1)
511  break;
512 
513  maDoc.fillDownCells(rToken.maPos, rToken.mnIndex1);
514  break;
515  }
516  default:
517  ;
518  }
519 
520  if (nCellCount == 100000)
521  {
523  nCellCount = 0;
524  }
525  }
526 
527  if (mxStatusIndicator.is())
528  mxStatusIndicator->end();
529 
530  maDoc.finalize();
531 }
532 
534 {
535  return maDoc;
536 }
537 
538 size_t ScOrcusFactory::appendString(const OUString& rStr)
539 {
540  size_t nPos = maStrings.size();
541  maStrings.push_back(rStr);
542  maStringHash.emplace(rStr, nPos);
543 
544  return nPos;
545 }
546 
547 size_t ScOrcusFactory::addString(const OUString& rStr)
548 {
549  // Add only if the string is not yet present in the string pool.
550  StringHashType::iterator it = maStringHash.find(rStr);
551  if (it != maStringHash.end())
552  return it->second;
553 
554  return appendString(rStr);
555 }
556 
557 const OUString* ScOrcusFactory::getString(size_t nIndex) const
558 {
559  return nIndex < maStrings.size() ? &maStrings[nIndex] : nullptr;
560 }
561 
562 void ScOrcusFactory::pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal )
563 {
564  maCellStoreTokens.emplace_back(rPos, CellStoreToken::Type::Auto);
565  maCellStoreTokens.back().maStr1 = rVal;
566 }
567 
568 void ScOrcusFactory::pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex )
569 {
570  maCellStoreTokens.emplace_back(rPos, nStrIndex);
571 }
572 
573 void ScOrcusFactory::pushCellStoreToken( const ScAddress& rPos, double fValue )
574 {
575  maCellStoreTokens.emplace_back(rPos, fValue);
576 }
577 
579  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar )
580 {
581  maCellStoreTokens.emplace_back(rPos, rFormula, eGrammar);
582 }
583 
584 void ScOrcusFactory::pushFillDownCellsToken( const ScAddress& rPos, uint32_t nFillSize )
585 {
587  maCellStoreTokens.back().mnIndex1 = nFillSize;
588 }
589 
590 void ScOrcusFactory::pushSharedFormulaToken( const ScAddress& rPos, uint32_t nIndex )
591 {
593  maCellStoreTokens.back().mnIndex1 = nIndex;
594 }
595 
597  const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar,
598  uint32_t nRowRange, uint32_t nColRange )
599 {
601  CellStoreToken& rT = maCellStoreTokens.back();
602  rT.maStr1 = rFormula;
603  rT.meGrammar = eGrammar;
604  rT.mnIndex1 = nColRange;
605  rT.mnIndex2 = nRowRange;
606 }
607 
608 void ScOrcusFactory::pushFormulaResult( const ScAddress& rPos, double fValue )
609 {
610  // Formula result is expected to be pushed immediately following the
611  // formula token it belongs.
612  if (maCellStoreTokens.empty())
613  return;
614 
615  CellStoreToken& rToken = maCellStoreTokens.back();
616  if (rToken.maPos != rPos)
617  return;
618 
619  switch (rToken.meType)
620  {
623  break;
626  break;
627  default:
628  return;
629  }
630 
631  rToken.mfValue = fValue;
632 }
633 
634 void ScOrcusFactory::pushFormulaResult( const ScAddress& rPos, const OUString& rValue )
635 {
636  // Formula result is expected to be pushed immediately following the
637  // formula token it belongs.
638  if (maCellStoreTokens.empty())
639  return;
640 
641  CellStoreToken& rToken = maCellStoreTokens.back();
642  if (rToken.maPos != rPos)
643  return;
644 
645  switch (rToken.meType)
646  {
649  break;
652  break;
653  default:
654  return;
655  }
656 
657  rToken.maStr2 = rValue;
658 }
659 
661 {
662  if (!mxStatusIndicator.is())
663  // Status indicator object not set.
664  return;
665 
666  // For now, we'll hard-code the progress range to be 100, and stops at 99
667  // in all cases.
668 
669  if (!mnProgress)
670  mxStatusIndicator->start(ScResId(STR_LOAD_DOC), 100);
671 
672  if (mnProgress == 99)
673  return;
674 
675  ++mnProgress;
676  mxStatusIndicator->setValue(mnProgress);
677 }
678 
679 void ScOrcusFactory::setStatusIndicator(const uno::Reference<task::XStatusIndicator>& rIndicator)
680 {
681  mxStatusIndicator = rIndicator;
682 }
683 
685 {
686  return maGlobalSettings;
687 }
688 
690  mrDoc(rDoc),
691  mnTab(nTab)
692 {
693 }
694 
696 {
697 }
698 
699 namespace {
700 
701 double translateToInternal(double nVal, orcus::length_unit_t unit)
702 {
703  switch(unit)
704  {
705  case orcus::length_unit_t::inch:
706  return nVal * 72.0 * 20.0;
707  case orcus::length_unit_t::twip:
708  return nVal;
709  case orcus::length_unit_t::point:
710  return nVal * 20.0;
711  case orcus::length_unit_t::centimeter:
712  return nVal * 20.0 * 72.0 / 2.54;
713  case orcus::length_unit_t::unknown:
714  if (nVal != 0)
715  SAL_WARN("sc.orcus", "unknown unit");
716  break;
717  default:
718  break;
719  }
720  return nVal;
721 }
722 
723 
724 }
725 
726 void ScOrcusSheetProperties::set_column_width(os::col_t col, double width, orcus::length_unit_t unit)
727 {
728  double nNewWidth = translateToInternal(width, unit);
729  mrDoc.getDoc().SetColWidthOnly(col, mnTab, nNewWidth);
730 }
731 
732 void ScOrcusSheetProperties::set_column_hidden(os::col_t col, bool hidden)
733 {
734  if (hidden)
735  mrDoc.getDoc().SetColHidden(col, col, mnTab, hidden);
736 }
737 
738 void ScOrcusSheetProperties::set_row_height(os::row_t row, double height, orcus::length_unit_t unit)
739 {
740  double nNewHeight = translateToInternal(height, unit);
741  mrDoc.getDoc().SetRowHeightOnly(row, row,mnTab, nNewHeight);
742 }
743 
744 void ScOrcusSheetProperties::set_row_hidden(os::row_t row, bool hidden)
745 {
746  if (hidden)
747  mrDoc.getDoc().SetRowHidden(row, row, mnTab, hidden);
748 }
749 
750 void ScOrcusSheetProperties::set_merge_cell_range(const orcus::spreadsheet::range_t& range)
751 {
752  mrDoc.setMergedCells(mnTab, range.first.column, range.first.row, range.last.column, range.last.row);
753 }
754 
756  mnTab(nTab),
757  mrDoc(rDoc),
758  mpCurrentFormat(new ScConditionalFormat(0, &mrDoc)),
759  meEntryType(ScFormatEntry::Type::Condition)
760 {
761 }
762 
764 {
765 }
766 
767 void ScOrcusConditionalFormat::set_color(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
768  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
769 {
770  SAL_INFO("sc.orcus.condformat", "set_color");
771 }
772 
773 void ScOrcusConditionalFormat::set_condition_type(os::condition_type_t /*type*/)
774 {
776  SAL_INFO("sc.orcus.condformat", "set_condition_type");
777 }
778 
779 void ScOrcusConditionalFormat::set_formula(const char* /*p*/, size_t /*n*/)
780 {
781  SAL_INFO("sc.orcus.condformat", "set_formula");
782 }
783 
784 void ScOrcusConditionalFormat::set_date(os::condition_date_t /*date*/)
785 {
787  SAL_INFO("sc.orcus.condformat", "set_date");
788 }
789 
791 {
792  SAL_INFO("sc.orcus.condformat", "commit_condition");
793 }
794 
795 void ScOrcusConditionalFormat::set_icon_name(const char* /*p*/, size_t /*n*/)
796 {
798  SAL_INFO("sc.orcus.condformat", "set_icon_name");
799 }
800 
802 {
804  SAL_INFO("sc.orcus.condformat", "set_databar_gradient");
805 }
806 
807 void ScOrcusConditionalFormat::set_databar_axis(os::databar_axis_t /*axis*/)
808 {
810  SAL_INFO("sc.orcus.condformat", "set_databar_axis");
811 }
812 
813 void ScOrcusConditionalFormat::set_databar_color_positive(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
814  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
815 {
817  SAL_INFO("sc.orcus.condformat", "set_databar_color_positive");
818 }
819 
820 void ScOrcusConditionalFormat::set_databar_color_negative(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
821  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
822 {
824  SAL_INFO("sc.orcus.condformat", "set_databar_color_negative");
825 }
826 
828 {
830  SAL_INFO("sc.orcus.condformat", "set_min_databar_length");
831 }
832 
834 {
836  SAL_INFO("sc.orcus.condformat", "set_max_databar_length");
837 }
838 
840 {
841  SAL_INFO("sc.orcus.condformat", "set_show_value");
842 }
843 
845 {
847  SAL_INFO("sc.orcus.condformat", "set_iconset_reverse");
848 }
849 
851 {
852  SAL_INFO("sc.orcus.condformat", "set_xf_id");
853 }
854 
855 void ScOrcusConditionalFormat::set_operator(os::condition_operator_t /*condition_type*/)
856 {
857  SAL_INFO("sc.orcus.condformat", "set_operator");
858 }
859 
860 void ScOrcusConditionalFormat::set_type(os::conditional_format_t type)
861 {
862  switch (type)
863  {
864  case os::conditional_format_t::condition:
865  case os::conditional_format_t::formula:
867  // mpCurrentEntry.reset(new ScCondFormatEntry());
868  break;
869  case os::conditional_format_t::date:
870  break;
871  case os::conditional_format_t::colorscale:
872  break;
873  case os::conditional_format_t::databar:
874  break;
875  case os::conditional_format_t::iconset:
876  break;
877  default:
878  SAL_INFO("sc.orcus.condformat", "unknown conditional_format_t value");
879  break;
880  }
881  SAL_INFO("sc.orcus.condformat", "set_type");
882 }
883 
885 {
886  SAL_INFO("sc.orcus.condformat", "commit_entry");
887 }
888 
889 void ScOrcusConditionalFormat::set_range(const char* /*p*/, size_t /*n*/)
890 {
891  SAL_INFO("sc.orcus.condformat", "set_range");
892 }
893 
894 void ScOrcusConditionalFormat::set_range(os::row_t row_start, os::col_t col_start,
895  os::row_t row_end, os::col_t col_end)
896 {
897  SAL_INFO("sc.orcus.condformat", "set_range");
898  ScRange aRange(col_start, row_start, mnTab, col_end, row_end, mnTab);
899  mpCurrentFormat->SetRange(aRange);
900 }
901 
903 {
904  SAL_INFO("sc.orcus.condformat", "commit_format");
905  mpCurrentFormat.reset(new ScConditionalFormat(0, &mrDoc));
906 }
907 
909  mrDoc(rDoc),
910  mnTab(nTab),
911  mrFactory(rFactory),
912  mrStyles(static_cast<ScOrcusStyles&>(*mrFactory.get_styles())),
913  maAutoFilter(rFactory.getGlobalSettings()),
914  maProperties(mnTab, mrDoc),
915  maConditionalFormat(mnTab, rDoc.getDoc()),
916  maNamedExpressions(rDoc, rFactory.getGlobalSettings(), nTab),
917  maFormula(*this),
918  maArrayFormula(*this),
919  mnCellCount(0)
920 {
921 }
922 
924 {
925  mnCol = -1;
926  mnRow = -1;
927  maFormula.clear();
930  mbShared = false;
932  mnResult = 0;
933  mfResult = 0.0;
934 }
935 
937  mrSheet(rSheet),
938  mnCol(-1),
939  mnRow(-1),
940  meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED),
941  mnSharedFormulaIndex(0),
942  mbShared(false),
943  meResType(ResultType::NotSet),
944  mnResult(0),
945  mfResult(0.0) {}
946 
948 
949 void ScOrcusFormula::set_position(os::row_t row, os::col_t col)
950 {
951  mnCol = col;
952  mnRow = row;
953 }
954 
955 void ScOrcusFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
956 {
958  meGrammar = getCalcGrammarFromOrcus(grammar);
959 }
960 
962 {
963  mnSharedFormulaIndex = index;
964  mbShared = true;
965 }
966 
968 {
970  mfResult = value;
971 }
972 
974 {
976  mnResult = sindex;
977 }
978 
980 {
982 }
983 
985 {
987  mfResult = value ? 1.0 : 0.0;
988 }
989 
991 {
992  ScOrcusFactory& rFactory = mrSheet.getFactory();
995 
996  if (mbShared)
997  {
998  if (maFormula.isEmpty())
999  {
1000  // shared formula that references existing formula token.
1001  const ScTokenArray* pArray = rGroups.get(mnSharedFormulaIndex);
1002  if (!pArray)
1003  return;
1004  }
1005  else
1006  {
1007  // topmost shared formula with new formula token.
1008 
1009  // Compile the formula expression into tokens.
1010  ScCompiler aComp(mrSheet.getDoc().getDoc(), aPos, meGrammar);
1011  std::unique_ptr<ScTokenArray> pArray = aComp.CompileString(maFormula);
1012  if (!pArray)
1013  // Tokenization failed.
1014  return;
1015 
1016  rGroups.set(mnSharedFormulaIndex, std::move(pArray));
1017  }
1019  }
1020  else
1021  {
1022  // non-shared formula
1023  rFactory.pushCellStoreToken(aPos, maFormula, meGrammar);
1024  }
1025 
1026  switch (meResType)
1027  {
1028  case ResultType::String:
1029  {
1030  const OUString* pStr = rFactory.getString(mnResult);
1031  if (pStr)
1032  rFactory.pushFormulaResult(aPos, *pStr);
1033  break;
1034  }
1035  case ResultType::Value:
1036  rFactory.pushFormulaResult(aPos, mfResult);
1037  break;
1038  default:
1039  ;
1040  }
1041 
1043 }
1044 
1046 {
1047  mnCol = -1;
1048  mnRow = -1;
1049  mnColRange = 0;
1050  mnRowRange = 0;
1051 
1052  maFormula.clear();
1054 }
1055 
1057  mrSheet(rSheet),
1058  mnCol(-1),
1059  mnRow(-1),
1060  mnColRange(0),
1061  mnRowRange(0),
1062  meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED) {}
1063 
1065 
1066 void ScOrcusArrayFormula::set_range(const os::range_t& range)
1067 {
1068  mnCol = range.first.column;
1069  mnRow = range.first.row;
1070 
1071  mnColRange = range.last.column - range.first.column + 1;
1072  mnRowRange = range.last.row - range.first.column + 1;
1073 }
1074 
1075 void ScOrcusArrayFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
1076 {
1077  meGrammar = getCalcGrammarFromOrcus(grammar);
1079 }
1080 
1081 void ScOrcusArrayFormula::set_result_value(os::row_t /*row*/, os::col_t /*col*/, double /*value*/)
1082 {
1083  // TODO : implement result cache for matrix
1084 }
1085 
1086 void ScOrcusArrayFormula::set_result_string(os::row_t /*row*/, os::col_t /*col*/, size_t /*sindex*/)
1087 {
1088  // TODO : implement result cache for matrix
1089 }
1090 
1091 void ScOrcusArrayFormula::set_result_empty(os::row_t /*row*/, os::col_t /*col*/)
1092 {
1093  // TODO : implement result cache for matrix
1094 }
1095 
1096 void ScOrcusArrayFormula::set_result_bool(os::row_t /*row*/, os::col_t /*col*/, bool /*value*/)
1097 {
1098  // TODO : implement result cache for matrix
1099 }
1100 
1102 {
1103  ScAddress aPos(mnCol, mnRow, mrSheet.getIndex());
1106 }
1107 
1109 {
1110  ++mnCellCount;
1111  if (mnCellCount == 100000)
1112  {
1114  mnCellCount = 0;
1115  }
1116 }
1117 
1119 {
1120  return mrDoc;
1121 }
1122 
1123 os::iface::import_auto_filter* ScOrcusSheet::get_auto_filter()
1124 {
1125  return &maAutoFilter;
1126 }
1127 
1128 os::iface::import_table* ScOrcusSheet::get_table()
1129 {
1130  return nullptr;
1131 }
1132 
1133 os::iface::import_sheet_properties* ScOrcusSheet::get_sheet_properties()
1134 {
1135  return &maProperties;
1136 }
1137 
1138 os::iface::import_conditional_format* ScOrcusSheet::get_conditional_format()
1139 {
1140  return &maConditionalFormat;
1141 }
1142 
1143 os::iface::import_named_expression* ScOrcusSheet::get_named_expression()
1144 {
1145  return &maNamedExpressions;
1146 }
1147 
1148 os::iface::import_formula* ScOrcusSheet::get_formula()
1149 {
1150  maFormula.reset();
1151  return &maFormula;
1152 }
1153 
1154 os::iface::import_array_formula* ScOrcusSheet::get_array_formula()
1155 {
1157  return &maArrayFormula;
1158 }
1159 
1160 void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
1161 {
1162  OUString aVal(p, n, mrFactory.getGlobalSettings().getTextEncoding());
1163  mrFactory.pushCellStoreAutoToken(ScAddress(col, row, mnTab), aVal);
1164  cellInserted();
1165 }
1166 
1167 void ScOrcusSheet::set_string(os::row_t row, os::col_t col, size_t sindex)
1168 {
1169  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), uint32_t(sindex));
1170  cellInserted();
1171 }
1172 
1173 void ScOrcusSheet::set_value(os::row_t row, os::col_t col, double value)
1174 {
1175  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), value);
1176  cellInserted();
1177 }
1178 
1179 void ScOrcusSheet::set_bool(os::row_t row, os::col_t col, bool value)
1180 {
1181  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), value ? 1.0 : 0.0);
1182  cellInserted();
1183 }
1184 
1186  os::row_t row, os::col_t col, int year, int month, int day, int hour, int minute, double second)
1187 {
1188  SvNumberFormatter* pFormatter = mrDoc.getDoc().GetFormatTable();
1189 
1190  Date aDate(day, month, year);
1191  sal_uInt32 nSec = floor(second);
1192  sal_uInt32 nNanoSec = (second - nSec) * ::tools::Time::nanoSecPerSec;
1193  tools::Time aTime(hour, minute, nSec, nNanoSec);
1194  tools::Long nDateDiff = aDate - pFormatter->GetNullDate();
1195 
1196  double fTime =
1197  static_cast<double>(aTime.GetNanoSec()) / ::tools::Time::nanoSecPerSec +
1198  aTime.GetSec() +
1201 
1202  fTime /= DATE_TIME_FACTOR;
1203 
1204  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), nDateDiff + fTime);
1205  cellInserted();
1206 }
1207 
1208 void ScOrcusSheet::set_format(os::row_t row, os::col_t col, size_t xf_index)
1209 {
1210  SAL_INFO("sc.orcus.style", "set format: " << xf_index);
1211 
1212  ScPatternAttr aPattern(mrDoc.getDoc().GetPool());
1213  mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
1214  mrDoc.getDoc().ApplyPattern(col, row, mnTab, aPattern);
1215 }
1216 
1217 void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start,
1218  os::row_t row_end, os::col_t col_end, size_t xf_index)
1219 {
1220  SAL_INFO("sc.orcus.style", "set format range: " << xf_index);
1221  ScPatternAttr aPattern(mrDoc.getDoc().GetPool());
1222  mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
1223  mrDoc.getDoc().ApplyPatternAreaTab(col_start, row_start, col_end, row_end, mnTab, aPattern);
1224 }
1225 
1226 orcus::spreadsheet::range_size_t ScOrcusSheet::get_sheet_size() const
1227 {
1228  orcus::spreadsheet::range_size_t ret;
1229  ret.rows = MAXROWCOUNT;
1230  ret.columns = MAXCOLCOUNT;
1231 
1232  return ret;
1233 }
1234 
1235 void ScOrcusSheet::fill_down_cells(os::row_t row, os::col_t col, os::row_t range_size)
1236 {
1237  mrFactory.pushFillDownCellsToken(ScAddress(col, row, mnTab), range_size);
1238  cellInserted();
1239 }
1240 
1242 {
1243  return maFormulaGroups;
1244 }
1245 
1247 {
1248  return maFormulaGroups;
1249 }
1250 
1252 {
1253  return mrFactory;
1254 }
1255 
1257  mrFactory(rFactory) {}
1258 
1259 size_t ScOrcusSharedStrings::append(const char* s, size_t n)
1260 {
1261  OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1262  return mrFactory.appendString(aNewString);
1263 }
1264 
1265 size_t ScOrcusSharedStrings::add(const char* s, size_t n)
1266 {
1267  OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1268  return mrFactory.addString(aNewString);
1269 }
1270 
1271 void ScOrcusSharedStrings::set_segment_font(size_t /*font_index*/)
1272 {
1273 }
1274 
1276 {
1277 }
1278 
1280 {
1281 }
1282 
1283 void ScOrcusSharedStrings::set_segment_font_name(const char* /*s*/, size_t /*n*/)
1284 {
1285 }
1286 
1288 {
1289 }
1290 
1291 void ScOrcusSharedStrings::set_segment_font_color(orcus::spreadsheet::color_elem_t,
1292  orcus::spreadsheet::color_elem_t,
1293  orcus::spreadsheet::color_elem_t,
1294  orcus::spreadsheet::color_elem_t)
1295 {
1296 }
1297 
1298 void ScOrcusSharedStrings::append_segment(const char* s, size_t n)
1299 {
1300  maCurSegment.append(s, n);
1301 }
1302 
1304 {
1305  OString aStr = maCurSegment.makeStringAndClear();
1306  return mrFactory.addString(
1307  OStringToOUString(aStr, mrFactory.getGlobalSettings().getTextEncoding()));
1308 }
1309 
1310 ScOrcusStyles::ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles ) :
1311  mrFactory(rFactory)
1312 {
1313  ScDocument& rDoc = rFactory.getDoc().getDoc();
1314  if (!bSkipDefaultStyles && !rDoc.GetStyleSheetPool()->HasStandardStyles())
1316 }
1317 
1319  mbBold(false),
1320  mbItalic(false),
1321  mnSize(10),
1322  maColor(COL_BLACK),
1323  mbHasFontAttr(false),
1324  mbHasUnderlineAttr(false),
1325  mbHasStrikeout(false),
1326  meUnderline(LINESTYLE_NONE),
1327  maUnderlineColor(COL_WHITE),
1328  meStrikeout(STRIKEOUT_NONE)
1329 {
1330 }
1331 
1333  mePattern(orcus::spreadsheet::fill_pattern_t::none),
1334  maFgColor(COL_WHITE),
1335  maBgColor(COL_WHITE),
1336  mbHasFillAttr(false)
1337 {
1338 }
1339 
1341  maCode(""),
1342  mbHasNumberFormatAttr(false)
1343 {
1344 }
1345 
1346 /*
1347 namespace {
1348 
1349 std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
1350 {
1351  rStrm << "Red: " << (int)rColor.GetRed() << ", Green: " << (int)rColor.GetGreen() << ", Blue: " << (int)rColor.GetBlue();
1352  return rStrm;
1353 }
1354 
1355 }
1356 */
1357 
1359 {
1360  if (mbHasFontAttr)
1361  {
1362  FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
1363  rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
1364 
1366  rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
1367 
1369 
1370  if(!maName.isEmpty())
1371  rSet.Put( SvxFontItem( FAMILY_DONTKNOW, maName, maName, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ));
1372 
1373  rSet.Put( SvxFontHeightItem (translateToInternal(mnSize, orcus::length_unit_t::point), 100, ATTR_FONT_HEIGHT));
1374  }
1375 
1376  if (mbHasUnderlineAttr)
1377  {
1378  SvxUnderlineItem aUnderline(meUnderline, ATTR_FONT_UNDERLINE);
1379  aUnderline.SetColor(maUnderlineColor);
1380  rSet.Put(aUnderline);
1381  }
1382 
1383  if (mbHasStrikeout)
1384  rSet.Put(SvxCrossedOutItem(meStrikeout, ATTR_FONT_CROSSEDOUT));
1385 }
1386 
1388 {
1389  if (mePattern == orcus::spreadsheet::fill_pattern_t::none)
1390  {
1391  SAL_INFO("sc.orcus.style", "no fill style");
1392  return;
1393  }
1394 
1395  if (mePattern == orcus::spreadsheet::fill_pattern_t::solid)
1396  rSet.Put(SvxBrushItem(maFgColor, ATTR_BACKGROUND));
1397 }
1398 
1400  mbHidden(false),
1401  mbLocked(true),
1402  mbPrintContent(false),
1403  mbFormulaHidden(false),
1404  mbHasProtectionAttr(false)
1405 {
1406 }
1407 
1409 {
1410  rSet.Put(ScProtectionAttr(mbLocked, mbFormulaHidden, mbHidden, mbPrintContent));
1411 }
1412 
1414  mbHasBorderAttr(false)
1415 {
1416  border_line();
1417 }
1418 
1420  meStyle(SvxBorderLineStyle::SOLID),
1421  maColor(COL_BLACK),
1422  mnWidth(0)
1423 {
1424 }
1425 
1426 namespace {
1427 
1428 SvxBoxItemLine getDirection(os::border_direction_t dir)
1429 {
1430  switch (dir)
1431  {
1432  case os::border_direction_t::right:
1433  return SvxBoxItemLine::RIGHT;
1434  case os::border_direction_t::left:
1435  return SvxBoxItemLine::LEFT;
1436  case os::border_direction_t::top:
1437  return SvxBoxItemLine::TOP;
1438  case os::border_direction_t::bottom:
1439  return SvxBoxItemLine::BOTTOM;
1440  default:
1441  break;
1442  }
1443  return SvxBoxItemLine::RIGHT;
1444 }
1445 
1446 }
1447 
1449 {
1450  SvxBoxItem aBoxItem(ATTR_BORDER);
1451  SvxLineItem aDiagonal_TLBR(ATTR_BORDER_TLBR);
1452  SvxLineItem aDiagonal_BLTR(ATTR_BORDER_BLTR);
1453 
1454  for (auto& current_border_line : border_lines)
1455  {
1456  SvxBoxItemLine eDir = getDirection(current_border_line.first);
1457 
1458  if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_tl_br)
1459  {
1460  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1461  aDiagonal_TLBR.SetLine(&aLine);
1462  }
1463  else if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_bl_tr)
1464  {
1465  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1466  aDiagonal_BLTR.SetLine(&aLine);
1467  }
1468  else
1469  {
1470  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1471  aBoxItem.SetLine(&aLine, eDir);
1472  }
1473  }
1474  rSet.Put(aDiagonal_BLTR);
1475  rSet.Put(aDiagonal_TLBR);
1476  rSet.Put(aBoxItem);
1477 }
1478 
1480 {
1481  sal_uInt32 nKey;
1482  sal_Int32 nCheckPos;
1483  SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
1484  OUString Code = maCode; /* <-- Done because the SvNumberFormatter::PutEntry demands a non const NumFormat Code*/
1485  SvNumFormatType type = SvNumFormatType::ALL;
1486 
1487  pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US);
1488  if (!nCheckPos)
1489  rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
1490 }
1491 
1493  mnFontId(0),
1494  mnFillId(0),
1495  mnBorderId(0),
1496  mnProtectionId(0),
1497  mnNumberFormatId(0),
1498  mnStyleXf(0),
1499  mbAlignment(false),
1500  meHorAlignment(SvxCellHorJustify::Standard),
1501  meVerAlignment(SvxCellVerJustify::Standard),
1502  meHorAlignMethod(SvxCellJustifyMethod::Auto),
1503  meVerAlignMethod(SvxCellJustifyMethod::Auto)
1504 {
1505 }
1506 
1508  maParentName("Default"),
1509  mnXFId(0),
1510  mnBuiltInId(0)
1511 {
1512 }
1513 
1515 {
1516  size_t nFontId = rXf.mnFontId;
1517  if (nFontId >= maFonts.size())
1518  {
1519  SAL_WARN("sc.orcus.style", "invalid font id");
1520  return;
1521  }
1522 
1523  const font& rFont = maFonts[nFontId];
1524  rFont.applyToItemSet(rSet);
1525 
1526  size_t nFillId = rXf.mnFillId;
1527  if (nFillId >= maFills.size())
1528  {
1529  SAL_WARN("sc.orcus.style", "invalid fill id");
1530  return;
1531  }
1532 
1533  const fill& rFill = maFills[nFillId];
1534  if (rFill.mbHasFillAttr)
1535  rFill.applyToItemSet(rSet);
1536 
1537  size_t nBorderId = rXf.mnBorderId;
1538  if (nBorderId >= maBorders.size())
1539  {
1540  SAL_WARN("sc.orcus.style", "invalid border id");
1541  return;
1542  }
1543  const border& rBorder = maBorders[nBorderId];
1544  if (rBorder.mbHasBorderAttr)
1545  rBorder.applyToItemSet(rSet);
1546 
1547  size_t nProtectionId = rXf.mnProtectionId;
1548  if (nProtectionId >= maProtections.size())
1549  {
1550  SAL_WARN("sc.orcus.style", "invalid protection id");
1551  return;
1552  }
1553  const protection& rProtection = maProtections[nProtectionId];
1554  if (rProtection.mbHasProtectionAttr)
1555  rProtection.applyToItemSet(rSet);
1556 
1557  size_t nNumberFormatId = rXf.mnNumberFormatId;
1558  if (nNumberFormatId >= maNumberFormats.size())
1559  {
1560  SAL_WARN("sc.orcus.style", "invalid number format id");
1561  return;
1562  }
1563  const number_format& rFormat = maNumberFormats[nNumberFormatId];
1564  if (rFormat.mbHasNumberFormatAttr)
1565  rFormat.applyToItemSet(rSet, mrFactory.getDoc().getDoc());
1566 
1567  if(rXf.mbAlignment)
1568  {
1573  }
1574 }
1575 
1577 {
1578  SAL_INFO("sc.orcus.style", "applyXfToitemSet: " << xfId);
1579  if (maCellXfs.size() <= xfId)
1580  {
1581  SAL_WARN("sc.orcus.style", "invalid xf id");
1582  return;
1583  }
1584 
1585  const xf& rXf = maCellXfs[xfId];
1586  applyXfToItemSet(rSet, rXf);
1587 }
1588 
1590 {
1591  // needed at all?
1592 }
1593 
1595 {
1596  maCurrentFont.mbBold = b;
1598 }
1599 
1601 {
1602  maCurrentFont.mbItalic = b;
1604 }
1605 
1606 void ScOrcusStyles::set_font_name(const char* s, size_t n)
1607 {
1608  OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1611 }
1612 
1614 {
1615  maCurrentFont.mnSize = point;
1617 }
1618 
1619 void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
1620 {
1621  switch(e)
1622  {
1623  case orcus::spreadsheet::underline_t::single_line:
1624  case orcus::spreadsheet::underline_t::single_accounting:
1626  break;
1627  case orcus::spreadsheet::underline_t::double_line:
1628  case orcus::spreadsheet::underline_t::double_accounting:
1630  break;
1631  case orcus::spreadsheet::underline_t::none:
1633  break;
1634  case orcus::spreadsheet::underline_t::dotted:
1636  break;
1637  case orcus::spreadsheet::underline_t::dash:
1639  break;
1640  case orcus::spreadsheet::underline_t::long_dash:
1642  break;
1643  case orcus::spreadsheet::underline_t::dot_dash:
1645  break;
1646  case orcus::spreadsheet::underline_t::dot_dot_dot_dash:
1647  maCurrentFont.meUnderline = LINESTYLE_DASHDOTDOT; // dot-dot-dot-dash is absent from underline types in libo
1648  break;
1649  case orcus::spreadsheet::underline_t::wave:
1651  break;
1652  default:
1653  ;
1654  }
1656 }
1657 
1658 void ScOrcusStyles::set_font_underline_width(orcus::spreadsheet::underline_width_t e )
1659 {
1660  if (e == orcus::spreadsheet::underline_width_t::bold || e == orcus::spreadsheet::underline_width_t::thick)
1661  {
1662  switch(maCurrentFont.meUnderline)
1663  {
1664  case LINESTYLE_NONE:
1665  case LINESTYLE_SINGLE:
1667  break;
1668  case LINESTYLE_DOTTED:
1670  break;
1671  case LINESTYLE_DASH:
1673  break;
1674  case LINESTYLE_LONGDASH:
1676  break;
1677  case LINESTYLE_DASHDOT:
1679  break;
1680  case LINESTYLE_DASHDOTDOT:
1682  break;
1683  case LINESTYLE_WAVE:
1685  break;
1686  default:
1687  ;
1688  }
1689  }
1691 }
1692 
1693 void ScOrcusStyles::set_font_underline_mode(orcus::spreadsheet::underline_mode_t /* e */)
1694 {
1695 
1696 }
1697 
1698 void ScOrcusStyles::set_font_underline_type(orcus::spreadsheet::underline_type_t e )
1699 {
1700  if (e == orcus::spreadsheet::underline_type_t::double_type)
1701  {
1702  switch(maCurrentFont.meUnderline)
1703  {
1704  case LINESTYLE_NONE:
1705  case LINESTYLE_SINGLE:
1707  break;
1708  case LINESTYLE_WAVE:
1710  break;
1711  default:
1712  ;
1713  }
1714  }
1716 }
1717 
1718 void ScOrcusStyles::set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
1719  orcus::spreadsheet::color_elem_t red,
1720  orcus::spreadsheet::color_elem_t green,
1721  orcus::spreadsheet::color_elem_t blue)
1722 {
1723  maCurrentFont.maUnderlineColor = Color(ColorTransparency, alpha, red, green, blue);
1724 }
1725 
1726 void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t /*alpha*/,
1727  orcus::spreadsheet::color_elem_t red,
1728  orcus::spreadsheet::color_elem_t green,
1729  orcus::spreadsheet::color_elem_t blue)
1730 {
1731  // Ignore the alpha value for now.
1732  maCurrentFont.maColor = Color(red, green, blue);
1734 }
1735 
1736 void ScOrcusStyles::set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t /*s*/)
1737 {
1738 }
1739 
1740 void ScOrcusStyles::set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s)
1741 {
1745  {
1746  switch (s)
1747  {
1748  case os::strikethrough_type_t::unknown:
1750  break;
1751  case os::strikethrough_type_t::none:
1753  break;
1754  case os::strikethrough_type_t::single:
1756  break;
1757  case os::strikethrough_type_t::double_type:
1759  break;
1760  default:
1761  ;
1762  }
1763  }
1765 }
1766 
1767 void ScOrcusStyles::set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s)
1768 {
1769  switch (s)
1770  {
1771  case os::strikethrough_width_t::bold:
1773  break;
1774  default:
1775  ;
1776  }
1778 }
1779 
1780 void ScOrcusStyles::set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s)
1781 {
1782  switch (s)
1783  {
1784  case os::strikethrough_text_t::slash:
1786  break;
1787  case os::strikethrough_text_t::cross:
1789  break;
1790  default:
1791  ;
1792  }
1794 }
1795 
1797 {
1798  SAL_INFO("sc.orcus.style", "commit font");
1799  maFonts.push_back(maCurrentFont);
1801  return maFonts.size() - 1;
1802 }
1803 
1804 // fill
1805 
1807 {
1808  // needed at all?
1809 }
1810 
1811 void ScOrcusStyles::set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp)
1812 {
1813  maCurrentFill.mePattern = fp;
1814 }
1815 
1817  orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
1818 {
1819  // Ignore the alpha element for now.
1820  maCurrentFill.maFgColor = Color(red, green, blue);
1822 }
1823 
1825  orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
1826 {
1827  // Ignore the alpha element for now.
1828  maCurrentFill.maBgColor = Color(red, green, blue);
1830 }
1831 
1833 {
1834  SAL_INFO("sc.orcus.style", "commit fill");
1835  maFills.push_back(maCurrentFill);
1837  return maFills.size() - 1;
1838 }
1839 
1840 // border
1841 
1843 {
1844  // needed at all?
1845 }
1846 
1848  orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style)
1849 {
1850  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1851  switch (style)
1852  {
1853  case orcus::spreadsheet::border_style_t::solid:
1854  current_line.meStyle = SvxBorderLineStyle::SOLID;
1855  current_line.mnWidth = oox::xls::API_LINE_THIN;
1856  break;
1857  case orcus::spreadsheet::border_style_t::hair:
1858  current_line.meStyle = SvxBorderLineStyle::SOLID;
1859  current_line.mnWidth = oox::xls::API_LINE_HAIR;
1860  break;
1861  case orcus::spreadsheet::border_style_t::medium:
1862  current_line.meStyle = SvxBorderLineStyle::SOLID;
1863  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1864  break;
1865  case orcus::spreadsheet::border_style_t::thick:
1866  current_line.meStyle = SvxBorderLineStyle::SOLID;
1867  current_line.mnWidth = oox::xls::API_LINE_THICK;
1868  break;
1869  case orcus::spreadsheet::border_style_t::thin:
1870  current_line.meStyle = SvxBorderLineStyle::SOLID;
1871  current_line.mnWidth = oox::xls::API_LINE_THIN;
1872  break;
1873  case orcus::spreadsheet::border_style_t::dash_dot:
1874  current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
1875  current_line.mnWidth = oox::xls::API_LINE_THIN;
1876  break;
1877  case orcus::spreadsheet::border_style_t::dash_dot_dot:
1878  current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
1879  current_line.mnWidth = oox::xls::API_LINE_THIN;
1880  break;
1881  case orcus::spreadsheet::border_style_t::dashed:
1882  current_line.meStyle = SvxBorderLineStyle::DASHED;
1883  current_line.mnWidth = oox::xls::API_LINE_THIN;
1884  break;
1885  case orcus::spreadsheet::border_style_t::dotted:
1886  current_line.meStyle = SvxBorderLineStyle::DOTTED;
1887  current_line.mnWidth = oox::xls::API_LINE_THIN;
1888  break;
1889  case orcus::spreadsheet::border_style_t::double_border:
1890  current_line.meStyle = SvxBorderLineStyle::DOUBLE;
1891  current_line.mnWidth = oox::xls::API_LINE_THICK;
1892  break;
1893  case orcus::spreadsheet::border_style_t::medium_dash_dot:
1894  case orcus::spreadsheet::border_style_t::slant_dash_dot:
1895  current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
1896  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1897  break;
1898  case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
1899  current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
1900  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1901  break;
1902  case orcus::spreadsheet::border_style_t::medium_dashed:
1903  current_line.meStyle = SvxBorderLineStyle::DASHED;
1904  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1905  break;
1906  case orcus::spreadsheet::border_style_t::unknown:
1907  case orcus::spreadsheet::border_style_t::none:
1908  current_line.mnWidth = oox::xls::API_LINE_NONE;
1909  break;
1910  default:
1911  ;
1912  }
1914 }
1915 
1916 void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
1917  orcus::spreadsheet::color_elem_t /*alpha*/,
1918  orcus::spreadsheet::color_elem_t red,
1919  orcus::spreadsheet::color_elem_t green,
1920  orcus::spreadsheet::color_elem_t blue)
1921 {
1922  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1923  current_line.maColor = Color(red, green, blue);
1924 }
1925 
1926 void ScOrcusStyles::set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit )
1927 {
1928  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1929  current_line.mnWidth = translateToInternal(val, unit);
1930 }
1931 
1933 {
1934  SAL_INFO("sc.orcus.style", "commit border");
1935  maBorders.push_back(maCurrentBorder);
1937  return maBorders.size() - 1;
1938 }
1939 
1940 // cell protection
1942 {
1945 }
1946 
1948 {
1951 }
1952 
1954 {
1957 }
1958 
1960 {
1963 }
1964 
1966 {
1967  SAL_INFO("sc.orcus.style", "commit cell protection");
1970  return maProtections.size() - 1;
1971 }
1972 
1974 {
1975 }
1976 
1978 {
1979 }
1980 
1981 void ScOrcusStyles::set_number_format_code(const char* s, size_t n)
1982 {
1983  OUString aCode(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1984  maCurrentNumberFormat.maCode = aCode;
1986 }
1987 
1989 {
1990  SAL_INFO("sc.orcus.style", "commit number format");
1993  return maNumberFormats.size() - 1;
1994 }
1995 
1996 // cell style xf
1997 
1999 {
2000  // needed at all?
2001 }
2002 
2004 {
2005  SAL_INFO("sc.orcus.style", "commit cell style xf");
2006  maCellStyleXfs.push_back(maCurrentXF);
2007  return maCellStyleXfs.size() - 1;
2008 }
2009 
2010 // cell xf
2011 
2013 {
2014  // needed at all?
2015 }
2016 
2018 {
2019  SAL_INFO("sc.orcus.style", "commit cell xf");
2020  maCellXfs.push_back(maCurrentXF);
2021  return maCellXfs.size() - 1;
2022 }
2023 
2024 // dxf
2025 
2027 {
2028 }
2029 
2031 {
2032  return 0;
2033 }
2034 
2035 // xf (cell format) - used both by cell xf and cell style xf.
2036 
2038 {
2039  maCurrentXF.mnNumberFormatId = index;
2040 }
2041 
2042 void ScOrcusStyles::set_xf_font(size_t index)
2043 {
2044  maCurrentXF.mnFontId = index;
2045 }
2046 
2047 void ScOrcusStyles::set_xf_fill(size_t index)
2048 {
2049  maCurrentXF.mnFillId = index;
2050 }
2051 
2053 {
2054  maCurrentXF.mnBorderId = index;
2055 }
2056 
2058 {
2059  maCurrentXF.mnProtectionId = index;
2060 }
2061 
2063 {
2064  maCurrentXF.mnStyleXf = index;
2065 }
2066 
2068 {
2069 }
2070 
2071 void ScOrcusStyles::set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align)
2072 {
2073  switch (align)
2074  {
2075  case os::hor_alignment_t::left:
2076  maCurrentXF.meHorAlignment = SvxCellHorJustify::Left;
2077  break;
2078  case os::hor_alignment_t::right:
2079  maCurrentXF.meHorAlignment = SvxCellHorJustify::Right;
2080  break;
2081  case os::hor_alignment_t::center:
2082  maCurrentXF.meHorAlignment = SvxCellHorJustify::Center;
2083  break;
2084  case os::hor_alignment_t::justified:
2085  maCurrentXF.meHorAlignment = SvxCellHorJustify::Block;
2086  break;
2087  case os::hor_alignment_t::distributed:
2088  maCurrentXF.meHorAlignment = SvxCellHorJustify::Block;
2089  maCurrentXF.meHorAlignMethod = SvxCellJustifyMethod::Distribute;
2090  break;
2091  case os::hor_alignment_t::unknown:
2092  maCurrentXF.meHorAlignment = SvxCellHorJustify::Standard;
2093  break;
2094  default:
2095  ;
2096  }
2097  maCurrentXF.mbAlignment = true;
2098 }
2099 
2100 void ScOrcusStyles::set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align)
2101 {
2102  switch (align)
2103  {
2104  case os::ver_alignment_t::top:
2105  maCurrentXF.meVerAlignment = SvxCellVerJustify::Top;
2106  break;
2107  case os::ver_alignment_t::bottom:
2108  maCurrentXF.meVerAlignment = SvxCellVerJustify::Bottom;
2109  break;
2110  case os::ver_alignment_t::middle:
2111  maCurrentXF.meVerAlignment = SvxCellVerJustify::Center;
2112  break;
2113  case os::ver_alignment_t::justified:
2114  maCurrentXF.meVerAlignment = SvxCellVerJustify::Block;
2115  break;
2116  case os::ver_alignment_t::distributed:
2117  maCurrentXF.meVerAlignment = SvxCellVerJustify::Block;
2118  maCurrentXF.meVerAlignMethod = SvxCellJustifyMethod::Distribute;
2119  break;
2120  case os::ver_alignment_t::unknown:
2121  maCurrentXF.meVerAlignment = SvxCellVerJustify::Standard;
2122  break;
2123  default:
2124  ;
2125  }
2126  maCurrentXF.mbAlignment = true;
2127 }
2128 
2129 // cell style entry
2130 // not needed for now for gnumeric
2131 
2133 {
2134  // needed at all?
2135 }
2136 
2137 void ScOrcusStyles::set_cell_style_name(const char* s, size_t n)
2138 {
2139  OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
2141 }
2142 
2144 {
2145  maCurrentCellStyle.mnXFId = index;
2146 }
2147 
2149 {
2150  // not needed for gnumeric
2152 }
2153 
2154 void ScOrcusStyles::set_cell_style_parent_name(const char* s, size_t n)
2155 {
2156  OUString aParentName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
2157  maCurrentCellStyle.maParentName = aParentName;
2158 }
2159 
2161 {
2162  SAL_INFO("sc.orcus.style", "commit cell style: " << maCurrentCellStyle.maName);
2164  {
2165  SAL_WARN("sc.orcus.style", "invalid xf id for commit cell style");
2166  return 0;
2167  }
2168  if (maCurrentCellStyle.mnXFId == 0)
2169  {
2170  return 0;
2171  }
2172 
2174  SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SfxStyleFamily::Para);
2176  SfxItemSet& rSet = rBase.GetItemSet();
2177 
2179  applyXfToItemSet(rSet, rXf);
2180 
2183 
2184  return 0;
2185 }
2186 
2187 // auto filter import
2188 
2190  mrGlobalSettings(rGS)
2191 {
2192 }
2193 
2195 {
2196 }
2197 
2198 void ScOrcusAutoFilter::set_range(const orcus::spreadsheet::range_t& range)
2199 {
2200  maRange.aStart.SetRow(range.first.row);
2201  maRange.aStart.SetCol(range.first.column);
2202  maRange.aEnd.SetRow(range.last.row);
2203  maRange.aEnd.SetCol(range.last.column);
2204 }
2205 
2206 void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
2207 {
2208  SAL_INFO("sc.orcus.autofilter", "set_column: " << col);
2209 }
2210 
2212 {
2213  OUString aString(p, n, mrGlobalSettings.getTextEncoding());
2214  SAL_INFO("sc.orcus.autofilter", "append_column_match_value: " << aString);
2215 }
2216 
2218 {
2219  SAL_INFO("sc.orcus.autofilter", "commit column");
2220 }
2221 
2223 {
2224  SAL_INFO("sc.orcus.autofilter", "commit");
2225 }
2226 
2227 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:961
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:738
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1514
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2198
virtual void set_result_empty() override
Definition: interface.cxx:979
Type
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1658
ScOrcusFactory & mrFactory
const sal_Int16 API_LINE_THIN
virtual size_t append(const char *s, size_t n) override
Definition: interface.cxx:1259
ScAddress aStart
Definition: address.hxx:499
virtual orcus::spreadsheet::iface::import_array_formula * get_array_formula() override
Definition: interface.cxx:1154
SharedString intern(const OUString &rStr)
static const sal_Int64 nanoSecPerSec
static const sal_Int64 secondPerMinute
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:565
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:1143
virtual void commit_column() override
Definition: interface.cxx:2217
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1310
size_t appendString(const OUString &rStr)
Definition: interface.cxx:538
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1448
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:2012
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1479
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:860
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:949
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
virtual orcus::spreadsheet::iface::import_styles * get_styles() override
Definition: interface.cxx:399
#define LANGUAGE_ENGLISH_US
virtual size_t commit_cell_style() override
Definition: interface.cxx:2160
#define DATE_TIME_FACTOR
Definition: globalnames.hxx:19
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:1824
virtual orcus::spreadsheet::iface::import_global_settings * get_global_settings() override
Definition: interface.cxx:384
virtual void set_base_position(const orcus::spreadsheet::src_address_t &pos) override
Definition: interface.cxx:227
virtual void set_fill_count(size_t n) override
Definition: interface.cxx:1806
virtual void commit() override
Definition: interface.cxx:990
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:684
void SetColor(const Color &rCol)
virtual bool SetParent(const OUString &)
ScOrcusFactory & getFactory()
Definition: interface.cxx:1251
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:2026
virtual size_t commit_number_format() override
Definition: interface.cxx:1988
virtual void commit_format() override
Definition: interface.cxx:902
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:1148
virtual void set_border_count(size_t n) override
Definition: interface.cxx:1842
ScOrcusArrayFormula maArrayFormula
LINESTYLE_BOLD
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2057
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
long Long
FAMILY_DONTKNOW
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
Definition: documen3.cxx:168
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4584
ScOrcusAutoFilter maAutoFilter
const ScOrcusGlobalSettings & mrGlobalSettings
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4498
sal_Int32 mnCol
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1698
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2143
formula::FormulaGrammar::Grammar getCalcGrammar() const
LINESTYLE_BOLDWAVE
virtual void commit() override
Definition: interface.cxx:245
const sal_Int16 API_LINE_HAIR
virtual void finalize() override
Definition: interface.cxx:404
ScOrcusFactory(ScDocument &rDoc, bool bSkipDefaultStyles=false)
Definition: interface.cxx:302
const OUString * getString(size_t nIndex) const
Definition: interface.cxx:557
ScAddress aEnd
Definition: address.hxx:500
const sc::SharedFormulaGroups & getSharedFormulaGroups() const
Definition: interface.cxx:1241
ScOrcusStyles maStyles
virtual void set_number_format_code(const char *s, size_t n) override
Definition: interface.cxx:1981
basegfx::BColor maColor
STRIKEOUT_SLASH
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
virtual SfxItemSet & GetItemSet()
void SetLine(const editeng::SvxBorderLine *pNew)
virtual void set_xf_number_format(size_t index) override
Definition: interface.cxx:2037
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:784
const SCCOL MAXCOLCOUNT
Definition: address.hxx:63
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:833
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1594
void setMergedCells(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
virtual void set_number_format_count(size_t n) override
Definition: interface.cxx:1973
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2042
void pushFillDownCellsToken(const ScAddress &rPos, uint32_t nFillSize)
Definition: interface.cxx:584
formula::FormulaGrammar::Grammar meGrammar
ScOrcusNamedExpression maNamedExpressions
virtual size_t commit_fill() override
Definition: interface.cxx:1832
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1941
rtl_TextEncoding getTextEncoding() const
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:1066
ScOrcusConditionalFormat(SCTAB nTab, ScDocument &rDoc)
Definition: interface.cxx:755
LINESTYLE_DASH
sal_uInt16 GetHour() const
virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override
Definition: interface.cxx:155
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6087
virtual size_t commit_segments() override
Definition: interface.cxx:1303
WEIGHT_BOLD
virtual void commit() override
Definition: interface.cxx:2222
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1619
SvxBorderLineStyle
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1959
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
LINESTYLE_DASHDOT
virtual void set_font_size(double point) override
Definition: interface.cxx:1613
virtual void set_cell_style_name(const char *s, size_t n) override
Definition: interface.cxx:2137
LINESTYLE_BOLDDASHDOTDOT
SvxCellVerJustify
virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override
Definition: interface.cxx:1693
formula::FormulaGrammar::Grammar meCalcGrammar
LINESTYLE_NONE
SCTAB getSheetIndex(const OUString &rName) const
virtual void set_condition_type(orcus::spreadsheet::condition_type_t type) override
Definition: interface.cxx:773
sal_uInt32 GetNanoSec() const
bool PutEntry(OUString &rString, sal_Int32 &nCheckPos, SvNumFormatType &nType, sal_uInt32 &nKey, LanguageType eLnge=LANGUAGE_DONTKNOW, bool bReplaceBooleanEquivalent=true)
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:310
ScDocumentImport & getDoc()
Definition: interface.cxx:533
virtual void set_xf_fill(size_t index) override
Definition: interface.cxx:2047
virtual void set_cell_style_parent_name(const char *s, size_t n) override
Definition: interface.cxx:2154
virtual size_t add(const char *s, size_t n) override
Definition: interface.cxx:1265
sal_uInt16 GetMin() const
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1167
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:850
void SetRow(SCROW nRowP)
Definition: address.hxx:274
static AddressConvention extractRefConvention(const Grammar eGrammar)
SvGenericNameContainerMapImpl maProperties
virtual void append_column_match_value(const char *p, size_t n) override
Definition: interface.cxx:2211
SvxCellJustifyMethod meVerAlignMethod
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1796
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4120
size_t addString(const OUString &rStr)
Definition: interface.cxx:547
virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override
Definition: interface.cxx:1736
STRIKEOUT_SINGLE
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4139
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:820
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:1816
void SetCol(SCCOL nColP)
Definition: address.hxx:278
std::vector< protection > maProtections
const SCROW MAXROWCOUNT
Definition: address.hxx:62
ScOrcusRefResolver(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:160
virtual void append_segment(const char *s, size_t n) override
Definition: interface.cxx:1298
ScOrcusSharedStrings maSharedStrings
sc::SharedFormulaGroups maFormulaGroups
ScDocumentImport maDoc
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
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:763
void setMatrixCells(const ScRange &rRange, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGrammar)
void pushSharedFormulaToken(const ScAddress &rPos, uint32_t nIndex)
Definition: interface.cxx:590
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
virtual void set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align) override
Definition: interface.cxx:2100
std::vector< xf > maCellXfs
virtual orcus::spreadsheet::range_size_t get_sheet_size() const override
Definition: interface.cxx:1226
sal_uInt16 GetSec() const
void SetTab(SCTAB nTabP)
Definition: address.hxx:282
virtual void set_character_set(orcus::character_set_t cs) override
Definition: interface.cxx:97
void pushFormulaResult(const ScAddress &rPos, double fValue)
Definition: interface.cxx:608
ScDocumentImport & mrDoc
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:440
virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1179
none
virtual void commit_entry() override
Definition: interface.cxx:884
virtual size_t commit_dxf() override
Definition: interface.cxx:2030
bool appendSheet(const OUString &rName)
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1811
void pushMatrixFormulaToken(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, uint32_t nRowRange, uint32_t nColRange)
Definition: interface.cxx:596
void fillDownCells(const ScAddress &rPos, SCROW nFillSize)
ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport &rDoc)
Definition: interface.cxx:689
ScOrcusFactory & mrFactory
virtual orcus::spreadsheet::iface::import_table * get_table() override
Definition: interface.cxx:1128
std::vector< number_format > maNumberFormats
virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:1091
virtual void set_font_italic(bool b) override
Definition: interface.cxx:1600
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:807
OUString maFormula
void IncCol(SCCOL nDelta=1)
Definition: address.hxx:303
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2189
LINESTYLE_DOUBLEWAVE
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:813
SCTAB getSheetCount() const
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
SCTAB getIndex() const
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:1075
LINESTYLE_WAVE
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:955
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:1185
virtual orcus::spreadsheet::iface::import_shared_strings * get_shared_strings() override
Definition: interface.cxx:389
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:1718
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:767
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1847
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4794
WEIGHT_NORMAL
virtual void set_result_value(double value) override
Definition: interface.cxx:967
void IncRow(SCROW nDelta=1)
Definition: address.hxx:299
virtual void set_show_value(bool show) override
Definition: interface.cxx:839
LINESTYLE_SINGLE
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:1160
ScDocumentImport & getDoc() const
virtual void commit_condition() override
Definition: interface.cxx:790
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
virtual orcus::spreadsheet::iface::import_sheet_properties * get_sheet_properties() override
Definition: interface.cxx:1133
PITCH_DONTKNOW
virtual void set_number_format_identifier(size_t n) override
Definition: interface.cxx:1977
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4817
SvNumFormatType
virtual orcus::spreadsheet::iface::import_sheet * get_sheet(const char *sheet_name, size_t sheet_name_length) override
Definition: interface.cxx:347
LINESTYLE_BOLDLONGDASH
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1387
ScOrcusGlobalSettings(ScDocumentImport &rDoc)
Definition: interface.cxx:84
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:1916
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1408
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:726
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:750
void setSheetName(SCTAB nTab, const OUString &rName)
virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override
Definition: interface.cxx:149
std::vector< xf > maCellStyleXfs
ColorTransparency
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1358
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1064
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:660
ITALIC_NONE
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1965
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:1998
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:1291
virtual void set_xf_style_xf(size_t index) override
Definition: interface.cxx:2062
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2071
FontLineStyle meUnderline
virtual ~ScOrcusSheetProperties() override
Definition: interface.cxx:695
STRIKEOUT_X
virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1096
void setAutoInput(const ScAddress &rPos, const OUString &rStr, const ScSetStringParam *pStringParam=nullptr)
std::vector< std::unique_ptr< ScOrcusSheet > > maSheets
formula::FormulaGrammar::Grammar meGrammar
virtual void set_segment_bold(bool b) override
Definition: interface.cxx:1275
bool HasStandardStyles() const
Definition: stlpool.hxx:51
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:1235
virtual void set_column(orcus::spreadsheet::col_t col) override
Definition: interface.cxx:2206
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:568
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1256
const ScTokenArray * get(size_t nSharedId) const
LINESTYLE_LONGDASH
virtual void set_segment_font_name(const char *s, size_t n) override
Definition: interface.cxx:1283
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1740
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
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:240
virtual size_t commit_cell_style_xf() override
Definition: interface.cxx:2003
const sal_Int16 API_LINE_MEDIUM
number_format maCurrentNumberFormat
virtual void set_segment_font(size_t font_index) override
Definition: interface.cxx:1271
void setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &rIndicator)
Definition: interface.cxx:679
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void setFormulaCell(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, const double *pResult=nullptr)
FontWeight
OUString ScResId(std::string_view aId)
Definition: scdll.cxx:89
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:1726
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1056
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:394
const ScOrcusGlobalSettings & mrGlobalSettings
virtual orcus::spreadsheet::iface::import_conditional_format * get_conditional_format() override
Definition: interface.cxx:1138
const sal_Int16 API_LINE_THICK
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2132
STRIKEOUT_DOUBLE
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1287
virtual void commit() override
Definition: interface.cxx:1101
orcus::spreadsheet::fill_pattern_t mePattern
LINESTYLE_DASHDOTDOT
ITALIC_NORMAL
virtual ~ScOrcusFormula() override
Definition: interface.cxx:947
ScDocumentImport & getDoc()
Definition: interface.cxx:1118
LINESTYLE_DOTTED
FontStrikeout meStrikeout
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2067
bool mbBold
ScOrcusFormula maFormula
OStringBuffer maCurSegment
ScOrcusNamedExpression(ScDocumentImport &rDoc, const ScOrcusGlobalSettings &rGS, SCTAB nTab=-1)
Definition: interface.cxx:214
void setStringCell(const ScAddress &rPos, const OUString &rStr)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
void CreateStandardStyles()
Definition: stlpool.cxx:210
OUString maName
#define SAL_INFO(area, stream)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
Definition: stlpool.cxx:72
OUString aName
void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay)
ScDocumentImport & mrDoc
ScOrcusNamedExpression maNamedExpressions
SvxBoxItemLine
double mnWidth
ScOrcusConditionalFormat maConditionalFormat
void set(size_t nSharedId, std::unique_ptr< ScTokenArray > pArray)
ScOrcusSheet(ScDocumentImport &rDoc, SCTAB nTab, ScOrcusFactory &rFactory)
Definition: interface.cxx:908
ScRefFlags Parse(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, ScAddress::ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, const OUString *pErrRef=nullptr)
Definition: address.cxx:1742
ScOrcusFactory & mrFactory
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
virtual ~ScOrcusAutoFilter() override
Definition: interface.cxx:2194
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
orcus::spreadsheet::src_range_t resolve_range(const char *p, size_t n) override
Definition: interface.cxx:187
virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) override
Definition: interface.cxx:732
ScFormatEntry::Type meEntryType
virtual void set_range(const char *p, size_t n) override
Definition: interface.cxx:889
SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden)
Definition: document.cxx:4490
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6092
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1767
orcus::spreadsheet::src_address_t resolve_address(const char *p, size_t n) override
Definition: interface.cxx:163
virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1086
void cellInserted()
Definition: interface.cxx:1108
LINESTYLE_BOLDDOTTED
STRIKEOUT_DONTKNOW
ScOrcusSheet & mrSheet
LINESTYLE_BOLDDASH
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:1926
virtual size_t commit_cell_xf() override
Definition: interface.cxx:2017
ResultType type
void pushCellStoreAutoToken(const ScAddress &rPos, const OUString &rVal)
Definition: interface.cxx:562
#define SAL_WARN(area, stream)
virtual void set_result_string(size_t sindex) override
Definition: interface.cxx:973
static const sal_Int64 secondPerHour
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, const Details &rDetails=detailsOOOa1, ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, sal_Int32 *pSheetEndPos=nullptr, const OUString *pErrRef=nullptr)
Definition: address.cxx:1548
ScOrcusFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:936
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:744
SvxCellJustifyMethod
sal_Int32 mnRow
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1947
LINESTYLE_DOUBLE
void setNumericCell(const ScAddress &rPos, double fVal)
virtual void set_icon_name(const char *p, size_t n) override
Definition: interface.cxx:795
STRIKEOUT_NONE
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1589
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:855
ScOrcusGlobalSettings maGlobalSettings
virtual size_t commit_border() override
Definition: interface.cxx:1932
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:1606
const Date & GetNullDate() const
virtual void set_origin_date(int year, int month, int day) override
Definition: interface.cxx:92
std::vector< border > maBorders
virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override
Definition: interface.cxx:1173
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
CellStoreToken(const ScAddress &rPos, Type eType)
Definition: interface.cxx:260
virtual void set_formula(const char *p, size_t n) override
Definition: interface.cxx:779
StringHashType maStringHash
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
ScOrcusStyles & mrStyles
RedlineType meType
protection maCurrentProtection
virtual void set_cell_print_content(bool b) override
Definition: interface.cxx:1953
aStr
virtual orcus::spreadsheet::iface::import_auto_filter * get_auto_filter() override
Definition: interface.cxx:1123
SvxCellJustifyMethod meHorAlignMethod
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
virtual void set_result_bool(bool value) override
Definition: interface.cxx:984
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
Definition: rangenam.cxx:814
virtual void set_iconset_reverse(bool reverse) override
Definition: interface.cxx:844
LINESTYLE_BOLDDASHDOT
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:801
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2148
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1279
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:234
STRIKEOUT_BOLD
virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override
Definition: interface.cxx:1780
ScDocumentImport & mrDoc
sal_uInt16 nPos
sal_Int16 SCTAB
Definition: types.hxx:22
FontItalic
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:1081
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2052
const sal_Int16 API_LINE_NONE
Font auto color (system window text color).
ScDocument & getDoc()
virtual void set_min_databar_length(double length) override
Definition: interface.cxx:827
sal_uInt32 mnSize