27#include <osl/diagnose.h>
35 const OUString& rQName ) :
45 const Reference< XAttributeList >& rAttrList )
49 OSL_ENSURE( pActions,
"go no actions" );
52 Reference< XAttributeList > xAttrList( rAttrList );
54 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
55 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
57 const OUString& rAttrName = xAttrList->getNameByIndex(
i );
62 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
63 XMLTransformerActions::const_iterator aIter =
64 pActions->find( aKey );
65 if( aIter != pActions->end() )
67 if( !pMutableAttrList )
71 xAttrList = pMutableAttrList;
73 const OUString& rAttrValue = xAttrList->getValueByIndex(
i );
74 switch( (*aIter).second.m_nActionType )
78 OUString aAttrValue( rAttrValue );
81 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
86 OUString aAttrValue( rAttrValue );
88 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
93 "unexpected class token" );
96 sal_uInt16 nValuePrefix =
102 pMutableAttrList->SetValueByIndex(
i, aChartClass );
106 pMutableAttrList->SetValueByIndex(
i,
108 aAddInName = aChartClass;
113 OSL_ENSURE(
false,
"unknown action" );
119 if( !aAddInName.isEmpty() )
121 OUString aAttrQName(
GetTransformer().GetNamespaceMap().GetQNameByKey(
124 assert(pMutableAttrList &&
"coverity[var_deref_model] - pMutableAttrList should be assigned in a superset of the enclosing if condition entry logic");
125 pMutableAttrList->AddAttribute( aAttrQName, aAddInName );
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
XMLChartOASISTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName)
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
virtual ~XMLChartOASISTransformerContext() override
XMLTransformerBase & GetTransformer()
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
Handling of tokens in XML:
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
constexpr sal_uInt16 XML_NAMESPACE_OOO