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 .
22 #include <com/sun/star/document/XImporter.hpp>
23 #include <com/sun/star/document/XFilter.hpp>
24 #include "ActionMapTypesOOo.hxx"
25 #include "TransformerBase.hxx"
27 class XMLTransformerOOoEventMap_Impl
;
29 using OOo2OasisTransformer_BASE
= cppu::ImplInheritanceHelper
<XMLTransformerBase
,
30 css::document::XImporter
,
31 css::document::XFilter
>;
32 class OOo2OasisTransformer
: public OOo2OasisTransformer_BASE
34 OUString
const m_aImplName
;
35 OUString
const m_aSubServiceName
;
37 std::unique_ptr
<XMLTransformerActions
> m_aActions
[MAX_OOO_ACTIONS
];
38 XMLTransformerOOoEventMap_Impl
*m_pEventMap
;
41 virtual XMLTransformerContext
*CreateUserDefinedContext(
42 const TransformerAction_Impl
& rAction
,
43 const OUString
& rQName
,
44 bool bPersistent
=false ) override
;
46 virtual XMLTransformerActions
*GetUserDefinedActions( sal_uInt16 n
) override
;
49 OOo2OasisTransformer( OUString aImplName
,
50 OUString aSubServiceName
) noexcept
;
51 virtual ~OOo2OasisTransformer() noexcept override
;
54 virtual void SAL_CALL
initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) override
;
58 virtual OUString SAL_CALL
getImplementationName( ) override
;
59 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
60 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
63 virtual void SAL_CALL
setTargetDocument( const css::uno::Reference
< css::lang::XComponent
>& xDoc
) override
;
66 virtual sal_Bool SAL_CALL
filter( const css::uno::Sequence
< css::beans::PropertyValue
>& aDescriptor
) override
;
67 virtual void SAL_CALL
cancel( ) override
;
69 /// @throws css::uno::Exception
70 /// @throws css::uno::RuntimeException
71 void Initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
);
73 // css::xml::sax::XDocumentHandler
74 virtual void SAL_CALL
startDocument() override
;
76 virtual OUString
GetEventName( const OUString
& rName
,
77 bool bForm
= false ) override
;
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */