15#include <oox/token/namespaces.hxx>
16#include <oox/token/tokens.hxx>
20#include <document.hxx>
30using ::oox::core::ContextHandlerRef;
31using ::oox::xls::CondFormatBuffer;
51 switch( getCurrentElement() )
53 case XLS14_TOKEN( dataBar ):
56 xRule->importDataBar( rAttribs );
59 case XLS14_TOKEN( fillColor ):
62 xRule->importPositiveFillColor( rAttribs );
65 case XLS14_TOKEN( negativeFillColor ):
68 xRule->importNegativeFillColor( rAttribs );
71 case XLS14_TOKEN( axisColor ):
74 xRule->importAxisColor( rAttribs );
77 case XLS14_TOKEN( cfvo ):
80 xRule->importCfvo( rAttribs );
93 switch( getCurrentElement() )
99 mpRule->getModel().msScaleTypeValue = rChars;
108 switch( getCurrentElement() )
110 case XLS14_TOKEN( cfvo ):
140 , isPreviousElementF(false)
157 if (nElement == XLS14_TOKEN(cfRule))
160 OUString aId = rAttribs.
getString(XML_id, OUString());
165 if (aType ==
"dataBar")
169 ExtLst::const_iterator aExt =
getExtLst().find( aId );
175 auto pFormat = std::make_unique<ScDataBarFormat>(&
getScDocument());
176 pFormat->SetDataBarData(pInfo);
182 pInfo = aExt->second;
191 else if (aType ==
"iconSet")
195 maEntries.push_back(std::make_unique<ScIconSetFormat>(&rDoc));
198 else if (aType ==
"cellIs")
205 else if (aType ==
"containsText")
211 else if (aType ==
"notContainsText")
217 else if (aType ==
"beginsWith")
223 else if (aType ==
"endsWith")
229 else if (aType ==
"expression")
237 SAL_WARN(
"sc",
"unhandled XLS14_TOKEN(cfRule) with type: " << aType);
240 else if (nElement == XLS14_TOKEN( dxf ))
244 else if (nElement == XM_TOKEN( sqref ) || nElement == XM_TOKEN( f ))
246 if(nElement == XM_TOKEN( f ))
260 switch (getCurrentElement())
268 case XM_TOKEN(sqref):
279 switch (getCurrentElement())
287 case XLS14_TOKEN( cfRule ):
302 case XM_TOKEN(sqref):
307 if (!bSuccess || aRange.
empty())
311 for (
size_t i = 0;
i < aRange.
size(); ++
i)
313 aRange[
i].aStart.SetTab(nTab);
314 aRange[
i].aEnd.SetTab(nTab);
321 return lhs.nPriority < rhs.nPriority;
335 maEntries.push_back(std::unique_ptr<ScFormatEntry>(pEntry));
362 switch( getCurrentElement() )
364 case XLS_TOKEN( extLst ):
365 if(nElement == XLS_TOKEN( ext ))
369 case XLS_TOKEN( ext ):
370 if (nElement == XLS14_TOKEN(
id ))
380 switch( getCurrentElement() )
382 case XLS14_TOKEN(
id ):
389 if (getCurrentElement() == XLS14_TOKEN(
id ))
391 getExtLst().insert( std::pair< OUString, ScDataBarFormatData*>(rChars,
mpTarget) );
422 if (nElement == XLS_TOKEN( ext ))
435 if (nElement == LOEXT_TOKEN(extCalcPr))
438 sal_Int32
nToken = rAttribs.
getToken( XML_stringRefSyntax, XML_CalcA1 );
452 case XML_CalcA1ExcelA1:
476 if (nElement == XLS_TOKEN( ext ))
const ScCalcConfig & GetCalcConfig() const
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
virtual Type GetType() const =0
ScAddress GetTopLeftCorner() const
static bool GetRangeListFromString(ScRangeList &rRangeList, std::u16string_view rRangeListStr, const ScDocument &rDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Unicode cSeparator=' ', sal_Unicode cQuote='\'')
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::optional< OUString > getString(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
void forEachMem(FuncType pFunc) const
void finalizeImport()
Final processing after import of all style settings.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ScDataBarFormatData * mpTarget
virtual void onEndElement() override
virtual void onStartElement(const AttributeList &rAttribs) override
ExtCfDataBarRuleRef mpRule
ExtCfRuleContext(WorksheetContextBase &rFragment, ScDataBarFormatData *pDataBar)
virtual void onCharacters(const OUString &rChars) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ScConditionMode eOperator
virtual void onStartElement(const AttributeList &rAttribs) override
std::vector< std::unique_ptr< ScFormatEntry > > maEntries
std::vector< sal_Int32 > maPriorities
ExtCondFormatRuleModel maModel
std::unique_ptr< IconSetRule > mpCurrentRule
virtual void onCharacters(const OUString &rCharacters) override
ExtConditionalFormattingContext(WorksheetContextBase &rFragment)
virtual void onEndElement() override
std::vector< ExtCondFormatRuleModel > maModels
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
ExtGlobalContext(WorksheetContextBase &rFragment)
virtual void onStartElement(const AttributeList &rAttribs) override
ExtGlobalWorkbookContext(WorkbookContextBase &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ExtLstGlobalContext(WorksheetFragment &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ExtLstGlobalWorkbookContext(WorkbookFragment &rFragment)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
ExtLstLocalContext(WorksheetContextBase &rFragment, ScDataBarFormatData *pTarget)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
ScDataBarFormatData * mpTarget
virtual void onCharacters(const OUString &rChars) override
Handle import of the sparkline, sparkline group and attributes.
OUString createExtDxfStyle(sal_Int32 nDxfId) const
const RefVector< Dxf > & getExtDxfs() const
Context handler derived from the WorkbookHelper helper class.
StylesBuffer & getStyles() const
Returns all cell formatting objects read from the styles substream.
ScDocument & getScDocument()
Context handler derived from the WorksheetHelper helper class.
CondFormatBuffer & getCondFormats() const
Returns the conditional formatting in this sheet.
ScDocument & getScDocument()
ExtLst & getExtLst() const
SCTAB getSheetIndex() const
Returns the index of the current sheet.
#define SAL_WARN(area, stream)
std::shared_ptr< ExtCfDataBarRule > ExtCfDataBarRuleRef
Configuration options for formula interpreter.
void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv)