1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
23 #include <com/sun/star/document/XImporter.hpp>
24 #include <com/sun/star/document/XFilter.hpp>
25 #include "ActionMapTypesOOo.hxx"
26 #include "TransformerBase.hxx"
28 class XMLTransformerOOoEventMap_Impl
;
30 class OOo2OasisTransformer
:
31 public XMLTransformerBase
,
32 public css::document::XImporter
,
33 public css::document::XFilter
35 OUString
const m_aImplName
;
36 OUString
const m_aSubServiceName
;
38 std::unique_ptr
<XMLTransformerActions
> m_aActions
[MAX_OOO_ACTIONS
];
39 XMLTransformerOOoEventMap_Impl
*m_pEventMap
;
42 virtual XMLTransformerContext
*CreateUserDefinedContext(
43 const TransformerAction_Impl
& rAction
,
44 const OUString
& rQName
,
45 bool bPersistent
=false ) override
;
47 virtual XMLTransformerActions
*GetUserDefinedActions( sal_uInt16 n
) override
;
50 OOo2OasisTransformer( OUString
const & rImplName
,
51 OUString
const & rSubServiceName
) throw();
52 virtual ~OOo2OasisTransformer() throw() override
;
56 // (XInterface methods need to be implemented to disambiguate
57 // between those inherited through XMLTransformerBase and
58 // the new interfaces).
60 virtual css::uno::Any SAL_CALL
queryInterface(
61 const css::uno::Type
& aType
) override
;
63 virtual void SAL_CALL
acquire( ) throw () override
64 { XMLTransformerBase::acquire(); };
66 virtual void SAL_CALL
release( ) throw () override
67 { XMLTransformerBase::release(); };
70 virtual void SAL_CALL
initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) override
;
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
;
79 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
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
;
86 virtual void SAL_CALL
setTargetDocument( const css::uno::Reference
< css::lang::XComponent
>& xDoc
) override
;
89 virtual sal_Bool SAL_CALL
filter( const css::uno::Sequence
< css::beans::PropertyValue
>& aDescriptor
) override
;
90 virtual void SAL_CALL
cancel( ) override
;
92 /// @throws css::uno::Exception
93 /// @throws css::uno::RuntimeException
94 void Initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
);
96 // css::xml::sax::XDocumentHandler
97 virtual void SAL_CALL
startDocument() override
;
99 virtual OUString
GetEventName( const OUString
& rName
,
100 bool bForm
= false ) override
;
103 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_OOO2OASIS_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */