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(*this, 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  if( const SfxUInt32Item* pPoolItem = rSet.GetItemIfSet( ATTR_VALUE_FORMAT ) )
225  {
226  sal_uInt32 nScNumFmt = pPoolItem->GetValue();
227  XclExpNumFmtBuffer& rNumFmtBuffer = GetRoot().GetNumFmtBuffer();
228  sal_uInt32 nXclNumFmt = rNumFmtBuffer.Insert(nScNumFmt);
229  pNumFormat.reset(new XclExpNumFmt(nScNumFmt, nXclNumFmt, rNumFmtBuffer.GetFormatCode(nScNumFmt)));
230  }
231 
232  XclExpDxf rDxf( GetRoot(),
233  std::move(pAlign),
234  std::move(pBorder),
235  std::move(pFont),
236  std::move(pNumFormat),
237  std::move(pCellProt),
238  std::move(pColor) );
239 
240  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
241 
242  ScConditionMode eOperation = mrFormat.GetOperation();
243  if (RequiresFixedFormula(eOperation))
244  {
245  ScAddress aFixedFormulaPos = mrFormat.GetValidSrcPos();
246  OString aFixedFormulaText = aFormula.toUtf8();
247  OString aFixedFormula = GetFixedFormula(eOperation, aFixedFormulaPos, aFixedFormulaText);
248  rWorksheet->startElementNS( XML_xm, XML_f );
249  rWorksheet->writeEscaped(aFixedFormula.getStr());
250  rWorksheet->endElementNS( XML_xm, XML_f );
251 
252  rWorksheet->startElementNS( XML_xm, XML_f );
253  rWorksheet->writeEscaped( aFormula );
254  rWorksheet->endElementNS( XML_xm, XML_f );
255  rDxf.SaveXmlExt(rStrm);
256  }
257  else
258  {
259  rWorksheet->startElementNS(XML_xm, XML_f);
260  rWorksheet->writeEscaped(aFormula);
261  rWorksheet->endElementNS(XML_xm, XML_f);
262  rDxf.SaveXmlExt(rStrm);
263  }
264 }
265 
266 XclExpExtDataBar::XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos ):
267  XclExpRoot(rRoot)
268 {
269  const ScDataBarFormatData& rFormatData = *rFormat.GetDataBarData();
270  mpLowerLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpLowerLimit, rPos, true));
271  mpUpperLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpUpperLimit, rPos, false));
272  if (rFormatData.mxNegativeColor)
273  mpNegativeColor.reset(new XclExpExtNegativeColor(*rFormatData.mxNegativeColor));
274  else
275  mpNegativeColor.reset( new XclExpExtNegativeColor( rFormatData.maPositiveColor ) );
276  mpAxisColor.reset( new XclExpExtAxisColor( rFormatData.maAxisColor ) );
277 
278  meAxisPosition = rFormatData.meAxisPosition;
279  mbGradient = rFormatData.mbGradient;
280  mnMinLength = rFormatData.mnMinLength;
281  mnMaxLength = rFormatData.mnMaxLength;
282 }
283 
284 namespace {
285 
286 const char* getAxisPosition(databar::ScAxisPosition eAxisPosition)
287 {
288  switch(eAxisPosition)
289  {
290  case databar::NONE:
291  return "none";
292  case databar::AUTOMATIC:
293  return "automatic";
294  case databar::MIDDLE:
295  return "middle";
296  }
297  return "";
298 }
299 
300 const char* GetOperatorString(ScConditionMode eMode)
301 {
302  const char* pRet = nullptr;
303  switch(eMode)
304  {
306  pRet = "equal";
307  break;
309  pRet = "lessThan";
310  break;
312  pRet = "greaterThan";
313  break;
315  pRet = "lessThanOrEqual";
316  break;
318  pRet = "greaterThanOrEqual";
319  break;
321  pRet = "notEqual";
322  break;
324  pRet = "between";
325  break;
327  pRet = "notBetween";
328  break;
330  pRet = nullptr;
331  break;
333  pRet = nullptr;
334  break;
336  pRet = "beginsWith";
337  break;
339  pRet = "endsWith";
340  break;
342  pRet = "containsText";
343  break;
345  pRet = "notContains";
346  break;
348  break;
350  default:
351  break;
352  }
353  return pRet;
354 }
355 
356 const char* GetTypeString(ScConditionMode eMode)
357 {
358  switch(eMode)
359  {
361  return "expression";
363  return "beginsWith";
365  return "endsWith";
367  return "containsText";
369  return "notContainsText";
370  default:
371  return "cellIs";
372  }
373 }
374 
375 }
376 
378 {
379  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
380  rWorksheet->startElementNS( XML_x14, XML_dataBar,
381  XML_minLength, OString::number(mnMinLength),
382  XML_maxLength, OString::number(mnMaxLength),
383  XML_axisPosition, getAxisPosition(meAxisPosition),
384  XML_gradient, ToPsz(mbGradient) );
385 
386  mpLowerLimit->SaveXml( rStrm );
387  mpUpperLimit->SaveXml( rStrm );
388  mpNegativeColor->SaveXml( rStrm );
389  mpAxisColor->SaveXml( rStrm );
390 
391  rWorksheet->endElementNS( XML_x14, XML_dataBar );
392 }
393 
394 XclExpExtIconSet::XclExpExtIconSet(const XclExpRoot& rRoot, const ScIconSetFormat& rFormat, const ScAddress& rPos):
395  XclExpRoot(rRoot)
396 {
397  const ScIconSetFormatData& rData = *rFormat.GetIconSetData();
398  for (auto const& itr : rData.m_Entries)
399  {
400  maCfvos.AppendNewRecord(new XclExpExtCfvo(*this, *itr, rPos, false));
401  }
402  mbCustom = rData.mbCustom;
403  mbReverse = rData.mbReverse;
404  mbShowValue = rData.mbShowValue;
406 
407  if (mbCustom)
408  {
409  for (const auto& rItem : rData.maCustomVector)
410  {
411  maCustom.AppendNewRecord(new XclExpExtIcon(*this, rItem));
412  }
413  }
414 }
415 
417 {
418  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
419 
420  rWorksheet->startElementNS(XML_x14, XML_iconSet,
421  XML_iconSet, mpIconSetName,
422  XML_custom, sax_fastparser::UseIf(ToPsz10(mbCustom), mbCustom),
423  XML_reverse, ToPsz10(mbReverse),
424  XML_showValue, ToPsz10(mbShowValue));
425 
426  maCfvos.SaveXml(rStrm);
427 
428  if (mbCustom)
429  {
430  maCustom.SaveXml(rStrm);
431  }
432 
433  rWorksheet->endElementNS(XML_x14, XML_iconSet);
434 }
435 
436 XclExpExtCfRule::XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, const OString& rId, sal_Int32 nPriority ):
437  XclExpRoot(rRoot),
438  maId(rId),
439  pType(nullptr),
440  mnPriority(nPriority),
441  mOperator(nullptr)
442 {
443  switch (rFormat.GetType())
444  {
446  {
447  const ScDataBarFormat& rDataBar = static_cast<const ScDataBarFormat&>(rFormat);
448  mxEntry = new XclExpExtDataBar( *this, rDataBar, rPos );
449  pType = "dataBar";
450  }
451  break;
453  {
454  const ScIconSetFormat& rIconSet = static_cast<const ScIconSetFormat&>(rFormat);
455  mxEntry = new XclExpExtIconSet(*this, rIconSet, rPos);
456  pType = "iconSet";
457  }
458  break;
460  {
461  const ScCondFormatEntry& rCondFormat = static_cast<const ScCondFormatEntry&>(rFormat);
462  mxEntry = new XclExpExtCF(*this, rCondFormat);
463  pType = GetTypeString(rCondFormat.GetOperation());
464  mOperator = GetOperatorString( rCondFormat.GetOperation() );
465  }
466  break;
467  default:
468  break;
469  }
470 }
471 
473 {
474  if (!mxEntry)
475  return;
476 
477  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
478  rWorksheet->startElementNS( XML_x14, XML_cfRule,
479  XML_type, pType,
480  XML_priority, sax_fastparser::UseIf(OString::number(mnPriority + 1), mnPriority != -1),
481  XML_operator, mOperator,
482  XML_id, maId );
483 
484  mxEntry->SaveXml( rStrm );
485 
486  rWorksheet->endElementNS( XML_x14, XML_cfRule );
487 
488 }
489 
491  std::vector<XclExpExtCondFormatData>& rData, const ScRangeList& rRange):
492  XclExpRoot(rRoot),
493  maRange(rRange)
494 {
495  ScAddress aAddr = maRange.front().aStart;
496  for (const auto& rItem : rData)
497  {
498  const ScFormatEntry* pEntry = rItem.pEntry;
499  switch (pEntry->GetType())
500  {
502  {
503  const ScIconSetFormat& rIconSet = static_cast<const ScIconSetFormat&>(*pEntry);
504  bool bNeedsExt = false;
505  switch (rIconSet.GetIconSetData()->eIconSetType)
506  {
507  case IconSet_3Triangles:
508  case IconSet_3Smilies:
510  case IconSet_5Boxes:
511  case IconSet_3Stars:
512  bNeedsExt = true;
513  break;
514  default:
515  break;
516  }
517 
518  if (rIconSet.GetIconSetData()->mbCustom)
519  bNeedsExt = true;
520 
521  if (bNeedsExt)
522  {
523  maCfRules.AppendNewRecord(new XclExpExtCfRule(*this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
524  }
525  }
526  break;
528  maCfRules.AppendNewRecord(new XclExpExtCfRule( *this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
529  break;
531  maCfRules.AppendNewRecord(new XclExpExtCfRule( *this, *pEntry, aAddr, rItem.aGUID, rItem.nPriority));
532  break;
533  default:
534  break;
535  }
536  }
537 }
538 
540 {
541  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
542  rWorksheet->startElementNS( XML_x14, XML_conditionalFormatting,
543  FSNS( XML_xmlns, XML_xm ), rStrm.getNamespaceURL(OOX_NS(xm)) );
544 
545  maCfRules.SaveXml( rStrm );
546  rWorksheet->startElementNS(XML_xm, XML_sqref);
547  rWorksheet->write(XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), maRange));
548 
549  rWorksheet->endElementNS( XML_xm, XML_sqref );
550 
551  rWorksheet->endElementNS( XML_x14, XML_conditionalFormatting );
552 }
553 
555  XclExpExt( rRoot )
556 {
557  maURI = OString("{7626C862-2A13-11E5-B345-FEFF819CDC9F}");
558 
559  switch (eConv)
560  {
562  maSyntax = OString("CalcA1");
563  break;
565  maSyntax = OString("ExcelA1");
566  break;
568  maSyntax = OString("ExcelR1C1");
569  break;
571  maSyntax = OString("CalcA1ExcelA1");
572  break;
578  maSyntax = OString("Unspecified");
579  break;
580  }
581 }
582 
584 {
585  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
586  rWorksheet->startElement( XML_ext,
587  FSNS(XML_xmlns, XML_loext), rStrm.getNamespaceURL(OOX_NS(loext)),
588  XML_uri, maURI );
589 
590  rWorksheet->singleElementNS(XML_loext, XML_extCalcPr, XML_stringRefSyntax, maSyntax);
591 
592  rWorksheet->endElement( XML_ext );
593 }
594 
596  XclExpExt( rRoot )
597 {
598  maURI = OString("{78C0D931-6437-407d-A8EE-F0AAD7539E65}");
599 }
600 
602 {
603  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
604  rWorksheet->startElement( XML_ext,
605  FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)),
606  XML_uri, maURI );
607 
608  rWorksheet->startElementNS(XML_x14, XML_conditionalFormattings);
609 
610  maCF.SaveXml( rStrm );
611 
612  rWorksheet->endElementNS( XML_x14, XML_conditionalFormattings );
613  rWorksheet->endElement( XML_ext );
614 }
615 
617 {
618  maCF.AppendRecord( pEntry );
619 }
620 
622 {
623  if(maExtEntries.IsEmpty())
624  return;
625 
626  sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
627  rWorksheet->startElement(XML_extLst);
628 
629  maExtEntries.SaveXml(rStrm);
630 
631  rWorksheet->endElement( XML_extLst );
632 }
633 
635 {
636  maExtEntries.AppendRecord( pEntry );
637 }
638 
640 {
641  size_t n = maExtEntries.GetSize();
642  for( size_t i = 0; i < n; ++i )
643  {
644  if (maExtEntries.GetRecord( i )->GetType() == eType)
645  return maExtEntries.GetRecord( i );
646  }
647 
648  return nullptr;
649 }
650 
651 
652 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * mpIconSetName
Definition: xeextlst.hxx:132
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:115
const char * mOperator
Definition: xeextlst.hxx:147
static OString ToOString(const Color &rColor)
Definition: xestream.cxx:709
OString maURI
Definition: xeextlst.hxx:44
sal_Int32 nIndex
XclExpRecordList< XclExpExtIcon > maCustom
Definition: xeextlst.hxx:128
ScAddress aStart
Definition: address.hxx:497
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:129
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:377
XclExpExtCondFormat(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:595
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:490
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xerecord.hxx:382
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:539
XclExpRecordList< XclExpExtCfvo > maCfvos
Definition: xeextlst.hxx:127
XclExpRecordList< XclExpExt > maExtEntries
Definition: xeextlst.hxx:203
void AddRecord(XclExpExtConditionalFormatting *pFormat)
Definition: xeextlst.cxx:616
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:348
OString maValue
Definition: xeextlst.hxx:55
static OUString ToOUString(const char *s)
Definition: xestream.cxx:785
bool mbReverse
Specifies whether the icons should be shown in reverse order.
Definition: colorscale.hxx:338
XclExpRecordRef mxEntry
Definition: xeextlst.hxx:143
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:472
OUString GetFormatCode(sal_uInt32 nScNumFmt)
Definition: xestyle.cxx:1421
XclExpRecordList< XclExpExtCfRule > maCfRules
Definition: xeextlst.hxx:159
const ContentProperties & rData
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, const OString &rId, sal_Int32 nPriority)
Definition: xeextlst.cxx:436
basegfx::BColor maColor
virtual SfxItemSet & GetItemSet()
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:285
double mnMaxLength
Definition: xeextlst.hxx:111
ScConditionMode GetOperation() const
Definition: conditio.hxx:368
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:86
Base class for ext entries.
Definition: xeextlst.hxx:37
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:98
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
Definition: xeextlst.cxx:554
OUString getNamespaceURL(sal_Int32 nNSID) const
void AddRecord(XclExpExt *pEntry)
Definition: xeextlst.cxx:634
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:472
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:601
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:59
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:108
sax_fastparser::FSHelperPtr & GetCurrentStream()
Definition: xestream.cxx:912
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:1330
Color maAxisColor
Color of the axis if used Default color is black.
Definition: colorscale.hxx:145
OUString aFormula
Definition: xeextlst.hxx:97
double mnMinLength
Definition: xeextlst.hxx:110
double mnPriority
ScColorScaleEntryType
Definition: colorscale.hxx:31
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:341
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:1356
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:113
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:621
XclExpRecordList< XclExpExtConditionalFormatting > maCF
Definition: xeextlst.hxx:176
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:583
const ScIconSetFormatData * GetIconSetData() const
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
sal_Int32 mnPriority
Definition: xeextlst.hxx:146
XML_type
ScColorScaleEntryType meType
Definition: xeextlst.hxx:54
std::shared_ptr< FastSerializerHelper > FSHelperPtr
void AppendNewRecord(RecType *pRec)
Appends a newly created record to the list.
Definition: xerecord.hxx:361
sal_Int32 nIndex
Definition: xeextlst.hxx:87
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:394
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Definition: xerecord.hxx:333
OString maSyntax
Definition: xeextlst.hxx:188
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:145
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:266
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:114
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:416
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:141
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6161
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
size_t GetSize() const
Definition: xerecord.hxx:327
const ScDataBarFormatData * GetDataBarData() const
Definition: colorscale.cxx:735
virtual Type GetType() const =0
ScRange & front()
Definition: rangelst.hxx:92
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3257
std::unique_ptr< ScTokenArray > CreateFlatCopiedTokenArray(sal_uInt16 nPos) const
Create a flat copy using ScTokenArray copy-ctor with shared tokens.
Definition: conditio.cxx:1285
std::unique_ptr< ScColorScaleEntry, o3tl::default_delete< ScColorScaleEntry > > mpLowerLimit
Definition: colorscale.hxx:185
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
Definition: xeextlst.hxx:116
bool IsEmpty() const
Definition: xerecord.hxx:326
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:639
RedlineType meType
sc::CompileFormulaContext & GetCompileFormulaContext() const
Definition: xeroot.hxx:121
double GetValue() const
Definition: colorscale.cxx:236
B2DRange maRange
XclExpExtType
Definition: xeextlst.hxx:19