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 <utility>
15#include <xeextlst.hxx>
16#include <xeroot.hxx>
17#include <xestyle.hxx>
18#include <stlpool.hxx>
19#include <scitems.hxx>
20#include <svl/itemset.hxx>
21#include <svl/intitem.hxx>
22
23#include <oox/export/utils.hxx>
24#include <oox/token/namespaces.hxx>
25
26using namespace ::oox;
27
29 XclExpRoot(rRoot)
30{
31}
32
34 XclExpRoot(rRoot)
35{
36}
37
39 maColor(rColor)
40{
41}
42
44{
45 rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_negativeFillColor,
47}
48
50 maAxisColor(rColor)
51{
52}
53
55{
56 rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_axisColor,
58}
59
60XclExpExtIcon::XclExpExtIcon(const XclExpRoot& rRoot, const std::pair<ScIconSetType, sal_Int32>& rCustomEntry):
61 XclExpRoot(rRoot),
62 nIndex(rCustomEntry.second)
63{
65}
66
68{
69 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
70
71 if (nIndex == -1)
72 {
73 nIndex = 0;
74 pIconSetName = "NoIcons";
75 }
76
77 rWorksheet->singleElementNS(XML_x14, XML_cfIcon,
78 XML_iconSet, pIconSetName,
79 XML_iconId, OString::number(nIndex));
80}
81
82XclExpExtCfvo::XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rSrcPos, bool bFirst ):
83 XclExpRoot(rRoot),
84 meType(rEntry.GetType()),
85 mbFirst(bFirst)
86{
87 if( rEntry.GetType() == COLORSCALE_FORMULA )
88 {
89 const ScTokenArray* pArr = rEntry.GetFormula();
90 OUString aFormula;
91 if(pArr)
92 {
93 aFormula = XclXmlUtils::ToOUString( GetCompileFormulaContext(), rSrcPos, pArr);
94 }
95 maValue = OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8 );
96 }
97 else
98 maValue = OString::number(rEntry.GetValue());
99}
100
101namespace {
102
103const char* getColorScaleType( ScColorScaleEntryType eType, bool bFirst )
104{
105 switch(eType)
106 {
107 case COLORSCALE_MIN:
108 return "min";
109 case COLORSCALE_MAX:
110 return "max";
112 return "percent";
114 return "formula";
115 case COLORSCALE_AUTO:
116 if(bFirst)
117 return "autoMin";
118 else
119 return "autoMax";
121 return "percentile";
122 default:
123 break;
124 }
125 return "num";
126}
127
128}
129
131{
132 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
133 rWorksheet->startElementNS(XML_x14, XML_cfvo, XML_type, getColorScaleType(meType, mbFirst));
134
135 if (meType == COLORSCALE_FORMULA ||
139 {
140 rWorksheet->startElementNS(XML_xm, XML_f);
141 rWorksheet->writeEscaped(maValue.getStr());
142 rWorksheet->endElementNS(XML_xm, XML_f);
143 }
144
145 rWorksheet->endElementNS(XML_x14, XML_cfvo);
146}
147
149 XclExpRoot(rRoot),
150 mrFormat(rFormat)
151{
152}
153
154namespace {
155
156bool RequiresFixedFormula(ScConditionMode eMode)
157{
158 switch (eMode)
159 {
164 return true;
165 default:
166 break;
167 }
168
169 return false;
170}
171
172OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, std::string_view rText)
173{
174 OStringBuffer aBuffer;
175 XclXmlUtils::ToOString(aBuffer, rAddress);
176 OString aPos = aBuffer.makeStringAndClear();
177 switch (eMode)
178 {
180 return OString("LEFT(" + aPos + ",LEN(" + rText + "))=" + rText);
182 return OString("RIGHT(" + aPos + ",LEN(" + rText + "))=" + rText);
184 return OString(OString::Concat("NOT(ISERROR(SEARCH(") + rText + "," + aPos + ")))");
186 return OString(OString::Concat("ISERROR(SEARCH(") + rText + "," + aPos + "))");
187 default:
188 break;
189 }
190
191 return "";
192}
193
194}
195
197{
198 OUString aStyleName = mrFormat.GetStyle();
200 SfxStyleSheetBase* pStyle = pPool->Find(aStyleName, SfxStyleFamily::Para);
201 SfxItemSet& rSet = pStyle->GetItemSet();
202
203 std::unique_ptr<ScTokenArray> pTokenArray(mrFormat.CreateFlatCopiedTokenArray(0));
205
206 std::unique_ptr<XclExpColor> pColor(new XclExpColor);
207 if(!pColor->FillFromItemSet( rSet ))
208 pColor.reset();
209
210 std::unique_ptr<XclExpCellBorder> pBorder(new XclExpCellBorder);
211 if (!pBorder->FillFromItemSet( rSet, GetPalette(), GetBiff()) )
212 pBorder.reset();
213
214 std::unique_ptr<XclExpCellAlign> pAlign(new XclExpCellAlign);
215 if (!pAlign->FillFromItemSet(*this, rSet, false, GetBiff()))
216 pAlign.reset();
217
218 std::unique_ptr<XclExpCellProt> pCellProt(new XclExpCellProt);
219 if (!pCellProt->FillFromItemSet( rSet ))
220 pCellProt.reset();
221
222 std::unique_ptr<XclExpDxfFont> pFont(new XclExpDxfFont(GetRoot(), rSet));
223
224 std::unique_ptr<XclExpNumFmt> pNumFormat;
225 if( const SfxUInt32Item* pPoolItem = rSet.GetItemIfSet( ATTR_VALUE_FORMAT ) )
226 {
227 sal_uInt32 nScNumFmt = 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
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
267XclExpExtDataBar::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)
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
285namespace {
286
287const char* getAxisPosition(databar::ScAxisPosition eAxisPosition)
288{
289 switch(eAxisPosition)
290 {
291 case databar::NONE:
292 return "none";
294 return "automatic";
295 case databar::MIDDLE:
296 return "middle";
297 }
298 return "";
299}
300
301const 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
357const 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
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
428
429 if (mbCustom)
430 {
432 }
433
434 rWorksheet->endElementNS(XML_x14, XML_iconSet);
435}
436
437XclExpExtCfRule::XclExpExtCfRule( const XclExpRoot& rRoot, const ScFormatEntry& rFormat, const ScAddress& rPos, OString aId, sal_Int32 nPriority ):
438 XclExpRoot(rRoot),
439 maId(std::move(aId)),
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,
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, ScRangeList aRange):
493 XclExpRoot(rRoot),
494 maRange(std::move(aRange))
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 {
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
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{
625 return;
626
627 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
628 rWorksheet->startElement(XML_extLst);
629
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: */
basegfx::BColor maColor
B2DRange maRange
double GetValue() const
Definition: colorscale.cxx:236
const ScTokenArray * GetFormula() const
Definition: colorscale.cxx:216
ScColorScaleEntryType GetType() const
Definition: colorscale.hxx:76
const OUString & GetStyle() const
Definition: conditio.hxx:473
ScAddress GetValidSrcPos() const
Return a position that's adjusted to allow textual representation of expressions if possible.
Definition: conditio.cxx:1347
ScConditionMode GetOperation() const
Definition: conditio.hxx:369
std::unique_ptr< ScTokenArray > CreateFlatCopiedTokenArray(sal_uInt16 nPos) const
Create a flat copy using ScTokenArray copy-ctor with shared tokens.
Definition: conditio.cxx:1302
const ScDataBarFormatData * GetDataBarData() const
Definition: colorscale.cxx:784
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6055
virtual Type GetType() const =0
static const char * getIconSetName(ScIconSetType eType)
const ScIconSetFormatData * GetIconSetData() const
ScRange & front()
Definition: rangelst.hxx:92
ScAddress aStart
Definition: address.hxx:497
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3349
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:54
XclExpExtAxisColor(const Color &maColor)
Definition: xeextlst.cxx:49
ScCondFormatEntry mrFormat
Definition: xeextlst.hxx:98
XclExpExtCF(const XclExpRoot &rRoot, const ScCondFormatEntry &rFormat)
Definition: xeextlst.cxx:148
OUString aFormula
Definition: xeextlst.hxx:97
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:196
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
Definition: xeextlst.cxx:555
OString maSyntax
Definition: xeextlst.hxx:188
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:584
XclExpRecordRef mxEntry
Definition: xeextlst.hxx:143
const char * pType
Definition: xeextlst.hxx:145
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:473
sal_Int32 mnPriority
Definition: xeextlst.hxx:146
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, OString aId, sal_Int32 nPriority)
Definition: xeextlst.cxx:437
const char * mOperator
Definition: xeextlst.hxx:147
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:130
OString maValue
Definition: xeextlst.hxx:55
ScColorScaleEntryType meType
Definition: xeextlst.hxx:54
XclExpExtCfvo(const XclExpRoot &rRoot, const ScColorScaleEntry &rEntry, const ScAddress &rPos, bool bFirst)
Definition: xeextlst.cxx:82
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:602
XclExpExtCondFormat(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:596
void AddRecord(XclExpExtConditionalFormatting *pFormat)
Definition: xeextlst.cxx:617
XclExpRecordList< XclExpExtConditionalFormatting > maCF
Definition: xeextlst.hxx:176
XclExpRecordList< XclExpExtCfRule > maCfRules
Definition: xeextlst.hxx:159
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:540
XclExpExtConditionalFormatting(const XclExpRoot &rRoot, std::vector< XclExpExtCondFormatData > &rData, ScRangeList aRange)
Definition: xeextlst.cxx:491
databar::ScAxisPosition meAxisPosition
Definition: xeextlst.hxx:108
std::unique_ptr< XclExpExtCfvo > mpLowerLimit
Definition: xeextlst.hxx:113
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:378
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:267
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
Definition: xeextlst.hxx:116
double mnMinLength
Definition: xeextlst.hxx:110
std::unique_ptr< XclExpExtCfvo > mpUpperLimit
Definition: xeextlst.hxx:114
double mnMaxLength
Definition: xeextlst.hxx:111
std::unique_ptr< XclExpExtNegativeColor > mpNegativeColor
Definition: xeextlst.hxx:115
XclExpRecordList< XclExpExtCfvo > maCfvos
Definition: xeextlst.hxx:127
XclExpRecordList< XclExpExtIcon > maCustom
Definition: xeextlst.hxx:128
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:417
const char * mpIconSetName
Definition: xeextlst.hxx:132
XclExpExtIconSet(const XclExpRoot &rRoot, const ScIconSetFormat &rFormat, const ScAddress &rPos)
Definition: xeextlst.cxx:395
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:67
XclExpExtIcon(const XclExpRoot &rRoot, const std::pair< ScIconSetType, sal_Int32 > &rCustomEntry)
Definition: xeextlst.cxx:60
const char * pIconSetName
Definition: xeextlst.hxx:86
sal_Int32 nIndex
Definition: xeextlst.hxx:87
void SaveXml(XclExpXmlStream &rStrm)
Definition: xeextlst.cxx:43
XclExpExtNegativeColor(const Color &rColor)
Definition: xeextlst.cxx:38
Base class for ext entries.
Definition: xeextlst.hxx:38
XclExpExt(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:28
OString maURI
Definition: xeextlst.hxx:44
virtual XclExpExtType GetType()=0
Stores all number formats used in the document.
Definition: xestyle.hxx:268
OUString GetFormatCode(sal_uInt32 nScNumFmt)
Definition: xestyle.cxx:1424
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
Definition: xestyle.cxx:1359
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xerecord.hxx:382
void AppendNewRecord(RecType *pRec)
Appends a newly created record to the list.
Definition: xerecord.hxx:361
size_t GetSize() const
Definition: xerecord.hxx:327
bool IsEmpty() const
Definition: xerecord.hxx:326
void AppendRecord(RecType *pRec)
Appends a record to the list.
Definition: xerecord.hxx:348
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Definition: xerecord.hxx:333
Access to global data from other classes.
Definition: xeroot.hxx:113
XclExpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
Definition: xeroot.cxx:118
sc::CompileFormulaContext & GetCompileFormulaContext() const
Definition: xeroot.hxx:121
XclExpPalette & GetPalette() const
Returns the color buffer.
Definition: xeroot.cxx:106
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xeroot.hxx:118
XclExtLst(const XclExpRoot &rRoot)
Definition: xeextlst.cxx:33
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeextlst.cxx:622
XclExpExt * GetItem(XclExpExtType eType)
Definition: xeextlst.cxx:640
XclExpRecordList< XclExpExt > maExtEntries
Definition: xeextlst.hxx:203
void AddRecord(XclExpExt *pEntry)
Definition: xeextlst.cxx:635
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:141
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:285
static OString ToOString(const Color &rColor)
Definition: xestream.cxx:712
static OUString ToOUString(const char *s)
Definition: xestream.cxx:788
@ IconSet_3Triangles
Definition: colorscale.hxx:200
@ IconSet_3ColorSmilies
Definition: colorscale.hxx:201
@ IconSet_5Boxes
Definition: colorscale.hxx:211
@ IconSet_3Smilies
Definition: colorscale.hxx:198
@ IconSet_3Stars
Definition: colorscale.hxx:199
ScColorScaleEntryType
Definition: colorscale.hxx:32
@ COLORSCALE_MAX
Definition: colorscale.hxx:35
@ COLORSCALE_VALUE
Definition: colorscale.hxx:37
@ COLORSCALE_FORMULA
Definition: colorscale.hxx:39
@ COLORSCALE_PERCENT
Definition: colorscale.hxx:38
@ COLORSCALE_PERCENTILE
Definition: colorscale.hxx:36
@ COLORSCALE_AUTO
Definition: colorscale.hxx:33
@ COLORSCALE_MIN
Definition: colorscale.hxx:34
ScConditionMode
Definition: conditio.hxx:60
DocumentType eType
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
sal_Int32 nIndex
sal_Int64 n
int i
void SvStream & rStrm
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
const char * UseIf(const char *s, bool bUse)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
XML_type
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
static SfxItemSet & rSet
double mnPriority
Color maAxisColor
Color of the axis if used Default color is black.
Definition: colorscale.hxx:145
std::optional< Color > mxNegativeColor
Specifies the color for negative values.
Definition: colorscale.hxx:140
std::unique_ptr< ScColorScaleEntry, o3tl::default_delete< ScColorScaleEntry > > mpLowerLimit
Definition: colorscale.hxx:185
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
double mnMinLength
Minimal length of a databar in percent of cell length Value has to be in the range [0,...
Definition: colorscale.hxx:172
double mnMaxLength
Maximal length of a databar in percent of cell length Value has to be in the range (0,...
Definition: colorscale.hxx:177
Color maPositiveColor
Color for all Positive Values and if mbNeg == false also for negative ones.
Definition: colorscale.hxx:134
bool mbGradient
Paint the bars with gradient.
Definition: colorscale.hxx:152
std::unique_ptr< ScColorScaleEntry, o3tl::default_delete< ScColorScaleEntry > > mpUpperLimit
Definition: colorscale.hxx:184
ScIconSetType eIconSetType
Definition: colorscale.hxx:340
bool mbReverse
Specifies whether the icons should be shown in reverse order.
Definition: colorscale.hxx:345
std::vector< std::pair< ScIconSetType, sal_Int32 > > maCustomVector
Definition: colorscale.hxx:351
Extends the XclCellAlign struct for export.
Definition: xestyle.hxx:322
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:341
Extends the XclCellProt struct for export.
Definition: xestyle.hxx:308
Stores a core number format index with corresponding Excel format index.
Definition: xestyle.hxx:253
std::unique_ptr< char[]> aBuffer
RedlineType meType
XclExpExtType
Definition: xeextlst.hxx:20