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];
39 protected:
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 
48 public:
49  OOo2OasisTransformer( OUString const & rImplName,
50  OUString const & rSubServiceName ) 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: */
Type
signed char sal_Int8
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OOO_ACTIONS]
Definition: OOo2Oasis.hxx:37
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1965
OOo2OasisTransformer(OUString const &rImplName, OUString const &rSubServiceName) noexcept
Definition: OOo2Oasis.cxx:1769
virtual void SAL_CALL release() noexcept override
Definition: OOo2Oasis.hxx:65
virtual void SAL_CALL acquire() noexcept override
Definition: OOo2Oasis.hxx:62
OUString const m_aSubServiceName
Definition: OOo2Oasis.hxx:35
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1753
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: OOo2Oasis.cxx:1833
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1970
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1901
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1895
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1976
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1520
unsigned char sal_Bool
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1886
virtual ~OOo2OasisTransformer() noexcept override
Definition: OOo2Oasis.cxx:1826
virtual OUString SAL_CALL getImplementationName() override
Definition: OOo2Oasis.cxx:1960
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: OOo2Oasis.cxx:1954
XMLTransformerOOoEventMap_Impl * m_pEventMap
Definition: OOo2Oasis.hxx:38
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
Definition: OOo2Oasis.cxx:1947
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1573
OUString const m_aImplName
Definition: OOo2Oasis.hxx:34
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1914
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: OOo2Oasis.cxx:1855