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  break;
707  case orcus::length_unit_t::twip:
708  return nVal;
709  break;
710  case orcus::length_unit_t::point:
711  return nVal * 20.0;
712  break;
713  case orcus::length_unit_t::centimeter:
714  return nVal * 20.0 * 72.0 / 2.54;
715  break;
716  case orcus::length_unit_t::unknown:
717  if (nVal != 0)
718  SAL_WARN("sc.orcus", "unknown unit");
719  break;
720  default:
721  break;
722  }
723  return nVal;
724 }
725 
726 
727 }
728 
729 void ScOrcusSheetProperties::set_column_width(os::col_t col, double width, orcus::length_unit_t unit)
730 {
731  double nNewWidth = translateToInternal(width, unit);
732  mrDoc.getDoc().SetColWidthOnly(col, mnTab, nNewWidth);
733 }
734 
735 void ScOrcusSheetProperties::set_column_hidden(os::col_t col, bool hidden)
736 {
737  if (hidden)
738  mrDoc.getDoc().SetColHidden(col, col, mnTab, hidden);
739 }
740 
741 void ScOrcusSheetProperties::set_row_height(os::row_t row, double height, orcus::length_unit_t unit)
742 {
743  double nNewHeight = translateToInternal(height, unit);
744  mrDoc.getDoc().SetRowHeightOnly(row, row,mnTab, nNewHeight);
745 }
746 
747 void ScOrcusSheetProperties::set_row_hidden(os::row_t row, bool hidden)
748 {
749  if (hidden)
750  mrDoc.getDoc().SetRowHidden(row, row, mnTab, hidden);
751 }
752 
753 void ScOrcusSheetProperties::set_merge_cell_range(const orcus::spreadsheet::range_t& range)
754 {
755  mrDoc.setMergedCells(mnTab, range.first.column, range.first.row, range.last.column, range.last.row);
756 }
757 
759  mnTab(nTab),
760  mrDoc(rDoc),
761  mpCurrentFormat(new ScConditionalFormat(0, &mrDoc)),
762  meEntryType(ScFormatEntry::Type::Condition)
763 {
764 }
765 
767 {
768 }
769 
770 void ScOrcusConditionalFormat::set_color(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
771  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
772 {
773  SAL_INFO("sc.orcus.condformat", "set_color");
774 }
775 
776 void ScOrcusConditionalFormat::set_condition_type(os::condition_type_t /*type*/)
777 {
779  SAL_INFO("sc.orcus.condformat", "set_condition_type");
780 }
781 
782 void ScOrcusConditionalFormat::set_formula(const char* /*p*/, size_t /*n*/)
783 {
784  SAL_INFO("sc.orcus.condformat", "set_formula");
785 }
786 
787 void ScOrcusConditionalFormat::set_date(os::condition_date_t /*date*/)
788 {
790  SAL_INFO("sc.orcus.condformat", "set_date");
791 }
792 
794 {
795  SAL_INFO("sc.orcus.condformat", "commit_condition");
796 }
797 
798 void ScOrcusConditionalFormat::set_icon_name(const char* /*p*/, size_t /*n*/)
799 {
801  SAL_INFO("sc.orcus.condformat", "set_icon_name");
802 }
803 
805 {
807  SAL_INFO("sc.orcus.condformat", "set_databar_gradient");
808 }
809 
810 void ScOrcusConditionalFormat::set_databar_axis(os::databar_axis_t /*axis*/)
811 {
813  SAL_INFO("sc.orcus.condformat", "set_databar_axis");
814 }
815 
816 void ScOrcusConditionalFormat::set_databar_color_positive(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
817  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
818 {
820  SAL_INFO("sc.orcus.condformat", "set_databar_color_positive");
821 }
822 
823 void ScOrcusConditionalFormat::set_databar_color_negative(os::color_elem_t /*alpha*/, os::color_elem_t /*red*/,
824  os::color_elem_t /*green*/, os::color_elem_t /*blue*/)
825 {
827  SAL_INFO("sc.orcus.condformat", "set_databar_color_negative");
828 }
829 
831 {
833  SAL_INFO("sc.orcus.condformat", "set_min_databar_length");
834 }
835 
837 {
839  SAL_INFO("sc.orcus.condformat", "set_max_databar_length");
840 }
841 
843 {
844  SAL_INFO("sc.orcus.condformat", "set_show_value");
845 }
846 
848 {
850  SAL_INFO("sc.orcus.condformat", "set_iconset_reverse");
851 }
852 
854 {
855  SAL_INFO("sc.orcus.condformat", "set_xf_id");
856 }
857 
858 void ScOrcusConditionalFormat::set_operator(os::condition_operator_t /*condition_type*/)
859 {
860  SAL_INFO("sc.orcus.condformat", "set_operator");
861 }
862 
863 void ScOrcusConditionalFormat::set_type(os::conditional_format_t type)
864 {
865  switch (type)
866  {
867  case os::conditional_format_t::condition:
868  case os::conditional_format_t::formula:
870  // mpCurrentEntry.reset(new ScCondFormatEntry());
871  break;
872  case os::conditional_format_t::date:
873  break;
874  case os::conditional_format_t::colorscale:
875  break;
876  case os::conditional_format_t::databar:
877  break;
878  case os::conditional_format_t::iconset:
879  break;
880  default:
881  SAL_INFO("sc.orcus.condformat", "unknown conditional_format_t value");
882  break;
883  }
884  SAL_INFO("sc.orcus.condformat", "set_type");
885 }
886 
888 {
889  SAL_INFO("sc.orcus.condformat", "commit_entry");
890 }
891 
892 void ScOrcusConditionalFormat::set_range(const char* /*p*/, size_t /*n*/)
893 {
894  SAL_INFO("sc.orcus.condformat", "set_range");
895 }
896 
897 void ScOrcusConditionalFormat::set_range(os::row_t row_start, os::col_t col_start,
898  os::row_t row_end, os::col_t col_end)
899 {
900  SAL_INFO("sc.orcus.condformat", "set_range");
901  ScRange aRange(col_start, row_start, mnTab, col_end, row_end, mnTab);
902  mpCurrentFormat->SetRange(aRange);
903 }
904 
906 {
907  SAL_INFO("sc.orcus.condformat", "commit_format");
908  mpCurrentFormat.reset(new ScConditionalFormat(0, &mrDoc));
909 }
910 
912  mrDoc(rDoc),
913  mnTab(nTab),
914  mrFactory(rFactory),
915  mrStyles(static_cast<ScOrcusStyles&>(*mrFactory.get_styles())),
916  maAutoFilter(rFactory.getGlobalSettings()),
917  maProperties(mnTab, mrDoc),
918  maConditionalFormat(mnTab, rDoc.getDoc()),
919  maNamedExpressions(rDoc, rFactory.getGlobalSettings(), nTab),
920  maFormula(*this),
921  maArrayFormula(*this),
922  mnCellCount(0)
923 {
924 }
925 
927 {
928  mnCol = -1;
929  mnRow = -1;
930  maFormula.clear();
933  mbShared = false;
935  mnResult = 0;
936  mfResult = 0.0;
937 }
938 
940  mrSheet(rSheet),
941  mnCol(-1),
942  mnRow(-1),
943  meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED),
944  mnSharedFormulaIndex(0),
945  mbShared(false),
946  meResType(ResultType::NotSet),
947  mnResult(0),
948  mfResult(0.0) {}
949 
951 
952 void ScOrcusFormula::set_position(os::row_t row, os::col_t col)
953 {
954  mnCol = col;
955  mnRow = row;
956 }
957 
958 void ScOrcusFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
959 {
961  meGrammar = getCalcGrammarFromOrcus(grammar);
962 }
963 
965 {
966  mnSharedFormulaIndex = index;
967  mbShared = true;
968 }
969 
971 {
973  mfResult = value;
974 }
975 
977 {
979  mnResult = sindex;
980 }
981 
983 {
985 }
986 
988 {
990  mfResult = value ? 1.0 : 0.0;
991 }
992 
994 {
995  ScOrcusFactory& rFactory = mrSheet.getFactory();
998 
999  if (mbShared)
1000  {
1001  if (maFormula.isEmpty())
1002  {
1003  // shared formula that references existing formula token.
1004  const ScTokenArray* pArray = rGroups.get(mnSharedFormulaIndex);
1005  if (!pArray)
1006  return;
1007  }
1008  else
1009  {
1010  // topmost shared formula with new formula token.
1011 
1012  // Compile the formula expression into tokens.
1013  ScCompiler aComp(mrSheet.getDoc().getDoc(), aPos, meGrammar);
1014  std::unique_ptr<ScTokenArray> pArray = aComp.CompileString(maFormula);
1015  if (!pArray)
1016  // Tokenization failed.
1017  return;
1018 
1019  rGroups.set(mnSharedFormulaIndex, std::move(pArray));
1020  }
1022  }
1023  else
1024  {
1025  // non-shared formula
1026  rFactory.pushCellStoreToken(aPos, maFormula, meGrammar);
1027  }
1028 
1029  switch (meResType)
1030  {
1031  case ResultType::String:
1032  {
1033  const OUString* pStr = rFactory.getString(mnResult);
1034  if (pStr)
1035  rFactory.pushFormulaResult(aPos, *pStr);
1036  break;
1037  }
1038  case ResultType::Value:
1039  rFactory.pushFormulaResult(aPos, mfResult);
1040  break;
1041  default:
1042  ;
1043  }
1044 
1046 }
1047 
1049 {
1050  mnCol = -1;
1051  mnRow = -1;
1052  mnColRange = 0;
1053  mnRowRange = 0;
1054 
1055  maFormula.clear();
1057 }
1058 
1060  mrSheet(rSheet),
1061  mnCol(-1),
1062  mnRow(-1),
1063  mnColRange(0),
1064  mnRowRange(0),
1065  meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED) {}
1066 
1068 
1069 void ScOrcusArrayFormula::set_range(const os::range_t& range)
1070 {
1071  mnCol = range.first.column;
1072  mnRow = range.first.row;
1073 
1074  mnColRange = range.last.column - range.first.column + 1;
1075  mnRowRange = range.last.row - range.first.column + 1;
1076 }
1077 
1078 void ScOrcusArrayFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
1079 {
1080  meGrammar = getCalcGrammarFromOrcus(grammar);
1082 }
1083 
1084 void ScOrcusArrayFormula::set_result_value(os::row_t /*row*/, os::col_t /*col*/, double /*value*/)
1085 {
1086  // TODO : implement result cache for matrix
1087 }
1088 
1089 void ScOrcusArrayFormula::set_result_string(os::row_t /*row*/, os::col_t /*col*/, size_t /*sindex*/)
1090 {
1091  // TODO : implement result cache for matrix
1092 }
1093 
1094 void ScOrcusArrayFormula::set_result_empty(os::row_t /*row*/, os::col_t /*col*/)
1095 {
1096  // TODO : implement result cache for matrix
1097 }
1098 
1099 void ScOrcusArrayFormula::set_result_bool(os::row_t /*row*/, os::col_t /*col*/, bool /*value*/)
1100 {
1101  // TODO : implement result cache for matrix
1102 }
1103 
1105 {
1106  ScAddress aPos(mnCol, mnRow, mrSheet.getIndex());
1109 }
1110 
1112 {
1113  ++mnCellCount;
1114  if (mnCellCount == 100000)
1115  {
1117  mnCellCount = 0;
1118  }
1119 }
1120 
1122 {
1123  return mrDoc;
1124 }
1125 
1126 os::iface::import_auto_filter* ScOrcusSheet::get_auto_filter()
1127 {
1128  return &maAutoFilter;
1129 }
1130 
1131 os::iface::import_table* ScOrcusSheet::get_table()
1132 {
1133  return nullptr;
1134 }
1135 
1136 os::iface::import_sheet_properties* ScOrcusSheet::get_sheet_properties()
1137 {
1138  return &maProperties;
1139 }
1140 
1141 os::iface::import_conditional_format* ScOrcusSheet::get_conditional_format()
1142 {
1143  return &maConditionalFormat;
1144 }
1145 
1146 os::iface::import_named_expression* ScOrcusSheet::get_named_expression()
1147 {
1148  return &maNamedExpressions;
1149 }
1150 
1151 os::iface::import_formula* ScOrcusSheet::get_formula()
1152 {
1153  maFormula.reset();
1154  return &maFormula;
1155 }
1156 
1157 os::iface::import_array_formula* ScOrcusSheet::get_array_formula()
1158 {
1160  return &maArrayFormula;
1161 }
1162 
1163 void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
1164 {
1165  OUString aVal(p, n, mrFactory.getGlobalSettings().getTextEncoding());
1166  mrFactory.pushCellStoreAutoToken(ScAddress(col, row, mnTab), aVal);
1167  cellInserted();
1168 }
1169 
1170 void ScOrcusSheet::set_string(os::row_t row, os::col_t col, size_t sindex)
1171 {
1172  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), uint32_t(sindex));
1173  cellInserted();
1174 }
1175 
1176 void ScOrcusSheet::set_value(os::row_t row, os::col_t col, double value)
1177 {
1178  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), value);
1179  cellInserted();
1180 }
1181 
1182 void ScOrcusSheet::set_bool(os::row_t row, os::col_t col, bool value)
1183 {
1184  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), value ? 1.0 : 0.0);
1185  cellInserted();
1186 }
1187 
1189  os::row_t row, os::col_t col, int year, int month, int day, int hour, int minute, double second)
1190 {
1191  SvNumberFormatter* pFormatter = mrDoc.getDoc().GetFormatTable();
1192 
1193  Date aDate(day, month, year);
1194  sal_uInt32 nSec = floor(second);
1195  sal_uInt32 nNanoSec = (second - nSec) * ::tools::Time::nanoSecPerSec;
1196  tools::Time aTime(hour, minute, nSec, nNanoSec);
1197  tools::Long nDateDiff = aDate - pFormatter->GetNullDate();
1198 
1199  double fTime =
1200  static_cast<double>(aTime.GetNanoSec()) / ::tools::Time::nanoSecPerSec +
1201  aTime.GetSec() +
1204 
1205  fTime /= DATE_TIME_FACTOR;
1206 
1207  mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), nDateDiff + fTime);
1208  cellInserted();
1209 }
1210 
1211 void ScOrcusSheet::set_format(os::row_t row, os::col_t col, size_t xf_index)
1212 {
1213  SAL_INFO("sc.orcus.style", "set format: " << xf_index);
1214 
1215  ScPatternAttr aPattern(mrDoc.getDoc().GetPool());
1216  mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
1217  mrDoc.getDoc().ApplyPattern(col, row, mnTab, aPattern);
1218 }
1219 
1220 void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start,
1221  os::row_t row_end, os::col_t col_end, size_t xf_index)
1222 {
1223  SAL_INFO("sc.orcus.style", "set format range: " << xf_index);
1224  ScPatternAttr aPattern(mrDoc.getDoc().GetPool());
1225  mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
1226  mrDoc.getDoc().ApplyPatternAreaTab(col_start, row_start, col_end, row_end, mnTab, aPattern);
1227 }
1228 
1229 orcus::spreadsheet::range_size_t ScOrcusSheet::get_sheet_size() const
1230 {
1231  orcus::spreadsheet::range_size_t ret;
1232  ret.rows = MAXROWCOUNT;
1233  ret.columns = MAXCOLCOUNT;
1234 
1235  return ret;
1236 }
1237 
1238 void ScOrcusSheet::fill_down_cells(os::row_t row, os::col_t col, os::row_t range_size)
1239 {
1240  mrFactory.pushFillDownCellsToken(ScAddress(col, row, mnTab), range_size);
1241  cellInserted();
1242 }
1243 
1245 {
1246  return maFormulaGroups;
1247 }
1248 
1250 {
1251  return maFormulaGroups;
1252 }
1253 
1255 {
1256  return mrFactory;
1257 }
1258 
1260  mrFactory(rFactory) {}
1261 
1262 size_t ScOrcusSharedStrings::append(const char* s, size_t n)
1263 {
1264  OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1265  return mrFactory.appendString(aNewString);
1266 }
1267 
1268 size_t ScOrcusSharedStrings::add(const char* s, size_t n)
1269 {
1270  OUString aNewString(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1271  return mrFactory.addString(aNewString);
1272 }
1273 
1274 void ScOrcusSharedStrings::set_segment_font(size_t /*font_index*/)
1275 {
1276 }
1277 
1279 {
1280 }
1281 
1283 {
1284 }
1285 
1286 void ScOrcusSharedStrings::set_segment_font_name(const char* /*s*/, size_t /*n*/)
1287 {
1288 }
1289 
1291 {
1292 }
1293 
1294 void ScOrcusSharedStrings::set_segment_font_color(orcus::spreadsheet::color_elem_t,
1295  orcus::spreadsheet::color_elem_t,
1296  orcus::spreadsheet::color_elem_t,
1297  orcus::spreadsheet::color_elem_t)
1298 {
1299 }
1300 
1301 void ScOrcusSharedStrings::append_segment(const char* s, size_t n)
1302 {
1303  maCurSegment.append(s, n);
1304 }
1305 
1307 {
1308  OString aStr = maCurSegment.makeStringAndClear();
1309  return mrFactory.addString(
1310  OStringToOUString(aStr, mrFactory.getGlobalSettings().getTextEncoding()));
1311 }
1312 
1313 ScOrcusStyles::ScOrcusStyles( ScOrcusFactory& rFactory, bool bSkipDefaultStyles ) :
1314  mrFactory(rFactory)
1315 {
1316  ScDocument& rDoc = rFactory.getDoc().getDoc();
1317  if (!bSkipDefaultStyles && !rDoc.GetStyleSheetPool()->HasStandardStyles())
1319 }
1320 
1322  mbBold(false),
1323  mbItalic(false),
1324  mnSize(10),
1325  maColor(COL_BLACK),
1326  mbHasFontAttr(false),
1327  mbHasUnderlineAttr(false),
1328  mbHasStrikeout(false),
1329  meUnderline(LINESTYLE_NONE),
1330  maUnderlineColor(COL_WHITE),
1331  meStrikeout(STRIKEOUT_NONE)
1332 {
1333 }
1334 
1336  mePattern(orcus::spreadsheet::fill_pattern_t::none),
1337  maFgColor(COL_WHITE),
1338  maBgColor(COL_WHITE),
1339  mbHasFillAttr(false)
1340 {
1341 }
1342 
1344  maCode(""),
1345  mbHasNumberFormatAttr(false)
1346 {
1347 }
1348 
1349 /*
1350 namespace {
1351 
1352 std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
1353 {
1354  rStrm << "Red: " << (int)rColor.GetRed() << ", Green: " << (int)rColor.GetGreen() << ", Blue: " << (int)rColor.GetBlue();
1355  return rStrm;
1356 }
1357 
1358 }
1359 */
1360 
1362 {
1363  if (mbHasFontAttr)
1364  {
1365  FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
1366  rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
1367 
1369  rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
1370 
1372 
1373  if(!maName.isEmpty())
1374  rSet.Put( SvxFontItem( FAMILY_DONTKNOW, maName, maName, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ));
1375 
1376  rSet.Put( SvxFontHeightItem (translateToInternal(mnSize, orcus::length_unit_t::point), 100, ATTR_FONT_HEIGHT));
1377  }
1378 
1379  if (mbHasUnderlineAttr)
1380  {
1381  SvxUnderlineItem aUnderline(meUnderline, ATTR_FONT_UNDERLINE);
1382  aUnderline.SetColor(maUnderlineColor);
1383  rSet.Put(aUnderline);
1384  }
1385 
1386  if (mbHasStrikeout)
1387  rSet.Put(SvxCrossedOutItem(meStrikeout, ATTR_FONT_CROSSEDOUT));
1388 }
1389 
1391 {
1392  if (mePattern == orcus::spreadsheet::fill_pattern_t::none)
1393  {
1394  SAL_INFO("sc.orcus.style", "no fill style");
1395  return;
1396  }
1397 
1398  if (mePattern == orcus::spreadsheet::fill_pattern_t::solid)
1399  rSet.Put(SvxBrushItem(maFgColor, ATTR_BACKGROUND));
1400 }
1401 
1403  mbHidden(false),
1404  mbLocked(true),
1405  mbPrintContent(false),
1406  mbFormulaHidden(false),
1407  mbHasProtectionAttr(false)
1408 {
1409 }
1410 
1412 {
1413  rSet.Put(ScProtectionAttr(mbLocked, mbFormulaHidden, mbHidden, mbPrintContent));
1414 }
1415 
1417  mbHasBorderAttr(false)
1418 {
1419  border_line();
1420 }
1421 
1423  meStyle(SvxBorderLineStyle::SOLID),
1424  maColor(COL_BLACK),
1425  mnWidth(0)
1426 {
1427 }
1428 
1429 namespace {
1430 
1431 SvxBoxItemLine getDirection(os::border_direction_t dir)
1432 {
1433  switch (dir)
1434  {
1435  case os::border_direction_t::right:
1436  return SvxBoxItemLine::RIGHT;
1437  break;
1438  case os::border_direction_t::left:
1439  return SvxBoxItemLine::LEFT;
1440  break;
1441  case os::border_direction_t::top:
1442  return SvxBoxItemLine::TOP;
1443  break;
1444  case os::border_direction_t::bottom:
1445  return SvxBoxItemLine::BOTTOM;
1446  break;
1447  default:
1448  break;
1449  }
1450  return SvxBoxItemLine::RIGHT;
1451 }
1452 
1453 }
1454 
1456 {
1457  SvxBoxItem aBoxItem(ATTR_BORDER);
1458  SvxLineItem aDiagonal_TLBR(ATTR_BORDER_TLBR);
1459  SvxLineItem aDiagonal_BLTR(ATTR_BORDER_BLTR);
1460 
1461  for (auto& current_border_line : border_lines)
1462  {
1463  SvxBoxItemLine eDir = getDirection(current_border_line.first);
1464 
1465  if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_tl_br)
1466  {
1467  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1468  aDiagonal_TLBR.SetLine(&aLine);
1469  }
1470  else if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_bl_tr)
1471  {
1472  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1473  aDiagonal_BLTR.SetLine(&aLine);
1474  }
1475  else
1476  {
1477  editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
1478  aBoxItem.SetLine(&aLine, eDir);
1479  }
1480  }
1481  rSet.Put(aDiagonal_BLTR);
1482  rSet.Put(aDiagonal_TLBR);
1483  rSet.Put(aBoxItem);
1484 }
1485 
1487 {
1488  sal_uInt32 nKey;
1489  sal_Int32 nCheckPos;
1490  SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
1491  OUString Code = maCode; /* <-- Done because the SvNumberFormatter::PutEntry demands a non const NumFormat Code*/
1492  SvNumFormatType type = SvNumFormatType::ALL;
1493 
1494  pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US);
1495  if (!nCheckPos)
1496  rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
1497 }
1498 
1500  mnFontId(0),
1501  mnFillId(0),
1502  mnBorderId(0),
1503  mnProtectionId(0),
1504  mnNumberFormatId(0),
1505  mnStyleXf(0),
1506  mbAlignment(false),
1507  meHorAlignment(SvxCellHorJustify::Standard),
1508  meVerAlignment(SvxCellVerJustify::Standard),
1509  meHorAlignMethod(SvxCellJustifyMethod::Auto),
1510  meVerAlignMethod(SvxCellJustifyMethod::Auto)
1511 {
1512 }
1513 
1515  maParentName("Default"),
1516  mnXFId(0),
1517  mnBuiltInId(0)
1518 {
1519 }
1520 
1522 {
1523  size_t nFontId = rXf.mnFontId;
1524  if (nFontId >= maFonts.size())
1525  {
1526  SAL_WARN("sc.orcus.style", "invalid font id");
1527  return;
1528  }
1529 
1530  const font& rFont = maFonts[nFontId];
1531  rFont.applyToItemSet(rSet);
1532 
1533  size_t nFillId = rXf.mnFillId;
1534  if (nFillId >= maFills.size())
1535  {
1536  SAL_WARN("sc.orcus.style", "invalid fill id");
1537  return;
1538  }
1539 
1540  const fill& rFill = maFills[nFillId];
1541  if (rFill.mbHasFillAttr)
1542  rFill.applyToItemSet(rSet);
1543 
1544  size_t nBorderId = rXf.mnBorderId;
1545  if (nBorderId >= maBorders.size())
1546  {
1547  SAL_WARN("sc.orcus.style", "invalid border id");
1548  return;
1549  }
1550  const border& rBorder = maBorders[nBorderId];
1551  if (rBorder.mbHasBorderAttr)
1552  rBorder.applyToItemSet(rSet);
1553 
1554  size_t nProtectionId = rXf.mnProtectionId;
1555  if (nProtectionId >= maProtections.size())
1556  {
1557  SAL_WARN("sc.orcus.style", "invalid protection id");
1558  return;
1559  }
1560  const protection& rProtection = maProtections[nProtectionId];
1561  if (rProtection.mbHasProtectionAttr)
1562  rProtection.applyToItemSet(rSet);
1563 
1564  size_t nNumberFormatId = rXf.mnNumberFormatId;
1565  if (nNumberFormatId >= maNumberFormats.size())
1566  {
1567  SAL_WARN("sc.orcus.style", "invalid number format id");
1568  return;
1569  }
1570  const number_format& rFormat = maNumberFormats[nNumberFormatId];
1571  if (rFormat.mbHasNumberFormatAttr)
1572  rFormat.applyToItemSet(rSet, mrFactory.getDoc().getDoc());
1573 
1574  if(rXf.mbAlignment)
1575  {
1580  }
1581 }
1582 
1584 {
1585  SAL_INFO("sc.orcus.style", "applyXfToitemSet: " << xfId);
1586  if (maCellXfs.size() <= xfId)
1587  {
1588  SAL_WARN("sc.orcus.style", "invalid xf id");
1589  return;
1590  }
1591 
1592  const xf& rXf = maCellXfs[xfId];
1593  applyXfToItemSet(rSet, rXf);
1594 }
1595 
1597 {
1598  // needed at all?
1599 }
1600 
1602 {
1603  maCurrentFont.mbBold = b;
1605 }
1606 
1608 {
1609  maCurrentFont.mbItalic = b;
1611 }
1612 
1613 void ScOrcusStyles::set_font_name(const char* s, size_t n)
1614 {
1615  OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1618 }
1619 
1621 {
1622  maCurrentFont.mnSize = point;
1624 }
1625 
1626 void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
1627 {
1628  switch(e)
1629  {
1630  case orcus::spreadsheet::underline_t::single_line:
1631  case orcus::spreadsheet::underline_t::single_accounting:
1633  break;
1634  case orcus::spreadsheet::underline_t::double_line:
1635  case orcus::spreadsheet::underline_t::double_accounting:
1637  break;
1638  case orcus::spreadsheet::underline_t::none:
1640  break;
1641  case orcus::spreadsheet::underline_t::dotted:
1643  break;
1644  case orcus::spreadsheet::underline_t::dash:
1646  break;
1647  case orcus::spreadsheet::underline_t::long_dash:
1649  break;
1650  case orcus::spreadsheet::underline_t::dot_dash:
1652  break;
1653  case orcus::spreadsheet::underline_t::dot_dot_dot_dash:
1654  maCurrentFont.meUnderline = LINESTYLE_DASHDOTDOT; // dot-dot-dot-dash is absent from underline types in libo
1655  break;
1656  case orcus::spreadsheet::underline_t::wave:
1658  break;
1659  default:
1660  ;
1661  }
1663 }
1664 
1665 void ScOrcusStyles::set_font_underline_width(orcus::spreadsheet::underline_width_t e )
1666 {
1667  if (e == orcus::spreadsheet::underline_width_t::bold || e == orcus::spreadsheet::underline_width_t::thick)
1668  {
1669  switch(maCurrentFont.meUnderline)
1670  {
1671  case LINESTYLE_NONE:
1672  case LINESTYLE_SINGLE:
1674  break;
1675  case LINESTYLE_DOTTED:
1677  break;
1678  case LINESTYLE_DASH:
1680  break;
1681  case LINESTYLE_LONGDASH:
1683  break;
1684  case LINESTYLE_DASHDOT:
1686  break;
1687  case LINESTYLE_DASHDOTDOT:
1689  break;
1690  case LINESTYLE_WAVE:
1692  break;
1693  default:
1694  ;
1695  }
1696  }
1698 }
1699 
1700 void ScOrcusStyles::set_font_underline_mode(orcus::spreadsheet::underline_mode_t /* e */)
1701 {
1702 
1703 }
1704 
1705 void ScOrcusStyles::set_font_underline_type(orcus::spreadsheet::underline_type_t e )
1706 {
1707  if (e == orcus::spreadsheet::underline_type_t::double_type)
1708  {
1709  switch(maCurrentFont.meUnderline)
1710  {
1711  case LINESTYLE_NONE:
1712  case LINESTYLE_SINGLE:
1714  break;
1715  case LINESTYLE_WAVE:
1717  break;
1718  default:
1719  ;
1720  }
1721  }
1723 }
1724 
1725 void ScOrcusStyles::set_font_underline_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  maCurrentFont.maUnderlineColor = Color(alpha, red, green, blue);
1731 }
1732 
1733 void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t /*alpha*/,
1734  orcus::spreadsheet::color_elem_t red,
1735  orcus::spreadsheet::color_elem_t green,
1736  orcus::spreadsheet::color_elem_t blue)
1737 {
1738  // Ignore the alpha value for now.
1739  maCurrentFont.maColor = Color(red, green, blue);
1741 }
1742 
1743 void ScOrcusStyles::set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t /*s*/)
1744 {
1745 }
1746 
1747 void ScOrcusStyles::set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s)
1748 {
1752  {
1753  switch (s)
1754  {
1755  case os::strikethrough_type_t::unknown:
1757  break;
1758  case os::strikethrough_type_t::none:
1760  break;
1761  case os::strikethrough_type_t::single:
1763  break;
1764  case os::strikethrough_type_t::double_type:
1766  break;
1767  default:
1768  ;
1769  }
1770  }
1772 }
1773 
1774 void ScOrcusStyles::set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s)
1775 {
1776  switch (s)
1777  {
1778  case os::strikethrough_width_t::bold:
1780  break;
1781  default:
1782  ;
1783  }
1785 }
1786 
1787 void ScOrcusStyles::set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s)
1788 {
1789  switch (s)
1790  {
1791  case os::strikethrough_text_t::slash:
1793  break;
1794  case os::strikethrough_text_t::cross:
1796  break;
1797  default:
1798  ;
1799  }
1801 }
1802 
1804 {
1805  SAL_INFO("sc.orcus.style", "commit font");
1806  maFonts.push_back(maCurrentFont);
1808  return maFonts.size() - 1;
1809 }
1810 
1811 // fill
1812 
1814 {
1815  // needed at all?
1816 }
1817 
1818 void ScOrcusStyles::set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp)
1819 {
1820  maCurrentFill.mePattern = fp;
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.maFgColor = Color(red, green, blue);
1829 }
1830 
1832  orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
1833 {
1834  // Ignore the alpha element for now.
1835  maCurrentFill.maBgColor = Color(red, green, blue);
1837 }
1838 
1840 {
1841  SAL_INFO("sc.orcus.style", "commit fill");
1842  maFills.push_back(maCurrentFill);
1844  return maFills.size() - 1;
1845 }
1846 
1847 // border
1848 
1850 {
1851  // needed at all?
1852 }
1853 
1855  orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style)
1856 {
1857  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1858  switch (style)
1859  {
1860  case orcus::spreadsheet::border_style_t::solid:
1861  current_line.meStyle = SvxBorderLineStyle::SOLID;
1862  current_line.mnWidth = oox::xls::API_LINE_THIN;
1863  break;
1864  case orcus::spreadsheet::border_style_t::hair:
1865  current_line.meStyle = SvxBorderLineStyle::SOLID;
1866  current_line.mnWidth = oox::xls::API_LINE_HAIR;
1867  break;
1868  case orcus::spreadsheet::border_style_t::medium:
1869  current_line.meStyle = SvxBorderLineStyle::SOLID;
1870  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1871  break;
1872  case orcus::spreadsheet::border_style_t::thick:
1873  current_line.meStyle = SvxBorderLineStyle::SOLID;
1874  current_line.mnWidth = oox::xls::API_LINE_THICK;
1875  break;
1876  case orcus::spreadsheet::border_style_t::thin:
1877  current_line.meStyle = SvxBorderLineStyle::SOLID;
1878  current_line.mnWidth = oox::xls::API_LINE_THIN;
1879  break;
1880  case orcus::spreadsheet::border_style_t::dash_dot:
1881  current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
1882  current_line.mnWidth = oox::xls::API_LINE_THIN;
1883  break;
1884  case orcus::spreadsheet::border_style_t::dash_dot_dot:
1885  current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
1886  current_line.mnWidth = oox::xls::API_LINE_THIN;
1887  break;
1888  case orcus::spreadsheet::border_style_t::dashed:
1889  current_line.meStyle = SvxBorderLineStyle::DASHED;
1890  current_line.mnWidth = oox::xls::API_LINE_THIN;
1891  break;
1892  case orcus::spreadsheet::border_style_t::dotted:
1893  current_line.meStyle = SvxBorderLineStyle::DOTTED;
1894  current_line.mnWidth = oox::xls::API_LINE_THIN;
1895  break;
1896  case orcus::spreadsheet::border_style_t::double_border:
1897  current_line.meStyle = SvxBorderLineStyle::DOUBLE;
1898  current_line.mnWidth = oox::xls::API_LINE_THICK;
1899  break;
1900  case orcus::spreadsheet::border_style_t::medium_dash_dot:
1901  case orcus::spreadsheet::border_style_t::slant_dash_dot:
1902  current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
1903  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1904  break;
1905  case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
1906  current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
1907  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1908  break;
1909  case orcus::spreadsheet::border_style_t::medium_dashed:
1910  current_line.meStyle = SvxBorderLineStyle::DASHED;
1911  current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
1912  break;
1913  case orcus::spreadsheet::border_style_t::unknown:
1914  case orcus::spreadsheet::border_style_t::none:
1915  current_line.mnWidth = oox::xls::API_LINE_NONE;
1916  break;
1917  default:
1918  ;
1919  }
1921 }
1922 
1923 void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
1924  orcus::spreadsheet::color_elem_t /*alpha*/,
1925  orcus::spreadsheet::color_elem_t red,
1926  orcus::spreadsheet::color_elem_t green,
1927  orcus::spreadsheet::color_elem_t blue)
1928 {
1929  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1930  current_line.maColor = Color(red, green, blue);
1931 }
1932 
1933 void ScOrcusStyles::set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit )
1934 {
1935  border::border_line& current_line = maCurrentBorder.border_lines[dir];
1936  current_line.mnWidth = translateToInternal(val, unit);
1937 }
1938 
1940 {
1941  SAL_INFO("sc.orcus.style", "commit border");
1942  maBorders.push_back(maCurrentBorder);
1944  return maBorders.size() - 1;
1945 }
1946 
1947 // cell protection
1949 {
1952 }
1953 
1955 {
1958 }
1959 
1961 {
1964 }
1965 
1967 {
1970 }
1971 
1973 {
1974  SAL_INFO("sc.orcus.style", "commit cell protection");
1977  return maProtections.size() - 1;
1978 }
1979 
1981 {
1982 }
1983 
1985 {
1986 }
1987 
1988 void ScOrcusStyles::set_number_format_code(const char* s, size_t n)
1989 {
1990  OUString aCode(s, n, mrFactory.getGlobalSettings().getTextEncoding());
1991  maCurrentNumberFormat.maCode = aCode;
1993 }
1994 
1996 {
1997  SAL_INFO("sc.orcus.style", "commit number format");
2000  return maNumberFormats.size() - 1;
2001 }
2002 
2003 // cell style xf
2004 
2006 {
2007  // needed at all?
2008 }
2009 
2011 {
2012  SAL_INFO("sc.orcus.style", "commit cell style xf");
2013  maCellStyleXfs.push_back(maCurrentXF);
2014  return maCellStyleXfs.size() - 1;
2015 }
2016 
2017 // cell xf
2018 
2020 {
2021  // needed at all?
2022 }
2023 
2025 {
2026  SAL_INFO("sc.orcus.style", "commit cell xf");
2027  maCellXfs.push_back(maCurrentXF);
2028  return maCellXfs.size() - 1;
2029 }
2030 
2031 // dxf
2032 
2034 {
2035 }
2036 
2038 {
2039  return 0;
2040 }
2041 
2042 // xf (cell format) - used both by cell xf and cell style xf.
2043 
2045 {
2046  maCurrentXF.mnNumberFormatId = index;
2047 }
2048 
2049 void ScOrcusStyles::set_xf_font(size_t index)
2050 {
2051  maCurrentXF.mnFontId = index;
2052 }
2053 
2054 void ScOrcusStyles::set_xf_fill(size_t index)
2055 {
2056  maCurrentXF.mnFillId = index;
2057 }
2058 
2060 {
2061  maCurrentXF.mnBorderId = index;
2062 }
2063 
2065 {
2066  maCurrentXF.mnProtectionId = index;
2067 }
2068 
2070 {
2071  maCurrentXF.mnStyleXf = index;
2072 }
2073 
2075 {
2076 }
2077 
2078 void ScOrcusStyles::set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align)
2079 {
2080  switch (align)
2081  {
2082  case os::hor_alignment_t::left:
2083  maCurrentXF.meHorAlignment = SvxCellHorJustify::Left;
2084  break;
2085  case os::hor_alignment_t::right:
2086  maCurrentXF.meHorAlignment = SvxCellHorJustify::Right;
2087  break;
2088  case os::hor_alignment_t::center:
2089  maCurrentXF.meHorAlignment = SvxCellHorJustify::Center;
2090  break;
2091  case os::hor_alignment_t::justified:
2092  maCurrentXF.meHorAlignment = SvxCellHorJustify::Block;
2093  break;
2094  case os::hor_alignment_t::distributed:
2095  maCurrentXF.meHorAlignment = SvxCellHorJustify::Block;
2096  maCurrentXF.meHorAlignMethod = SvxCellJustifyMethod::Distribute;
2097  break;
2098  case os::hor_alignment_t::unknown:
2099  maCurrentXF.meHorAlignment = SvxCellHorJustify::Standard;
2100  break;
2101  default:
2102  ;
2103  }
2104  maCurrentXF.mbAlignment = true;
2105 }
2106 
2107 void ScOrcusStyles::set_xf_vertical_alignment(orcus::spreadsheet::ver_alignment_t align)
2108 {
2109  switch (align)
2110  {
2111  case os::ver_alignment_t::top:
2112  maCurrentXF.meVerAlignment = SvxCellVerJustify::Top;
2113  break;
2114  case os::ver_alignment_t::bottom:
2115  maCurrentXF.meVerAlignment = SvxCellVerJustify::Bottom;
2116  break;
2117  case os::ver_alignment_t::middle:
2118  maCurrentXF.meVerAlignment = SvxCellVerJustify::Center;
2119  break;
2120  case os::ver_alignment_t::justified:
2121  maCurrentXF.meVerAlignment = SvxCellVerJustify::Block;
2122  break;
2123  case os::ver_alignment_t::distributed:
2124  maCurrentXF.meVerAlignment = SvxCellVerJustify::Block;
2125  maCurrentXF.meVerAlignMethod = SvxCellJustifyMethod::Distribute;
2126  break;
2127  case os::ver_alignment_t::unknown:
2128  maCurrentXF.meVerAlignment = SvxCellVerJustify::Standard;
2129  break;
2130  default:
2131  ;
2132  }
2133  maCurrentXF.mbAlignment = true;
2134 }
2135 
2136 // cell style entry
2137 // not needed for now for gnumeric
2138 
2140 {
2141  // needed at all?
2142 }
2143 
2144 void ScOrcusStyles::set_cell_style_name(const char* s, size_t n)
2145 {
2146  OUString aName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
2148 }
2149 
2151 {
2152  maCurrentCellStyle.mnXFId = index;
2153 }
2154 
2156 {
2157  // not needed for gnumeric
2159 }
2160 
2161 void ScOrcusStyles::set_cell_style_parent_name(const char* s, size_t n)
2162 {
2163  OUString aParentName(s, n, mrFactory.getGlobalSettings().getTextEncoding());
2164  maCurrentCellStyle.maParentName = aParentName;
2165 }
2166 
2168 {
2169  SAL_INFO("sc.orcus.style", "commit cell style: " << maCurrentCellStyle.maName);
2171  {
2172  SAL_WARN("sc.orcus.style", "invalid xf id for commit cell style");
2173  return 0;
2174  }
2175  if (maCurrentCellStyle.mnXFId == 0)
2176  {
2177  return 0;
2178  }
2179 
2181  SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SfxStyleFamily::Para);
2183  SfxItemSet& rSet = rBase.GetItemSet();
2184 
2186  applyXfToItemSet(rSet, rXf);
2187 
2190 
2191  return 0;
2192 }
2193 
2194 // auto filter import
2195 
2197  mrGlobalSettings(rGS)
2198 {
2199 }
2200 
2202 {
2203 }
2204 
2205 void ScOrcusAutoFilter::set_range(const orcus::spreadsheet::range_t& range)
2206 {
2207  maRange.aStart.SetRow(range.first.row);
2208  maRange.aStart.SetCol(range.first.column);
2209  maRange.aEnd.SetRow(range.last.row);
2210  maRange.aEnd.SetCol(range.last.column);
2211 }
2212 
2213 void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
2214 {
2215  SAL_INFO("sc.orcus.autofilter", "set_column: " << col);
2216 }
2217 
2219 {
2220  OUString aString(p, n, mrGlobalSettings.getTextEncoding());
2221  SAL_INFO("sc.orcus.autofilter", "append_column_match_value: " << aString);
2222 }
2223 
2225 {
2226  SAL_INFO("sc.orcus.autofilter", "commit column");
2227 }
2228 
2230 {
2231  SAL_INFO("sc.orcus.autofilter", "commit");
2232 }
2233 
2234 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void set_shared_formula_index(size_t index) override
Definition: interface.cxx:964
virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) override
Definition: interface.cxx:741
void applyXfToItemSet(SfxItemSet &rSet, const xf &rXf)
Definition: interface.cxx:1521
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:2205
virtual void set_result_empty() override
Definition: interface.cxx:982
Type
orcus::spreadsheet::formula_grammar_t meOrcusGrammar
SvxCellHorJustify
virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override
Definition: interface.cxx:1665
ScOrcusFactory & mrFactory
const sal_Int16 API_LINE_THIN
virtual size_t append(const char *s, size_t n) override
Definition: interface.cxx:1262
ScAddress aStart
Definition: address.hxx:500
virtual orcus::spreadsheet::iface::import_array_formula * get_array_formula() override
Definition: interface.cxx:1157
SharedString intern(const OUString &rStr)
static const sal_Int64 nanoSecPerSec
static const sal_Int64 secondPerMinute
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:562
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:1146
virtual void commit_column() override
Definition: interface.cxx:2224
ScOrcusStyles(ScOrcusFactory &rFactory, bool bSkipDefaultStyles=false)
Definition: interface.cxx:1313
size_t appendString(const OUString &rStr)
Definition: interface.cxx:537
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1455
rtl_TextEncoding mnTextEncoding
virtual void set_cell_xf_count(size_t n) override
Definition: interface.cxx:2019
void applyToItemSet(SfxItemSet &rSet, const ScDocument &rDoc) const
Definition: interface.cxx:1486
virtual void set_type(orcus::spreadsheet::conditional_format_t type) override
Definition: interface.cxx:863
virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:952
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:2167
#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:1831
virtual orcus::spreadsheet::iface::import_global_settings * get_global_settings() override
Definition: interface.cxx:383
virtual void set_base_position(const orcus::spreadsheet::src_address_t &pos) override
Definition: interface.cxx:226
virtual void set_fill_count(size_t n) override
Definition: interface.cxx:1813
virtual void commit() override
Definition: interface.cxx:993
const ScOrcusGlobalSettings & getGlobalSettings() const
Definition: interface.cxx:683
void SetColor(const Color &rCol)
virtual bool SetParent(const OUString &)
ScOrcusFactory & getFactory()
Definition: interface.cxx:1254
virtual void set_dxf_count(size_t count) override
Definition: interface.cxx:2033
virtual size_t commit_number_format() override
Definition: interface.cxx:1995
virtual void commit_format() override
Definition: interface.cxx:905
std::vector< OUString > maStrings
std::vector< font > maFonts
css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator
virtual orcus::spreadsheet::iface::import_formula * get_formula() override
Definition: interface.cxx:1151
virtual void set_border_count(size_t n) override
Definition: interface.cxx:1849
ScOrcusArrayFormula maArrayFormula
LINESTYLE_BOLD
virtual void set_xf_protection(size_t index) override
Definition: interface.cxx:2064
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:4465
sal_Int32 mnCol
virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override
Definition: interface.cxx:1705
ScOrcusSheet & mrSheet
virtual void set_cell_style_xf(size_t index) override
Definition: interface.cxx:2150
formula::FormulaGrammar::Grammar getCalcGrammar() const
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:1244
ScOrcusStyles maStyles
virtual void set_number_format_code(const char *s, size_t n) override
Definition: interface.cxx:1988
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:2044
virtual void set_date(orcus::spreadsheet::condition_date_t date) override
Definition: interface.cxx:787
const SCCOL MAXCOLCOUNT
Definition: address.hxx:64
Accessor class to ScDocument.
virtual void set_max_databar_length(double length) override
Definition: interface.cxx:836
virtual void set_font_bold(bool b) override
Definition: interface.cxx:1601
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:1980
virtual void set_xf_font(size_t index) override
Definition: interface.cxx:2049
void pushFillDownCellsToken(const ScAddress &rPos, uint32_t nFillSize)
Definition: interface.cxx:583
formula::FormulaGrammar::Grammar meGrammar
ScOrcusNamedExpression maNamedExpressions
virtual size_t commit_fill() override
Definition: interface.cxx:1839
virtual void set_cell_hidden(bool b) override
Definition: interface.cxx:1948
rtl_TextEncoding getTextEncoding() const
virtual void set_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:1069
ScOrcusConditionalFormat(SCTAB nTab, ScDocument &rDoc)
Definition: interface.cxx:758
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:6054
virtual size_t commit_segments() override
Definition: interface.cxx:1306
WEIGHT_BOLD
virtual void commit() override
Definition: interface.cxx:2229
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override
Definition: interface.cxx:1626
SvxBorderLineStyle
virtual void set_cell_formula_hidden(bool b) override
Definition: interface.cxx:1966
std::unique_ptr< ScConditionalFormat > mpCurrentFormat
LINESTYLE_DASHDOT
virtual void set_font_size(double point) override
Definition: interface.cxx:1620
virtual void set_cell_style_name(const char *s, size_t n) override
Definition: interface.cxx:2144
LINESTYLE_BOLDDASHDOTDOT
SvxCellVerJustify
virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override
Definition: interface.cxx:1700
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:776
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:2054
virtual void set_cell_style_parent_name(const char *s, size_t n) override
Definition: interface.cxx:2161
virtual size_t add(const char *s, size_t n) override
Definition: interface.cxx:1268
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:1170
virtual void set_xf_id(size_t xf) override
Definition: interface.cxx:853
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:2218
SvxCellJustifyMethod meVerAlignMethod
SvxCellVerJustify meVerAlignment
virtual size_t commit_font() override
Definition: interface.cxx:1803
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4087
size_t addString(const OUString &rStr)
Definition: interface.cxx:546
virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override
Definition: interface.cxx:1743
STRIKEOUT_SINGLE
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4106
const ScOrcusGlobalSettings & mrGlobalSettings
virtual void set_databar_color_negative(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:823
virtual void set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1823
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:1301
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:766
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:2107
std::vector< xf > maCellXfs
virtual orcus::spreadsheet::range_size_t get_sheet_size() const override
Definition: interface.cxx:1229
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:437
virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1182
none
virtual void commit_entry() override
Definition: interface.cxx:887
virtual size_t commit_dxf() override
Definition: interface.cxx:2037
bool appendSheet(const OUString &rName)
ScOrcusSheetProperties maProperties
virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override
Definition: interface.cxx:1818
void pushMatrixFormulaToken(const ScAddress &rPos, const OUString &rFormula, formula::FormulaGrammar::Grammar eGrammar, uint32_t nRowRange, uint32_t nColRange)
Definition: interface.cxx:595
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:1131
std::vector< number_format > maNumberFormats
virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override
Definition: interface.cxx:1094
virtual void set_font_italic(bool b) override
Definition: interface.cxx:1607
virtual void set_databar_axis(orcus::spreadsheet::databar_axis_t axis) override
Definition: interface.cxx:810
OUString maFormula
void IncCol(SCCOL nDelta=1)
Definition: address.hxx:304
ScOrcusAutoFilter(const ScOrcusGlobalSettings &rGS)
Definition: interface.cxx:2196
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:816
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:1078
LINESTYLE_WAVE
virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char *p, size_t n) override
Definition: interface.cxx:958
virtual void set_date_time(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, int year, int month, int day, int hour, int minute, double second) override
Definition: interface.cxx:1188
virtual orcus::spreadsheet::iface::import_shared_strings * get_shared_strings() override
Definition: interface.cxx:388
virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1725
CellStoreTokensType maCellStoreTokens
virtual void set_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:770
virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override
Definition: interface.cxx:1854
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4761
WEIGHT_NORMAL
virtual void set_result_value(double value) override
Definition: interface.cxx:970
void IncRow(SCROW nDelta=1)
Definition: address.hxx:300
virtual void set_show_value(bool show) override
Definition: interface.cxx:842
LINESTYLE_SINGLE
ResultType meResType
OUString ScResId(const char *pId)
Definition: scdll.cxx:88
virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char *p, size_t n) override
Definition: interface.cxx:1163
ScDocumentImport & getDoc() const
virtual void commit_condition() override
Definition: interface.cxx:793
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
virtual orcus::spreadsheet::iface::import_sheet_properties * get_sheet_properties() override
Definition: interface.cxx:1136
PITCH_DONTKNOW
virtual void set_number_format_identifier(size_t n) override
Definition: interface.cxx:1984
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4784
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:1390
ScOrcusGlobalSettings(ScDocumentImport &rDoc)
Definition: interface.cxx:83
virtual void set_border_color(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1923
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1411
virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) override
Definition: interface.cxx:729
virtual void set_merge_cell_range(const orcus::spreadsheet::range_t &range) override
Definition: interface.cxx:753
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
void applyToItemSet(SfxItemSet &rSet) const
Definition: interface.cxx:1361
virtual ~ScOrcusArrayFormula() override
Definition: interface.cxx:1067
formula::FormulaGrammar::Grammar meGrammar
void incrementProgress()
Definition: interface.cxx:659
ITALIC_NONE
virtual size_t commit_cell_protection() override
Definition: interface.cxx:1972
virtual void set_cell_style_xf_count(size_t n) override
Definition: interface.cxx:2005
virtual void set_segment_font_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override
Definition: interface.cxx:1294
virtual void set_xf_style_xf(size_t index) override
Definition: interface.cxx:2069
virtual void set_xf_horizontal_alignment(orcus::spreadsheet::hor_alignment_t align) override
Definition: interface.cxx:2078
FontLineStyle meUnderline
virtual ~ScOrcusSheetProperties() override
Definition: interface.cxx:694
STRIKEOUT_X
virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override
Definition: interface.cxx:1099
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:1278
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:1238
virtual void set_column(orcus::spreadsheet::col_t col) override
Definition: interface.cxx:2213
void pushCellStoreToken(const ScAddress &rPos, uint32_t nStrIndex)
Definition: interface.cxx:567
size_t mnSharedFormulaIndex
ScOrcusSharedStrings(ScOrcusFactory &rFactory)
Definition: interface.cxx:1259
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:1286
virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override
Definition: interface.cxx:1747
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:2010
const sal_Int16 API_LINE_MEDIUM
number_format maCurrentNumberFormat
virtual void set_segment_font(size_t font_index) override
Definition: interface.cxx:1274
void setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &rIndicator)
Definition: interface.cxx:678
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:1733
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
ScOrcusArrayFormula(ScOrcusSheet &rSheet)
Definition: interface.cxx:1059
virtual orcus::spreadsheet::iface::import_named_expression * get_named_expression() override
Definition: interface.cxx:393
const ScOrcusGlobalSettings & mrGlobalSettings
virtual orcus::spreadsheet::iface::import_conditional_format * get_conditional_format() override
Definition: interface.cxx:1141
const sal_Int16 API_LINE_THICK
virtual void set_cell_style_count(size_t n) override
Definition: interface.cxx:2139
STRIKEOUT_DOUBLE
virtual void set_segment_font_size(double point) override
Definition: interface.cxx:1290
virtual void commit() override
Definition: interface.cxx:1104
orcus::spreadsheet::fill_pattern_t mePattern
LINESTYLE_DASHDOTDOT
ITALIC_NORMAL
virtual ~ScOrcusFormula() override
Definition: interface.cxx:950
ScDocumentImport & getDoc()
Definition: interface.cxx:1121
LINESTYLE_DOTTED
FontStrikeout meStrikeout
virtual void set_xf_apply_alignment(bool b) override
Definition: interface.cxx:2074
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:911
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:2201
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:735
ScFormatEntry::Type meEntryType
virtual void set_range(const char *p, size_t n) override
Definition: interface.cxx:892
SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden)
Definition: document.cxx:4457
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6059
virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override
Definition: interface.cxx:1774
orcus::spreadsheet::src_address_t resolve_address(const char *p, size_t n) override
Definition: interface.cxx:162
virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override
Definition: interface.cxx:1089
void cellInserted()
Definition: interface.cxx:1111
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:1933
virtual size_t commit_cell_xf() override
Definition: interface.cxx:2024
ResultType type
void pushCellStoreAutoToken(const ScAddress &rPos, const OUString &rVal)
Definition: interface.cxx:561
#define SAL_WARN(area, stream)
virtual void set_result_string(size_t sindex) override
Definition: interface.cxx:976
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:939
virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override
Definition: interface.cxx:747
SvxCellJustifyMethod
sal_Int32 mnRow
virtual void set_cell_locked(bool b) override
Definition: interface.cxx:1954
LINESTYLE_DOUBLE
void setNumericCell(const ScAddress &rPos, double fVal)
virtual void set_icon_name(const char *p, size_t n) override
Definition: interface.cxx:798
STRIKEOUT_NONE
virtual void set_font_count(size_t n) override
Definition: interface.cxx:1596
virtual void set_operator(orcus::spreadsheet::condition_operator_t condition_type) override
Definition: interface.cxx:858
ScOrcusGlobalSettings maGlobalSettings
virtual size_t commit_border() override
Definition: interface.cxx:1939
std::map< orcus::spreadsheet::border_direction_t, border_line > border_lines
virtual void set_font_name(const char *s, size_t n) override
Definition: interface.cxx:1613
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:1176
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:782
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:1960
aStr
virtual orcus::spreadsheet::iface::import_auto_filter * get_auto_filter() override
Definition: interface.cxx:1126
SvxCellJustifyMethod meHorAlignMethod
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
virtual void set_result_bool(bool value) override
Definition: interface.cxx:987
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:847
LINESTYLE_BOLDDASHDOT
virtual void set_databar_gradient(bool gradient) override
Definition: interface.cxx:804
virtual void set_cell_style_builtin(size_t index) override
Definition: interface.cxx:2155
virtual void set_segment_italic(bool b) override
Definition: interface.cxx:1282
virtual void set_named_expression(const char *p_name, size_t n_name, const char *p_exp, size_t n_exp) override
Definition: interface.cxx:233
STRIKEOUT_BOLD
virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override
Definition: interface.cxx:1787
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:1084
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
virtual void set_xf_border(size_t index) override
Definition: interface.cxx:2059
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:830
sal_uInt32 mnSize