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 // XImporter
81 virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
82
83 // XFilter
84 virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& aDescriptor ) override;
85 virtual void SAL_CALL cancel( ) override;
86
89 void Initialize( const css::uno::Sequence< css::uno::Any >& aArguments );
90
91 // css::xml::sax::XDocumentHandler
92 virtual void SAL_CALL startDocument() override;
93
94 virtual OUString GetEventName( const OUString& rName,
95 bool bForm = false ) override;
96};
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ MAX_OOO_ACTIONS
OOo2OasisTransformer(OUString aImplName, OUString aSubServiceName) noexcept
Definition: OOo2Oasis.cxx:1556
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) override
Definition: OOo2Oasis.cxx:1662
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1746
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1673
virtual void SAL_CALL release() noexcept override
Definition: OOo2Oasis.hxx:65
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1741
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1305
virtual ~OOo2OasisTransformer() noexcept override
Definition: OOo2Oasis.cxx:1613
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:1620
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1701
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1682
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:1642
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:1736
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1688
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1360
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1540
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1752
Type
unsigned char sal_Bool