LibreOffice Module xmloff (master) 1
OOo2Oasis.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
20#pragma once
21
22#include <com/sun/star/document/XImporter.hpp>
23#include <com/sun/star/document/XFilter.hpp>
24#include "ActionMapTypesOOo.hxx"
25#include "TransformerBase.hxx"
26
28
30 public XMLTransformerBase,
31 public css::document::XImporter,
32 public css::document::XFilter
33{
34 OUString const m_aImplName;
35 OUString const m_aSubServiceName;
36
37 std::unique_ptr<XMLTransformerActions> m_aActions[MAX_OOO_ACTIONS];
39protected:
40
42 const TransformerAction_Impl& rAction,
43 const OUString& rQName,
44 bool bPersistent=false ) override;
45
46 virtual XMLTransformerActions *GetUserDefinedActions( sal_uInt16 n ) override;
47
48public:
49 OOo2OasisTransformer( OUString aImplName,
50 OUString aSubServiceName ) noexcept;
51 virtual ~OOo2OasisTransformer() noexcept override;
52
53 // XInterface
54
55 // (XInterface methods need to be implemented to disambiguate
56 // between those inherited through XMLTransformerBase and
57 // the new interfaces).
58
59 virtual css::uno::Any SAL_CALL queryInterface(
60 const css::uno::Type& aType ) override;
61
62 virtual void SAL_CALL acquire( ) noexcept override
63 { XMLTransformerBase::acquire(); };
64
65 virtual void SAL_CALL release( ) noexcept override
66 { XMLTransformerBase::release(); };
67
68 // XInitialization
69 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
70
71
72 // XServiceInfo
73 virtual OUString SAL_CALL getImplementationName( ) override;
74 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
75 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
76
77 // XTypeProvider
78 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
79
80 // XUnoTunnel
81 static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept;
82 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
83
84 // XImporter
85 virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
86
87 // XFilter
88 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& aDescriptor ) override;
89 virtual void SAL_CALL cancel( ) override;
90
93 void Initialize( const css::uno::Sequence< css::uno::Any >& aArguments );
94
95 // css::xml::sax::XDocumentHandler
96 virtual void SAL_CALL startDocument() override;
97
98 virtual OUString GetEventName( const OUString& rName,
99 bool bForm = false ) override;
100};
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ MAX_OOO_ACTIONS
OOo2OasisTransformer(OUString aImplName, OUString aSubServiceName) noexcept
Definition: OOo2Oasis.cxx:1774
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1976
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1891
virtual void SAL_CALL release() noexcept override
Definition: OOo2Oasis.hxx:65
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
Definition: OOo2Oasis.cxx:1953
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1971
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1523
virtual ~OOo2OasisTransformer() noexcept override
Definition: OOo2Oasis.cxx:1831
virtual void SAL_CALL acquire() noexcept override
Definition: OOo2Oasis.hxx:62
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: OOo2Oasis.cxx:1838
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1919
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1900
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OOO_ACTIONS]
Definition: OOo2Oasis.hxx:37
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: OOo2Oasis.cxx:1860
OUString const m_aImplName
Definition: OOo2Oasis.hxx:34
OUString const m_aSubServiceName
Definition: OOo2Oasis.hxx:35
XMLTransformerOOoEventMap_Impl * m_pEventMap
Definition: OOo2Oasis.hxx:38
virtual OUString SAL_CALL getImplementationName() override
Definition: OOo2Oasis.cxx:1966
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: OOo2Oasis.cxx:1960
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1906
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1578
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1758
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1982
Type
unsigned char sal_Bool
signed char sal_Int8