20#ifndef INCLUDED_XMLOFF_XMLICTXT_HXX
21#define INCLUDED_XMLOFF_XMLICTXT_HXX
27#include <com/sun/star/xml/sax/XFastContextHandler.hpp>
28#include <com/sun/star/lang/XTypeProvider.hpp>
29#include <rtl/ustring.hxx>
46 public css::lang::XTypeProvider
49 friend class SvXMLImport;
55 SAL_DLLPRIVATE std::optional<SvXMLNamespaceMap>
TakeRewindMap() {
return std::move(m_xRewindMap); }
56 SAL_DLLPRIVATE
void PutRewindMap(std::optional<SvXMLNamespaceMap>&& p) { m_xRewindMap = std::move(
p); }
61 const SvXMLImport&
GetImport()
const {
return mrImport; }
78 virtual void SAL_CALL startFastElement (sal_Int32 Element,
79 const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs)
override;
81 virtual void SAL_CALL startUnknownElement(
const OUString & Namespace,
const OUString & Name,
82 const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
override;
87 virtual void SAL_CALL endFastElement(sal_Int32 Element)
override;
89 virtual void SAL_CALL endUnknownElement(
const OUString & Namespace,
const OUString & Name)
override;
91 virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element,
92 const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs)
override;
94 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(
95 const OUString & Namespace,
const OUString & Name,
96 const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
override;
100 virtual void SAL_CALL characters(
const OUString & aChars)
override;
103 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type& aType )
final override;
104 virtual void SAL_CALL
acquire() noexcept final
override
105 { osl_atomic_increment(&m_nRefCount); }
106 virtual void SAL_CALL
release() noexcept final
override
107 {
if (osl_atomic_decrement(&m_nRefCount) == 0)
delete this; }
110 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) final override;
111 virtual css::
uno::Sequence<
sal_Int8 > SAL_CALL getImplementationId( ) final override;
114#define XMLOFF_WARN_UNKNOWN(area, rIter) \
115 SAL_WARN(area, "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(rIter.getToken()) << " value=" << rIter.toString());
117#define XMLOFF_WARN_UNKNOWN_ATTR(area, token, value) \
118 SAL_WARN(area, "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(token) << "=" << value);
120#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token) \
121 SAL_WARN(area, "unknown element " << SvXMLImport::getPrefixAndNameFromToken(token));
123#define XMLOFF_INFO_UNKNOWN_ELEMENT(area, token) \
124 SAL_INFO(area, "unknown element " << SvXMLImport::getPrefixAndNameFromToken(token));
This class deliberately does not support XWeak, to improve performance when loading large documents.
SAL_DLLPRIVATE void PutRewindMap(std::optional< SvXMLNamespaceMap > &&p)
const SvXMLImport & GetImport() const
SvXMLImport & GetImport()
virtual void SAL_CALL acquire() noexcept final override
virtual void SAL_CALL release() noexcept final override
oslInterlockedCount m_nRefCount
std::optional< SvXMLNamespaceMap > m_xRewindMap
SAL_DLLPRIVATE std::optional< SvXMLNamespaceMap > TakeRewindMap()
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
rtl::Reference< SvXMLImportContext > SvXMLImportContextRef