28#include <osl/diagnose.h>
33using ::com::sun::star::uno::Reference;
39 const OUString& rQName );
41 virtual void StartElement(
const Reference< xml::sax::XAttributeList >& rAttrList )
override;
51 const OUString& rQName ) :
53 m_bIsCategoryAxis( false )
57 const Reference< xml::sax::XAttributeList >& rAttrList )
59 Reference< xml::sax::XAttributeList > xAttrList( rAttrList );
61 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
62 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
64 const OUString& rAttrName = xAttrList->getNameByIndex(
i );
72 if( !pMutableAttrList )
75 xAttrList = pMutableAttrList;
78 const OUString& rAttrValue = xAttrList->getValueByIndex(
i );
97 OSL_FAIL(
"ChartAxis: Invalid attribute value" );
102 OUString aNewAttrQName(
105 pMutableAttrList->RenameAttributeByIndex(
i, aNewAttrQName );
122 const OUString& rLocalName,
123 const OUString& rQName,
124 const uno::Reference< xml::sax::XAttributeList >& xAttrList )
133 pContext = pAxisContext;
147 if( pAxisContext !=
nullptr )
150 Reference< xml::sax::XAttributeList > xNewAttrList( pAxisContext->
GetAttrList());
151 sal_Int16 nAttrCount = xNewAttrList.is() ? xNewAttrList->getLength() : 0;
153 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
155 const OUString & rAttrName = xNewAttrList->getNameByIndex(
i );
157 sal_uInt16 nNewPrefix =
175 OSL_ENSURE( bFound,
"No suitable axis for categories found." );
181 nPrefix, rLocalName, rQName, xAttrList );
195 OSL_ENSURE( pContext.is() && pContext->IsPersistent(),
196 "non-persistent context" );
205 rChildContext->Export();
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
virtual void StartElement(const Reference< xml::sax::XAttributeList > &rAttrList) override
XMLAxisOOoContext(XMLTransformerBase &rTransformer, const OUString &rQName)
bool IsCategoryAxis() const
void AddContent(rtl::Reference< XMLAxisOOoContext > const &pContent)
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
virtual void ExportContent() override
XMLChartPlotAreaOOoTContext(XMLTransformerBase &rTransformer, const OUString &rQName)
XMLAxisContextVector m_aChildContexts
virtual void EndElement() override
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
const css::uno::Reference< css::xml::sax::XAttributeList > & GetAttrList() const
void AddContent(rtl::Reference< XMLTransformerContext > const &pContent)
virtual void EndElement() override
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
XMLTransformerBase & GetTransformer()
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
constexpr sal_uInt16 XML_NAMESPACE_CHART