17#include <document.hxx>
37 if (aString ==
"column")
39 else if (aString ==
"stacked")
46 if (aString ==
"span")
48 else if (aString ==
"gap")
55 if (aString ==
"group")
57 else if (aString ==
"custom")
65 uno::Reference<xml::sax::XFastAttributeList>
const& xAttrList)
69 switch (rIter.getToken())
82 uno::Reference<xml::sax::XFastAttributeList>
const& xAttrList)
88 switch (rIter.getToken())
92 rAttributes.
setType(parseSparklineType(rIter.toView()));
97 OUString sLineWidth = rIter.toString();
99 sal_Int16
const eSrcUnit
102 util::MeasureUnit::POINT);
113 auto eDisplayEmptyCellsAs = parseDisplayEmptyCellsAs(rIter.toView());
124 rAttributes.
setHigh(rIter.toBoolean());
129 rAttributes.
setLow(rIter.toBoolean());
134 rAttributes.
setFirst(rIter.toBoolean());
139 rAttributes.
setLast(rIter.toBoolean());
245 SparklineImportData& rImportData, uno::Reference<xml::sax::XFastAttributeList>
const& xAttrList)
251 switch (rIter.getToken())
255 sal_Int32 nOffset = 0;
257 rImportData.
m_aAddress, rIter.toString(), *pDocument,
264 rIter.toString(), *pDocument,
274uno::Reference<xml::sax::XFastContextHandler>
276 sal_Int32 nElement, uno::Reference<xml::sax::XFastAttributeList>
const& xAttrList)
313 pSparkline->
setInputRange(rSparklineImportData.m_aDataRangeList);
SC_DLLPUBLIC sc::Sparkline * CreateSparkline(ScAddress const &rPosition, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
static bool GetAddressFromString(ScAddress &rAddress, std::u16string_view rAddressStr, const ScDocument &rDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Int32 &nOffset, sal_Unicode cSeparator=' ', sal_Unicode cQuote='\'')
String to Range core.
static bool GetRangeListFromString(ScRangeList &rRangeList, std::u16string_view rRangeListStr, const ScDocument &rDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Unicode cSeparator=' ', sal_Unicode cQuote='\'')
This class exists only to provide GetScImport() to its derived classes.
ScXMLImport & GetScImport()
ScDocument * GetDocument()
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
static sal_Int16 GetUnitFromString(std::u16string_view rString, sal_Int16 nDefaultUnit)
Common properties for a group of sparklines.
void setType(SparklineType eType)
void setDisplayHidden(bool bValue)
void setColorLast(Color aColorSeries)
void setManualMax(std::optional< double > aValue)
void setColorSeries(Color aColorSeries)
void setColorFirst(Color aColorSeries)
void setMarkers(bool bValue)
void setColorLow(Color aColorSeries)
void setMaxAxisType(AxisType eAxisType)
void setNegative(bool bValue)
void setDisplayEmptyCellsAs(DisplayEmptyCellsAs eValue)
void setLast(bool bValue)
void setLineWeight(double nWeight)
void setRightToLeft(bool bValue)
void setMinAxisType(AxisType eAxisType)
void setManualMin(std::optional< double > aValue)
void setColorAxis(Color aColorSeries)
void setColorMarkers(Color aColorSeries)
void setDisplayXAxis(bool bValue)
void setDateAxis(bool bValue)
void setColorNegative(Color aColorSeries)
void setHigh(bool bValue)
void setFirst(bool bValue)
void setColorHigh(Color aColorSeries)
std::vector< SparklineImportData > m_aCurrentSparklineDataList
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList) override
void fillSparklineAttributes(SparklineImportData &rImportData, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList)
void SAL_CALL endFastElement(sal_Int32 nElement) override
std::shared_ptr< sc::SparklineGroup > m_pCurrentSparklineGroup
void fillSparklineGroupAttributes(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList)
void fillSparklineGroupID(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList)
SparklineGroupsImportContext(ScXMLImport &rImport)
void setInputRange(ScRangeList const &rInputRange)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
CAUTION! The following defines must be in the same namespace as the respective type.
SparklineType
Supported sparkline types.
DisplayEmptyCellsAs
Determines how to display the empty cells.
AxisType
The method of calculating the axis min or max value.
XML_DISPLAY_EMPTY_CELLS_AS
Transitional import data of a sparkline.
ScRangeList m_aDataRangeList
#define XML_ELEMENT(prefix, name)