24#include <oox/token/namespaces.hxx>
45 rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_negativeFillColor,
56 rStrm.GetCurrentStream()->singleElementNS( XML_x14, XML_axisColor,
62 nIndex(rCustomEntry.second)
77 rWorksheet->singleElementNS(XML_x14, XML_cfIcon,
79 XML_iconId, OString::number(
nIndex));
140 rWorksheet->startElementNS(XML_xm, XML_f);
141 rWorksheet->writeEscaped(
maValue.getStr());
142 rWorksheet->endElementNS(XML_xm, XML_f);
145 rWorksheet->endElementNS(XML_x14, XML_cfvo);
176 OString aPos =
aBuffer.makeStringAndClear();
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 +
"))");
206 std::unique_ptr<XclExpColor> pColor(
new XclExpColor);
207 if(!pColor->FillFromItemSet(
rSet ))
215 if (!pAlign->FillFromItemSet(*
this,
rSet,
false,
GetBiff()))
219 if (!pCellProt->FillFromItemSet(
rSet ))
224 std::unique_ptr<XclExpNumFmt> pNumFormat;
227 sal_uInt32 nScNumFmt = pPoolItem->GetValue();
229 sal_uInt32 nXclNumFmt = rNumFmtBuffer.
Insert(nScNumFmt);
237 std::move(pNumFormat),
238 std::move(pCellProt),
244 if (RequiresFixedFormula(eOperation))
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 );
253 rWorksheet->startElementNS( XML_xm, XML_f );
254 rWorksheet->writeEscaped(
aFormula );
255 rWorksheet->endElementNS( XML_xm, XML_f );
260 rWorksheet->startElementNS(XML_xm, XML_f);
262 rWorksheet->endElementNS(XML_xm, XML_f);
289 switch(eAxisPosition)
303 const char* pRet =
nullptr;
313 pRet =
"greaterThan";
316 pRet =
"lessThanOrEqual";
319 pRet =
"greaterThanOrEqual";
343 pRet =
"containsText";
346 pRet =
"notContains";
368 return "containsText";
370 return "notContainsText";
381 rWorksheet->startElementNS( XML_x14, XML_dataBar,
392 rWorksheet->endElementNS( XML_x14, XML_dataBar );
421 rWorksheet->startElementNS(XML_x14, XML_iconSet,
434 rWorksheet->endElementNS(XML_x14, XML_iconSet);
439 maId(
std::move(aId)),
479 rWorksheet->startElementNS( XML_x14, XML_cfRule,
487 rWorksheet->endElementNS( XML_x14, XML_cfRule );
492 std::vector<XclExpExtCondFormatData>& rData,
ScRangeList aRange):
497 for (
const auto& rItem : rData)
505 bool bNeedsExt =
false;
543 rWorksheet->startElementNS( XML_x14, XML_conditionalFormatting,
544 FSNS( XML_xmlns, XML_xm ),
rStrm.getNamespaceURL(OOX_NS(xm)) );
547 rWorksheet->startElementNS(XML_xm, XML_sqref);
550 rWorksheet->endElementNS( XML_xm, XML_sqref );
552 rWorksheet->endElementNS( XML_x14, XML_conditionalFormatting );
558 maURI = OString(
"{7626C862-2A13-11E5-B345-FEFF819CDC9F}");
572 maSyntax = OString(
"CalcA1ExcelA1");
587 rWorksheet->startElement( XML_ext,
588 FSNS(XML_xmlns, XML_loext),
rStrm.getNamespaceURL(OOX_NS(loext)),
591 rWorksheet->singleElementNS(XML_loext, XML_extCalcPr, XML_stringRefSyntax,
maSyntax);
593 rWorksheet->endElement( XML_ext );
599 maURI = OString(
"{78C0D931-6437-407d-A8EE-F0AAD7539E65}");
605 rWorksheet->startElement( XML_ext,
606 FSNS(XML_xmlns, XML_x14),
rStrm.getNamespaceURL(OOX_NS(xls14Lst)),
609 rWorksheet->startElementNS(XML_x14, XML_conditionalFormattings);
613 rWorksheet->endElementNS( XML_x14, XML_conditionalFormattings );
614 rWorksheet->endElement( XML_ext );
628 rWorksheet->startElement(XML_extLst);
632 rWorksheet->endElement( XML_extLst );
643 for(
size_t i = 0;
i <
n; ++
i )
const ScTokenArray * GetFormula() const
ScColorScaleEntryType GetType() const
const OUString & GetStyle() const
ScAddress GetValidSrcPos() const
Return a position that's adjusted to allow textual representation of expressions if possible.
ScConditionMode GetOperation() const
std::unique_ptr< ScTokenArray > CreateFlatCopiedTokenArray(sal_uInt16 nPos) const
Create a flat copy using ScTokenArray copy-ctor with shared tokens.
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
virtual Type GetType() const =0
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)
void SaveXml(XclExpXmlStream &rStrm)
XclExpExtAxisColor(const Color &maColor)
ScCondFormatEntry mrFormat
XclExpExtCF(const XclExpRoot &rRoot, const ScCondFormatEntry &rFormat)
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpExtCalcPr(const XclExpRoot &rRoot, formula::FormulaGrammar::AddressConvention eConv)
virtual void SaveXml(XclExpXmlStream &rStrm) override
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpExtCfRule(const XclExpRoot &rRoot, const ScFormatEntry &rFormat, const ScAddress &rPos, OString aId, sal_Int32 nPriority)
virtual void SaveXml(XclExpXmlStream &rStrm) override
ScColorScaleEntryType meType
XclExpExtCfvo(const XclExpRoot &rRoot, const ScColorScaleEntry &rEntry, const ScAddress &rPos, bool bFirst)
databar::ScAxisPosition meAxisPosition
std::unique_ptr< XclExpExtCfvo > mpLowerLimit
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpExtDataBar(const XclExpRoot &rRoot, const ScDataBarFormat &rFormat, const ScAddress &rPos)
std::unique_ptr< XclExpExtAxisColor > mpAxisColor
std::unique_ptr< XclExpExtCfvo > mpUpperLimit
std::unique_ptr< XclExpExtNegativeColor > mpNegativeColor
XclExpRecordList< XclExpExtCfvo > maCfvos
XclExpRecordList< XclExpExtIcon > maCustom
virtual void SaveXml(XclExpXmlStream &rStrm) override
const char * mpIconSetName
XclExpExtIconSet(const XclExpRoot &rRoot, const ScIconSetFormat &rFormat, const ScAddress &rPos)
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpExtIcon(const XclExpRoot &rRoot, const std::pair< ScIconSetType, sal_Int32 > &rCustomEntry)
const char * pIconSetName
void SaveXml(XclExpXmlStream &rStrm)
XclExpExtNegativeColor(const Color &rColor)
Base class for ext entries.
XclExpExt(const XclExpRoot &rRoot)
virtual XclExpExtType GetType()=0
Stores all number formats used in the document.
OUString GetFormatCode(sal_uInt32 nScNumFmt)
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
virtual void SaveXml(XclExpXmlStream &rStrm) override
void AppendNewRecord(RecType *pRec)
Appends a newly created record to the list.
void AppendRecord(RecType *pRec)
Appends a record to the list.
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Access to global data from other classes.
XclExpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
sc::CompileFormulaContext & GetCompileFormulaContext() const
XclExpPalette & GetPalette() const
Returns the color buffer.
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
XclExtLst(const XclExpRoot &rRoot)
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpExt * GetItem(XclExpExtType eType)
XclExpRecordList< XclExpExt > maExtEntries
void AddRecord(XclExpExt *pEntry)
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
static OString ToOString(const Color &rColor)
static OUString ToOUString(const char *s)
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
const char * UseIf(const char *s, bool bUse)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
Extends the XclCellAlign struct for export.
Extends the XclCellBorder struct for export.
Extends the XclCellProt struct for export.
Stores a core number format index with corresponding Excel format index.
std::unique_ptr< char[]> aBuffer