LibreOffice Module reportdesign (master) 1
xmlImportDocumentHandler.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLIMPORTDOCUMENTHANDLER_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLIMPORTDOCUMENTHANDLER_HXX
21
22#include <sal/config.h>
23#include <com/sun/star/uno/XComponentContext.hpp>
25#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
26#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
27#include <com/sun/star/lang/XInitialization.hpp>
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/lang/XTypeProvider.hpp>
30#include <com/sun/star/chart2/XChartDocument.hpp>
31#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
32#include <comphelper/uno3.hxx>
33#include <xmloff/xmlimp.hxx>
34#include <memory>
35#include <mutex>
36
37class SvXMLTokenMap;
38namespace rptxml
39{
40typedef ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler
41 , css::lang::XInitialization
42 , css::lang::XServiceInfo> ImportDocumentHandler_BASE;
43
45{
46public:
47 explicit ImportDocumentHandler(css::uno::Reference< css::uno::XComponentContext > context);
48
49private:
50 // XServiceInfo
51 virtual OUString SAL_CALL getImplementationName( ) override;
52 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
53 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
54
55 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
56
58
59 // css::xml::sax::XDocumentHandler:
60 virtual void SAL_CALL startDocument() override;
61 virtual void SAL_CALL endDocument() override;
62 virtual void SAL_CALL startElement(const OUString & aName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttribs) override;
63 virtual void SAL_CALL endElement(const OUString & aName) override;
64 virtual void SAL_CALL characters(const OUString & aChars) override;
65 virtual void SAL_CALL ignorableWhitespace(const OUString & aWhitespaces) override;
66 virtual void SAL_CALL processingInstruction(const OUString & aTarget, const OUString & aData) override;
67 virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > & xLocator) override;
68
69 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
70
71private:
73 void operator =(ImportDocumentHandler const &) = delete;
74
75 virtual ~ImportDocumentHandler() override;
76
77 std::mutex m_aMutex;
79 ::std::vector< OUString> m_aMasterFields;
80 ::std::vector< OUString> m_aDetailFields;
81 css::uno::Sequence< css::beans::PropertyValue > m_aArguments;
82 css::uno::Reference< css::uno::XComponentContext > m_xContext;
83 css::uno::Reference<css::xml::sax::XFastDocumentHandler> m_xDocumentHandler;
84 css::uno::Reference< css::xml::sax::XDocumentHandler > m_xDelegatee;
85 css::uno::Reference< css::uno::XAggregation > m_xProxy;
86 css::uno::Reference< css::lang::XTypeProvider > m_xTypeProvider;
87 css::uno::Reference< css::lang::XServiceInfo > m_xServiceInfo;
88 css::uno::Reference< css::chart2::XChartDocument > m_xModel;
89 css::uno::Reference< css::chart2::data::XDatabaseDataProvider > m_xDatabaseDataProvider;
90
92};
93
94} // namespace rptxml
95
96#endif // INCLUDED_REPORTDESIGN_SOURCE_FILTER_XML_XMLIMPORTDOCUMENTHANDLER_HXX
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
css::uno::Sequence< css::beans::PropertyValue > m_aArguments
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
::std::vector< OUString > m_aDetailFields
::std::vector< OUString > m_aMasterFields
css::uno::Reference< css::lang::XServiceInfo > m_xServiceInfo
css::uno::Reference< css::xml::sax::XFastDocumentHandler > m_xDocumentHandler
virtual void SAL_CALL endElement(const OUString &aName) override
css::uno::Reference< css::lang::XTypeProvider > m_xTypeProvider
css::uno::Reference< css::uno::XAggregation > m_xProxy
::std::unique_ptr< SvXMLTokenMap > m_pReportElemTokenMap
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
css::uno::Reference< css::chart2::XChartDocument > m_xModel
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL characters(const OUString &aChars) override
css::uno::Reference< css::chart2::data::XDatabaseDataProvider > m_xDatabaseDataProvider
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xDelegatee
virtual void SAL_CALL startDocument() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
ImportDocumentHandler(css::uno::Reference< css::uno::XComponentContext > context)
::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler, css::lang::XInitialization, css::lang::XServiceInfo > ImportDocumentHandler_BASE
unsigned char sal_Bool
#define DECLARE_XTYPEPROVIDER()