20#include <com/sun/star/xml/sax/SAXException.hpp>
21#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
22#include <com/sun/star/xml/sax/XAttributeList.hpp>
23#include <osl/diagnose.h>
44 const OUString& rQName,
48 m_bPersistent( bPersistent ),
58 const Reference< XAttributeList >& rAttrList )
62 OSL_ENSURE( pActions,
"go no actions" );
64 Reference< XAttributeList > xAttrList( rAttrList );
66 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
67 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
69 const OUString& rAttrName = xAttrList->getNameByIndex(
i );
74 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
75 XMLTransformerActions::const_iterator aIter =
76 pActions->find( aKey );
77 if( aIter != pActions->end() )
79 const OUString& rAttrValue = xAttrList->getValueByIndex(
i );
81 if( !pMutableAttrList )
85 xAttrList = pMutableAttrList;
87 switch( (*aIter).second.m_nActionType )
98 pMutableAttrList->RemoveAttributeByIndex(
i );
106 OUString aAttrValue( rAttrValue );
108 pMutableAttrList->SetValueByIndex(
i, aAttrValue );
157 const OUString& rLocalName,
158 const OUString& rQName,
159 const Reference< XAttributeList >& rAttrList )
204 nPrefix, rLocalName, rQName, rAttrList )
206 nPrefix, rLocalName, rQName, rAttrList );
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
::xmloff::token::XMLTokenEnum m_eTypeToken
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 ~XMLNotesTransformerContext() override
XMLNotesTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName, ::xmloff::token::XMLTokenEnum m_eToken, bool bPersistent)
virtual bool IsPersistent() const override
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
virtual void EndElement() override
const OUString & GetExportQName() const
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
void SetExportQName(const OUString &r)
virtual void EndElement() override
void AddContent(rtl::Reference< XMLTransformerContext > 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 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.
@ XML_ENDNOTES_CONFIGURATION
@ XML_NOTES_CONFIGURATION
@ XML_FOOTNOTES_CONFIGURATION
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_TEXT