1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SAX_FASTPARSER_HXX
21 #define INCLUDED_SAX_FASTPARSER_HXX
23 #include <com/sun/star/xml/sax/XFastParser.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include <com/sun/star/lang/XInitialization.hpp>
28 #include <sax/saxdllapi.h>
31 namespace com::sun::star::xml::sax
{
32 class XFastDocumentHandler
;
33 class XFastTokenHandler
;
36 namespace sax_fastparser
{
39 class FastSaxParserImpl
;
41 // This class implements the external Parser interface
42 class SAX_DLLPUBLIC FastSaxParser final
43 : public ::cppu::WeakImplHelper
<
44 css::lang::XInitialization
,
45 css::xml::sax::XFastParser
,
46 css::lang::XServiceInfo
>
48 std::unique_ptr
<FastSaxParserImpl
> mpImpl
;
52 virtual ~FastSaxParser() override
;
54 // css::lang::XInitialization:
55 virtual void SAL_CALL
initialize(css::uno::Sequence
<css::uno::Any
> const& rArguments
) override
;
58 virtual void SAL_CALL
parseStream( const css::xml::sax::InputSource
& aInputSource
) override
;
59 virtual void SAL_CALL
setFastDocumentHandler( const css::uno::Reference
< css::xml::sax::XFastDocumentHandler
>& Handler
) override
;
60 virtual void SAL_CALL
setTokenHandler( const css::uno::Reference
< css::xml::sax::XFastTokenHandler
>& Handler
) override
;
61 virtual void SAL_CALL
registerNamespace( const OUString
& NamespaceURL
, sal_Int32 NamespaceToken
) override
;
62 virtual OUString SAL_CALL
getNamespaceURL( const OUString
& rPrefix
) override
;
63 virtual void SAL_CALL
setErrorHandler( const css::uno::Reference
< css::xml::sax::XErrorHandler
>& Handler
) override
;
64 virtual void SAL_CALL
setEntityResolver( const css::uno::Reference
< css::xml::sax::XEntityResolver
>& Resolver
) override
;
65 virtual void SAL_CALL
setLocale( const css::lang::Locale
& rLocale
) override
;
66 virtual void SAL_CALL
setNamespaceHandler( const css::uno::Reference
< css::xml::sax::XFastNamespaceHandler
>& Handler
) override
;
67 virtual void SAL_CALL
setCustomEntityNames( const ::css::uno::Sequence
< ::css::beans::Pair
<::rtl::OUString
, ::rtl::OUString
> >& replacements
) override
;
70 virtual OUString SAL_CALL
getImplementationName( ) override
;
71 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
72 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
77 #endif // _SAX_FASTPARSER_HXX_
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */