27#include <osl/diagnose.h>
39 const OUString& rQName );
44 const OUString& rLocalName,
45 const OUString& rQName,
46 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList )
override;
51XMLParagraphTransformerContext::XMLParagraphTransformerContext(
53 const OUString& rQName ) :
61 const OUString& rQName,
62 const Reference< XAttributeList >& )
73 XMLPersTextContentRNGTransformTContext(
75 const OUString& rQName,
79 virtual void Characters(
const OUString& rChars )
override;
84XMLPersTextContentRNGTransformTContext::XMLPersTextContentRNGTransformTContext(
86 const OUString& rQName,
90 rTransformer, rQName, nPrefix,
eToken )
93void XMLPersTextContentRNGTransformTContext::Characters(
const OUString& rChars )
95 OUString aConvChars( rChars );
117 const OUString& rQName,
118 sal_uInt16 nActionMap ) :
120 m_nActionMap( nActionMap ),
121 m_bStartElementExported( false )
126 const Reference< XAttributeList >& rAttrList )
133 for( sal_Int16
i=0;
i < nAttrCount;
i++ )
135 const OUString& rAttrName =
m_xAttrList->getNameByIndex(
i );
154 pMutableAttrList->RemoveAttributeByIndex(
i );
163 const OUString& rLocalName,
164 const OUString& rQName,
165 const Reference< XAttributeList >& rAttrList )
173 OSL_ENSURE( pActions,
"go no actions" );
176 XMLTransformerActions::key_type aKey( nPrefix, rLocalName );
177 XMLTransformerActions::const_iterator aIter =
178 pActions->find( aKey );
180 if( aIter != pActions->end() )
182 switch( (*aIter).second.m_nActionType )
187 new XMLPersTextContentRNGTransformTContext(
189 (*aIter).second.GetQNamePrefixFromParam1(),
190 (*aIter).second.GetQNameTokenFromParam1() ));
200 (*aIter).second.GetQNamePrefixFromParam1(),
201 (*aIter).second.GetQNameTokenFromParam1() ));
216 OSL_ENSURE(
false,
"unknown action" );
226 OSL_ENSURE( pActions,
"go no actions" );
229 XMLTransformerActions::key_type aKey( nPrefix, rLocalName );
230 XMLTransformerActions::const_iterator aIter =
231 pActions->find( aKey );
233 if( aIter != pActions->end() )
235 switch( (*aIter).second.m_nActionType )
247 OSL_ENSURE(
false,
"unknown action" );
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
XMLPersTextContentTContextVector m_aChildContexts
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
void ExportStartElement()
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList
bool m_bStartElementExported
virtual void EndElement() override
sal_uInt16 const m_nActionMap
XMLMergeElemTransformerContext(XMLTransformerBase &rTransformer, const OUString &rQName, sal_uInt16 nActionMap)
virtual void Characters(const OUString &rChars) override
const OUString & GetExportQName() const
virtual void Characters(const OUString &rChars) override
const OUString & GetTextContent() const
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()
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
virtual void EndElement()
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
constexpr sal_uInt16 XML_NAMESPACE_OFFICE