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 #ifndef INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
22 
23 #include <com/sun/star/document/XImporter.hpp>
24 #include <com/sun/star/document/XFilter.hpp>
25 #include "ActionMapTypesOOo.hxx"
26 #include "TransformerBase.hxx"
27 
29 
31  public XMLTransformerBase,
32  public css::document::XImporter,
33  public css::document::XFilter
34 {
35  OUString const m_aImplName;
36  OUString const m_aSubServiceName;
37 
38  std::unique_ptr<XMLTransformerActions> m_aActions[MAX_OOO_ACTIONS];
40 protected:
41 
43  const TransformerAction_Impl& rAction,
44  const OUString& rQName,
45  bool bPersistent=false ) override;
46 
47  virtual XMLTransformerActions *GetUserDefinedActions( sal_uInt16 n ) override;
48 
49 public:
50  OOo2OasisTransformer( OUString const & rImplName,
51  OUString const & rSubServiceName ) throw();
52  virtual ~OOo2OasisTransformer() throw() override;
53 
54  // XInterface
55 
56  // (XInterface methods need to be implemented to disambiguate
57  // between those inherited through XMLTransformerBase and
58  // the new interfaces).
59 
60  virtual css::uno::Any SAL_CALL queryInterface(
61  const css::uno::Type& aType ) override;
62 
63  virtual void SAL_CALL acquire( ) throw () override
64  { XMLTransformerBase::acquire(); };
65 
66  virtual void SAL_CALL release( ) throw () override
67  { XMLTransformerBase::release(); };
68 
69  // XInitialization
70  virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
71 
72 
73  // XServiceInfo
74  virtual OUString SAL_CALL getImplementationName( ) override;
75  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
76  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
77 
78  // XTypeProvider
79  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
80 
81  // XUnoTunnel
82  static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
83  virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
84 
85  // XImporter
86  virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
87 
88  // XFilter
89  virtual sal_Bool SAL_CALL filter( const css::uno::Sequence< css::beans::PropertyValue >& aDescriptor ) override;
90  virtual void SAL_CALL cancel( ) override;
91 
94  void Initialize( const css::uno::Sequence< css::uno::Any >& aArguments );
95 
96  // css::xml::sax::XDocumentHandler
97  virtual void SAL_CALL startDocument() override;
98 
99  virtual OUString GetEventName( const OUString& rName,
100  bool bForm = false ) override;
101 };
102 
103 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
104 
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Type
OOo2OasisTransformer(OUString const &rImplName, OUString const &rSubServiceName)
Definition: OOo2Oasis.cxx:1768
signed char sal_Int8
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: OOo2Oasis.cxx:1957
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OOO_ACTIONS]
Definition: OOo2Oasis.hxx:38
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1979
OUString const m_aSubServiceName
Definition: OOo2Oasis.hxx:36
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1752
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: OOo2Oasis.cxx:1832
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1984
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1900
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1894
virtual void SAL_CALL release() override
Definition: OOo2Oasis.hxx:66
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1990
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1519
unsigned char sal_Bool
virtual void SAL_CALL acquire() override
Definition: OOo2Oasis.hxx:63
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1885
virtual OUString SAL_CALL getImplementationName() override
Definition: OOo2Oasis.cxx:1974
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: OOo2Oasis.cxx:1963
XMLTransformerOOoEventMap_Impl * m_pEventMap
Definition: OOo2Oasis.hxx:39
virtual ~OOo2OasisTransformer() override
Definition: OOo2Oasis.cxx:1825
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1572
OUString const m_aImplName
Definition: OOo2Oasis.hxx:35
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1913
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: OOo2Oasis.cxx:1854