27#include <osl/diagnose.h>
35 const OUString& rQName ) :
45 const Reference< XAttributeList >& rAttrList )
49 OSL_ENSURE( pActions,
"go no actions" );
51 sal_Int16 nClassName = -1;
53 Reference< XAttributeList > xAttrList( rAttrList );
55 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
56 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
58 const OUString& rAttrName = xAttrList->getNameByIndex(
i );
63 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
64 XMLTransformerActions::const_iterator aIter =
65 pActions->find( aKey );
66 if( aIter != pActions->end() )
68 if( !pMutableAttrList )
72 xAttrList = pMutableAttrList;
74 const OUString& rAttrValue = xAttrList->getValueByIndex(
i );
75 switch( (*aIter).second.m_nActionType )
79 OUString aAttrValue( rAttrValue );
82 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
87 OUString aAttrValue( rAttrValue );
89 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
94 "unexpected class token" );
101 OUString aAttrValue( rAttrValue );
102 sal_uInt16 nValPrefix =
103 static_cast<sal_uInt16
>((*aIter).second.m_nParam1);
106 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
111 "unexpected class token" );
112 aAddInName = rAttrValue;
113 pMutableAttrList->RemoveAttributeByIndex(
i );
118 OSL_ENSURE(
false,
"unknown action" );
124 if( nClassName != -1 && !aAddInName.isEmpty() )
127 pMutableAttrList->SetValueByIndex( nClassName, aAddInName );
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
virtual ~XMLChartOOoTransformerContext() override
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
XMLChartOOoTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName)
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
constexpr sal_uInt16 XML_NAMESPACE_OOO