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