LibreOffice Module sc (master)  1
xeextlst.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 <sal/config.h>
11 
12 #include <string_view>
13 
14 #include <xeextlst.hxx>
15 #include <xeroot.hxx>
16 #include <xestyle.hxx>
17 #include <stlpool.hxx>
18 #include <scitems.hxx>
19 #include <svl/itemset.hxx>
20 #include <svl/intitem.hxx>
21 
22 #include <oox/export/utils.hxx>
23 #include <oox/token/namespaces.hxx>
24 
25 using namespace ::oox;
26 
28  XclExpRoot(rRoot)
29 {
30 }
31 
33  XclExpRoot(rRoot)
34 {
35 }
36 
38  maColor(rColor)
39 {
40 }
41 
43 {
44  rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_negativeFillColor,
45  XML_rgb, XclXmlUtils::ToOString(maColor) );
46 }
47 
49  maAxisColor(rColor)
50 {
51 }
52 
54 {
55  rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_axisColor,
57 }
58 
59 XclExpExtIcon::XclExpExtIcon(const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry):
60  XclExpRoot(rRoot),
61  nIndex(rCustomEntry.second)
62 {
63  pIconSetName = ScIconSetFormat::getIconSetName(rCustomEntry.first);
64 }
65 
67 {
68  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
69 
70  if (nIndex == -1)
71  {
72  nIndex = 0;
73  pIconSetName = "NoIcons";
74  }
75 
76  rWorksheet->singleElementNS(XML_x14, XML_cfIcon,
77  XML_iconSet, pIconSetName,
78  XML_iconId, OString::number(nIndex));
79 }
80 
81 XclExpExtCfvo::XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rSrcPos, bool bFirst ):
82  XclExpRoot(rRoot),
83  meType(rEntry.GetType()),
84  mbFirst(bFirst)
85 {
86  if( rEntry.GetType() == COLORSCALE_FORMULA )
87  {
88  const ScTokenArray* pArr = rEntry.GetFormula();
89  OUString aFormula;
90  if(pArr)
91  {
92  aFormula = XclXmlUtils::ToOUString( GetCompileFormulaContext(), rSrcPos, pArr);
93  }
94  maValue = OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8 );
95  }
96  else
97  maValue = OString::number(rEntry.GetValue());
98 }
99 
100 namespace {
101 
102 const char* getColorScaleType( ScColorScaleEntryType eType, bool bFirst )
103 {
104  switch(eType)
105  {
106  case COLORSCALE_MIN:
107  return "min";
108  case COLORSCALE_MAX:
109  return "max";
110  case COLORSCALE_PERCENT:
111  return "percent";
112  case COLORSCALE_FORMULA:
113  return "formula";
114  case COLORSCALE_AUTO:
115  if(bFirst)
116  return "autoMin";
117  else
118  return "autoMax";
120  return "percentile";
121  default:
122  break;
123  }
124  return "num";
125 }
126 
127 }
128 
130 {
131  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
132  rWorksheet->startElementNS(XML_x14, XML_cfvo, XML_type, getColorScaleType(meType, mbFirst));
133 
134  if (meType == COLORSCALE_FORMULA ||
138  {
139  rWorksheet->startElementNS(XML_xm, XML_f);
140  rWorksheet->writeEscaped(maValue.getStr());
141  rWorksheet->endElementNS(XML_xm, XML_f);
142  }
143 
144  rWorksheet->endElementNS(XML_x14, XML_cfvo);
145 }
146 
147 XclExpExtCF::XclExpExtCF( const XclExpRoot& rRoot, const ScCondFormatEntry& rFormat ):
148  XclExpRoot(rRoot),
149  mrFormat(rFormat)
150 {
151 }
152 
153 namespace {
154 
155 bool RequiresFixedFormula(ScConditionMode eMode)
156 {
157  switch (eMode)
158  {
163  return true;
164  default:
165  break;
166  }
167 
168  return false;
169 }
170 
171 OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, std::string_view rText)
172 {
173  OStringBuffer aBuffer;
174  XclXmlUtils::ToOString(aBuffer, rAddress);
175  OString aPos = aBuffer.makeStringAndClear();
176  switch (eMode)
177  {
179  return OString("LEFT(" + aPos + ",LEN(" + rText + "))=" + rText);
181  return OString("RIGHT(" + aPos + ",LEN(" + rText + "))=" + rText);
183  return OString(OString::Concat("NOT(ISERROR(SEARCH(") + rText + "," + aPos + ")))");
185  return OString(OString::Concat("ISERROR(SEARCH(") + rText + "," + aPos + "))");
186  default:
187  break;
188  }
189 
190  return "";
191 }
192 
193 }
194 
196 {
197  OUString aStyleName = mrFormat.GetStyle();
199  SfxStyleSheetBase* pStyle = pPool->Find(aStyleName, SfxStyleFamily::Para);
200  SfxItemSet& rSet = pStyle->GetItemSet();
201 
202  std::unique_ptr<ScTokenArray> pTokenArray(mrFormat.CreateFlatCopiedTokenArray(0));
204 
205  std::unique_ptr<XclExpColor> pColor(new XclExpColor);
206  if(!pColor->FillFromItemSet( rSet ))
207  pColor.reset();
208 
209  std::unique_ptr<XclExpCellBorder> pBorder(new XclExpCellBorder);
210  if (!pBorder->FillFromItemSet( rSet, GetPalette(), GetBiff()) )
211  pBorder.reset();
212 
213  std::unique_ptr<XclExpCellAlign> pAlign(new XclExpCellAlign);
214  if (!pAlign->FillFromItemSet( rSet, false, GetBiff()))
215  pAlign.reset();
216 
217  std::unique_ptr<XclExpCellProt> pCellProt(new XclExpCellProt);
218  if (!pCellProt->FillFromItemSet( rSet ))
219  pCellProt.reset();
220 
221  std::unique_ptr<XclExpDxfFont> pFont(new XclExpDxfFont(GetRoot(), rSet));
222 
223  std::unique_ptr<XclExpNumFmt> pNumFormat;
224  const SfxPoolItem *pPoolItem = nullptr;
225  if( rSet.GetItemState( ATTR_VALUE_FORMAT, true, &pPoolItem ) == SfxItemState::SET )
226  {
227  sal_uInt32 nScNumFmt = static_cast< const SfxUInt32Item* >(pPoolItem)->GetValue();
228  XclExpNumFmtBuffer& rNumFmtBuffer = GetRoot().GetNumFmtBuffer();
229  sal_uInt32 nXclNumFmt = rNumFmtBuffer.Insert(nScNumFmt);
230  pNumFormat.reset(new XclExpNumFmt(nScNumFmt, nXclNumFmt, rNumFmtBuffer.GetFormatCode(nScNumFmt)));
231  }
232 
233  XclExpDxf rDxf( GetRoot(),
234  std::move(pAlign),
235  std::move(pBorder),
236  std::move(pFont),
237  std::move(pNumFormat),
238  std::move(pCellProt),
239  std::move(pColor) );
240 
241  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
242 
243  ScConditionMode eOperation = mrFormat.GetOperation();
244  if (RequiresFixedFormula(eOperation))
245  {
246  ScAddress aFixedFormulaPos = mrFormat.GetValidSrcPos();
247  OString aFixedFormulaText = aFormula.toUtf8();
248  OString aFixedFormula = GetFixedFormula(eOperation, aFixedFormulaPos, aFixedFormulaText);
249  rWorksheet->startElementNS( XML_xm, XML_f );
250  rWorksheet->writeEscaped(aFixedFormula.getStr());
251  rWorksheet->endElementNS( XML_xm, XML_f );
252 
253  rWorksheet->startElementNS( XML_xm, XML_f );
254  rWorksheet->writeEscaped( aFormula );
255  rWorksheet->endElementNS( XML_xm, XML_f );
256  rDxf.SaveXmlExt(rStrm);
257  }
258  else
259  {
260  rWorksheet->startElementNS(XML_xm, XML_f);
261  rWorksheet->writeEscaped(aFormula);
262  rWorksheet->endElementNS(XML_xm, XML_f);
263  rDxf.SaveXmlExt(rStrm);
264  }
265 }
266 
267 XclExpExtDataBar::XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos ):
268  XclExpRoot(rRoot)
269 {
270  const ScDataBarFormatData& rFormatData = *rFormat.GetDataBarData();
271  mpLowerLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpLowerLimit, rPos, true));
272  mpUpperLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpUpperLimit, rPos, false));
273  if (rFormatData.mxNegativeColor)
274  mpNegativeColor.reset(new XclExpExtNegativeColor(*rFormatData.mxNegativeColor));
275  else
276  mpNegativeColor.reset( new XclExpExtNegativeColor( rFormatData.maPositiveColor ) );
277  mpAxisColor.reset( new XclExpExtAxisColor( rFormatData.maAxisColor ) );
278 
279  meAxisPosition = rFormatData.meAxisPosition;
280  mbGradient = rFormatData.mbGradient;
281  mnMinLength = rFormatData.mnMinLength;
282  mnMaxLength = rFormatData.mnMaxLength;
283 }
284 
285 namespace {
286 
287 const char* getAxisPosition(databar::ScAxisPosition eAxisPosition)
288 {
289  switch(eAxisPosition)
290  {
291  case databar::NONE:
292  return "none";
293  case databar::AUTOMATIC:
294  return "automatic";
295  case databar::MIDDLE:
296  return "middle";
297  }
298  return "";
299 }
300 
301 const char* GetOperatorString(ScConditionMode eMode)
302 {
303  const char* pRet = nullptr;
304  switch(eMode)
305  {
307  pRet = "equal";
308  break;
310  pRet = "lessThan";
311  break;
313  pRet = "greaterThan";
314  break;
316  pRet = "lessThanOrEqual";
317  break;
319  pRet = "greaterThanOrEqual";
320  break;
322  pRet = "notEqual";
323  break;
325  pRet = "between";
326  break;
328  pRet = "notBetween";
329  break;
331  pRet = nullptr;
332  break;
334  pRet = nullptr;
335  break;
337  pRet = "beginsWith";
338  break;
340  pRet = "endsWith";
341  break;
343  pRet = "containsText";
344  break;
346  pRet = "notContains";
347  break;
349  break;
351  default:
352  break;
353  }
354  return pRet;
355 }
356 
357 const char* GetTypeString(ScConditionMode eMode)
358 {
359  switch(eMode)
360  {
362  return "expression";
364  return "beginsWith";
366  return "endsWith";
368  return "containsText";
370  return "notContainsText";
371  default:
372  return "cellIs";
373  }
374 }
375 
376 }
377 
379 {
380  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
381  rWorksheet->startElementNS( XML_x14, XML_dataBar,
382  XML_minLength, OString::number(mnMinLength),
383  XML_maxLength, OString::number(mnMaxLength),
384  XML_axisPosition, getAxisPosition(meAxisPosition),
385  XML_gradient, ToPsz(mbGradient) );
386 
387  mpLowerLimit->SaveXml( rStrm );
388  mpUpperLimit->SaveXml( rStrm );
389  mpNegativeColor->SaveXml( rStrm );
390  mpAxisColor->SaveXml( rStrm );
391 
392  rWorksheet->endElementNS( XML_x14, XML_dataBar );
393 }
394 
395 XclExpExtIconSet::XclExpExtIconSet(const XclExpRoot& rRoot, const ScIconSetFormat& rFormat, const ScAddress& rPos):
396  XclExpRoot(rRoot)
397 {
398  const ScIconSetFormatData& rData = *rFormat.GetIconSetData();
399  for (auto const& itr : rData.m_Entries)
400  {
401  maCfvos.AppendNewRecord(new XclExpExtCfvo(*this, *itr, rPos, false));
402  }
403  mbCustom = rData.mbCustom;
404  mbReverse = rData.mbReverse;
405  mbShowValue = rData.mbShowValue;
407 
408  if (mbCustom)
409  {
410  for (const auto& rItem : rData.maCustomVector)
411  {
412  maCustom.AppendNewRecord(new XclExpExtIcon(*this, rItem));
413  }
414  }
415 }
416 
418 {
419  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
420 
421  rWorksheet->startElementNS(XML_x14, XML_iconSet,
422  XML_iconSet, mpIconSetName,
423  XML_custom, sax_fastparser::UseIf(ToPsz10(mbCustom), mbCustom),
424  XML_reverse, ToPsz10(mbReverse),
425  XML_showValue, ToPsz10(mbShowValue));
426 
427  maCfvos.SaveXml(rStrm);
428 
429  if (mbCustom)
430  {
431  maCustom.SaveXml(rStrm);
432  }
433 
434  rWorksheet->endElementNS(XML_x14, XML_iconSet);
435 }
436 
437 XclExpExtCfRule::XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority ):
438  XclExpRoot(rRoot),
439  maId(rId),
440  pType(nullptr),
441  mnPriority(nPriority),
442  mOperator(nullptr)
443 {
444  switch (rFormat.GetType())
445  {
447  {
448  const ScDataBarFormat& rDataBar = static_cast<const ScDataBarFormat&>(rFormat);
449  mxEntry = new XclExpExtDataBar( *this, rDataBar, rPos );
450  pType = "dataBar";
451  }
452  break;
454  {
455  const ScIconSetFormat& rIconSet = static_cast<const ScIconSetFormat&>(rFormat);
456  mxEntry = new XclExpExtIconSet(*this, rIconSet, rPos);
457  pType = "iconSet";
458  }
459  break;
461  {
462  const ScCondFormatEntry& rCondFormat = static_cast<const ScCondFormatEntry&>(rFormat);
463  mxEntry = new XclExpExtCF(*this, rCondFormat);
464  pType = GetTypeString(rCondFormat.GetOperation());
465  mOperator = GetOperatorString( rCondFormat.GetOperation() );
466  }
467  break;
468  default:
469  break;
470  }
471 }
472 
474 {
475  if (!mxEntry)
476  return;
477 
478  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
479  rWorksheet->startElementNS( XML_x14, XML_cfRule,
480  XML_type, pType,
481  XML_priority, sax_fastparser::UseIf(OString::number(mnPriority + 1), mnPriority != -1),
482  XML_operator, mOperator,
483  XML_id, maId );
484 
485  mxEntry->SaveXml( rStrm );
486 
487  rWorksheet->endElementNS( XML_x14, XML_cfRule );
488 
489 }
490 
492  std::vector<XclExpExtCondFormatData>& rData, const ScRangeList& rRange):
493  XclExpRoot(rRoot),
494  maRange(rRange)
495 {
496  ScAddress aAddr = maRange.front().aStart;
497  for (const auto& rItem : rData)
498  {
499  const ScFormatEntry* pEntry = rItem.pEntry;
500  switch (pEntry->GetType())
501  {
503  {
504  const ScIconSetFormat& rIconSet = static_cast<const ScIconSetFormat&>(*pEntry);
505  bool bNeedsExt = false;
506  switch (rIconSet.GetIconSetData()->eIconSetType)
507  {
508  case IconSet_3Triangles:
509  case IconSet_3Smilies:
511  case IconSet_5Boxes:
512  case IconSet_3Stars:
513  bNeedsExt = true;
514  break;
515  default:
516  break;
517  }
518 
519  if (rIconSet.GetIconSetData()->mbCustom)
520  bNeedsExt = true;
521 
522  if (bNeedsExt)
523  {
524  maCfRules.AppendNewRecord(new XclExpExtCfRule(*this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
525  }
526  }
527  break;
529  maCfRules.AppendNewRecord(new XclExpExtCfRule( *this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
530  break;
532  maCfRules.AppendNewRecord(new XclExpExtCfRule( *this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
533  break;
534  default:
535  break;
536  }
537  }
538 }
539 
541 {
542  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
543  rWorksheet->startElementNS( XML_x14, XML_conditionalFormatting,
544  FSNS( XML_xmlns, XML_xm ), rStrm.getNamespaceURL(OOX_NS(xm)) );
545 
546  maCfRules.SaveXml( rStrm );
547  rWorksheet->startElementNS(XML_xm, XML_sqref);
548  rWorksheet->write(XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maRange));
549 
550  rWorksheet->endElementNS( XML_xm, XML_sqref );
551 
552  rWorksheet->endElementNS( XML_x14, XML_conditionalFormatting );
553 }
554 
556  XclExpExt( rRoot )
557 {
558  maURI = OString("{7626C862-2A13-11E5-B345-FEFF819CDC9F}");
559 
560  switch (eConv)
561  {
563  maSyntax = OString("CalcA1");
564  break;
566  maSyntax = OString("ExcelA1");
567  break;
569  maSyntax = OString("ExcelR1C1");
570  break;
572  maSyntax = OString("CalcA1ExcelA1");
573  break;
579  maSyntax = OString("Unspecified");
580  break;
581  }
582 }
583 
585 {
586  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
587  rWorksheet->startElement( XML_ext,
588  FSNS(XML_xmlns, XML_loext), rStrm.getNamespaceURL(OOX_NS(loext)),
589  XML_uri, maURI );
590 
591  rWorksheet->singleElementNS(XML_loext, XML_extCalcPr, XML_stringRefSyntax, maSyntax);
592 
593  rWorksheet->endElement( XML_ext );
594 }
595 
597  XclExpExt( rRoot )
598 {
599  maURI = OString("{78C0D931-6437-407d-A8EE-F0AAD7539E65}");
600 }
601 
603 {
604  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
605  rWorksheet->startElement( XML_ext,
606  FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)),
607  XML_uri, maURI );
608 
609  rWorksheet->startElementNS(XML_x14, XML_conditionalFormattings);
610 
611  maCF.SaveXml( rStrm );
612 
613  rWorksheet->endElementNS( XML_x14, XML_conditionalFormattings );
614  rWorksheet->endElement( XML_ext );
615 }
616 
618 {
619  maCF.AppendRecord( pEntry );
620 }
621 
623 {
624  if(maExtEntries.IsEmpty())
625  return;
626 
627  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
628  rWorksheet->startElement(XML_extLst);
629 
630  maExtEntries.SaveXml(rStrm);
631 
632  rWorksheet->endElement( XML_extLst );
633 }
634 
636 {
637  maExtEntries.AppendRecord( pEntry );
638 }
639 
641 {
642  size_t n = maExtEntries.GetSize();
643  for( size_t i = 0; i < n; ++i )
644  {
645  if (maExtEntries.GetRecord( i )->GetType() == eType)
646  return maExtEntries.GetRecord( i );
647  }
648 
649  return nullptr;
650 }
651 
652 
653 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * mpIconSetName
Definition: xeextlst.hxx:131
double mnMaxLength
Maximal length of a databar in percent of cell length Value has to be in the range (0...
Definition: colorscale.hxx:177
std::unique_ptr< XclExpExtNegativeColor > mpNegativeColor
Definition: xeextlst.hxx:114
const char * mOperator
Definition: xeextlst.hxx:146
static OString ToOString(const Color &rColor)
Definition: xestream.cxx:703
OString maURI
Definition: xeextlst.hxx:43
sal_Int32 nIndex
XclExpRecordList< XclExpExtIcon > maCustom
Definition: xeextlst.hxx:127
ScAddress aStart
Definition: address.hxx:499
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:129
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:378
XclExpExtCondFormat(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:596
std::vector< std::pair< ScIconSetType, sal_Int32 > > maCustomVector
Definition: colorscale.hxx:344
const XclExpRoot & GetRoot() const
Returns the filter root data.
Definition: xestream.hxx:291
XclExpExtConditionalFormatting(const XclExpRoot &rRoot, std::vector< XclExpExtCondFormatData > &rData, const ScRangeList &rRange)
Definition: xeextlst.cxx:491
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xerecord.hxx:381
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:540
std::string GetValue
XclExpRecordList< XclExpExtCfvo > maCfvos
Definition: xeextlst.hxx:126
XclExpRecordList< XclExpExt > maExtEntries
Definition: xeextlst.hxx:202
void AddRecord(XclExpExtConditionalFormatting *pFormat)
Definition: xeextlst.cxx:617
XclExpExtIcon(const XclExpRoot &rRoot, const std::pair< ScIconSetType, sal_Int32 > &rCustomEntry)
Definition: xeextlst.cxx:59
void AppendRecord(RecType *pRec)
Appends a record to the list.
Definition: xerecord.hxx:347
OString maValue
Definition: xeextlst.hxx:54
static OUString ToOUString(const char *s)
Definition: xestream.cxx:788
bool mbReverse
Specifies whether the icons should be shown in reverse order.
Definition: colorscale.hxx:338
XclExpRecordRef mxEntry
Definition: xeextlst.hxx:142
double mnMinLength
Minimal length of a databar in percent of cell length Value has to be in the range [0...
Definition: colorscale.hxx:172
XclExpExtNegativeColor(const Color &rColor)
Definition: xeextlst.cxx:37
sal_Int64 n
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:53
const OUString & GetStyle() const
Definition: conditio.hxx:473
OUString GetFormatCode(sal_uInt32 nScNumFmt)
Definition: xestyle.cxx:1420
XclExpRecordList< XclExpExtCfRule > maCfRules
Definition: xeextlst.hxx:158
const ContentProperties & rData
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, const OString &rId, sal_Int32 nPriority)
Definition: xeextlst.cxx:437
basegfx::BColor maColor
virtual SfxItemSet & GetItemSet()
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:276
double mnMaxLength
Definition: xeextlst.hxx:110
ScConditionMode GetOperation() const
Definition: conditio.hxx:369
std::optional< Color > mxNegativeColor
Specifies the color for negative values.
Definition: colorscale.hxx:140
XclExpExtAxisColor(const Color &maColor)
Definition: xeextlst.cxx:48
const char * pIconSetName
Definition: xeextlst.hxx:85
Base class for ext entries.
Definition: xeextlst.hxx:36
const ScTokenArray * GetFormula() const
Definition: colorscale.cxx:216
static const char * getIconSetName(ScIconSetType eType)
XclExpExt(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:27
Access to global data from other classes.
Definition: xeroot.hxx:112
ScCondFormatEntry mrFormat
Definition: xeextlst.hxx:97
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
Definition: xeextlst.cxx:555
OUString getNamespaceURL(sal_Int32 nNSID) const
void AddRecord(XclExpExt *pEntry)
Definition: xeextlst.cxx:635
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:473
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:602
XclExpExtCfvo(const XclExpRoot &rRoot, const ScColorScaleEntry &rEntry, const ScAddress &rPos, bool bFirst)
Definition: xeextlst.cxx:81
ScIconSetType eIconSetType
Definition: colorscale.hxx:333
ScColorScaleEntryType GetType() const
Definition: colorscale.hxx:76
ScConditionMode
Definition: conditio.hxx:60
Stores all number formats used in the document.
Definition: xestyle.hxx:268
Extends the XclCellAlign struct for export.
Definition: xestyle.hxx:322
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
databar::ScAxisPosition meAxisPosition
Definition: xeextlst.hxx:107
sax_fastparser::FSHelperPtr & GetCurrentStream()
Definition: xestream.cxx:915
XclExtLst(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:32
Color maPositiveColor
Color for all Positive Values and if mbNeg == false also for negative ones.
Definition: colorscale.hxx:134
ScAddress GetValidSrcPos() const
Return a position that's adjusted to allow textual representation of expressions if possible...
Definition: conditio.cxx:1326
Color maAxisColor
Color of the axis if used Default color is black.
Definition: colorscale.hxx:145
OUString aFormula
Definition: xeextlst.hxx:96
double mnMinLength
Definition: xeextlst.hxx:109
double mnPriority
ScColorScaleEntryType
Definition: colorscale.hxx:31
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:341
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
XclExpExtCF(const XclExpRoot &rRoot, const ScCondFormatEntry &rFormat)
Definition: xeextlst.cxx:147
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
Definition: xestyle.cxx:1355
XclExpPalette & GetPalette() const
Returns the color buffer.
Definition: xeroot.cxx:105
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:66
bool mbGradient
Paint the bars with gradient.
Definition: colorscale.hxx:152
XclExpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
Definition: xeroot.cxx:117
std::unique_ptr< XclExpExtCfvo > mpLowerLimit
Definition: xeextlst.hxx:112
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:622
XclExpRecordList< XclExpExtConditionalFormatting > maCF
Definition: xeextlst.hxx:175
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:584
const ScIconSetFormatData * GetIconSetData() const
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
sal_Int32 mnPriority
Definition: xeextlst.hxx:145
ScColorScaleEntryType meType
Definition: xeextlst.hxx:53
std::shared_ptr< FastSerializerHelper > FSHelperPtr
void AppendNewRecord(RecType *pRec)
Appends a newly created record to the list.
Definition: xerecord.hxx:360
sal_Int32 nIndex
Definition: xeextlst.hxx:86
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xeroot.hxx:118
Stores a core number format index with corresponding Excel format index.
Definition: xestyle.hxx:253
Extends the XclCellProt struct for export.
Definition: xestyle.hxx:308
XclExpExtIconSet(const XclExpRoot &rRoot, const ScIconSetFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:395
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Definition: xerecord.hxx:332
OString maSyntax
Definition: xeextlst.hxx:187
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:195
std::unique_ptr< char[]> aBuffer
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:42
databar::ScAxisPosition meAxisPosition
Paint negative values into the same direction as positive values If false we will set the mid point a...
Definition: colorscale.hxx:167
const char * pType
Definition: xeextlst.hxx:144
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:267
std::unique_ptr< ScColorScaleEntry, o3tl::default_delete< ScColorScaleEntry > > mpUpperLimit
Definition: colorscale.hxx:184
virtual XclExpExtType GetType()=0
std::unique_ptr< XclExpExtCfvo > mpUpperLimit
Definition: xeextlst.hxx:113
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:417
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:140
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6092
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
size_t GetSize() const
Definition: xerecord.hxx:326
const ScDataBarFormatData * GetDataBarData() const
Definition: colorscale.cxx:736
virtual Type GetType() const =0
ScRange & front()
Definition: rangelst.hxx:92
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3259
std::unique_ptr< ScTokenArray > CreateFlatCopiedTokenArray(sal_uInt16 nPos) const
Create a flat copy using ScTokenArray copy-ctor with shared tokens.
Definition: conditio.cxx:1281
std::unique_ptr< ScColorScaleEntry, o3tl::default_delete< ScColorScaleEntry > > mpLowerLimit
Definition: colorscale.hxx:185
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
Definition: xeextlst.hxx:115
bool IsEmpty() const
Definition: xerecord.hxx:325
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
const char * UseIf(const char *s, bool bUse)
XclExpExt * GetItem(XclExpExtType eType)
Definition: xeextlst.cxx:640
RedlineType meType
sc::CompileFormulaContext & GetCompileFormulaContext() const
Definition: xeroot.hxx:121
double GetValue() const
Definition: colorscale.cxx:237
B2DRange maRange
XclExpExtType
Definition: xeextlst.hxx:19