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