29#include <osl/diagnose.h>
37 const OUString& rQName ) :
45 const Reference< XAttributeList >& rAttrList )
50 OSL_ENSURE( pActions,
"go no actions" );
52 Reference< XAttributeList > xAttrList( rAttrList );
56 if( !pMutableAttrList )
58 xAttrList = pMutableAttrList;
62 Reference< XAttributeList > xFrameAttrList( pFrameMutableAttrList );
64 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
65 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
67 const OUString& rAttrName = xAttrList->getNameByIndex(
i );
72 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
73 XMLTransformerActions::const_iterator aIter =
74 pActions->find( aKey );
75 if( aIter != pActions->end() )
77 const OUString& rAttrValue = xAttrList->getValueByIndex(
i );
78 switch( (*aIter).second.m_nActionType )
81 pFrameMutableAttrList->AddAttribute( rAttrName, rAttrValue );
82 pMutableAttrList->RemoveAttributeByIndex(
i );
87 OSL_ENSURE(
false,
"unknown action" );
100 const OUString& rLocalName,
101 const OUString& rQName,
102 const Reference< XAttributeList >& rAttrList )
108 OSL_ENSURE( pActions,
"go no actions" );
109 XMLTransformerActions::key_type aKey( nPrefix, rLocalName );
110 XMLTransformerActions::const_iterator aIter = pActions->find( aKey );
112 if( aIter != pActions->end() )
114 switch( (*aIter).second.m_nActionType )
122 nPrefix, rLocalName, rQName, rAttrList );
125 OSL_ENSURE(
false,
"unknown action" );
133 nPrefix, rLocalName, rQName, rAttrList );
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
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 Characters(const OUString &rChars) override
virtual bool IsPersistent() const override
virtual void EndElement() override
OUString const m_aElemQName
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
XMLFrameOOoTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName)
virtual void ExportContent() override
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 rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
virtual void Characters(const OUString &rChars)
XMLTransformerBase & GetTransformer()
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
virtual void EndElement()
Handling of tokens in XML:
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
constexpr sal_uInt16 XML_NAMESPACE_DRAW