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_XMLSCRIPT_SOURCE_XMLMOD_IMEXP_IMP_SHARE_HXX
21 #define INCLUDED_XMLSCRIPT_SOURCE_XMLMOD_IMEXP_IMP_SHARE_HXX
23 #include <xmlscript/xmlmod_imexp.hxx>
25 #include <cppuhelper/implbase.hxx>
26 #include <rtl/ustrbuf.hxx>
27 #include <rtl/ref.hxx>
29 #include <com/sun/star/xml/input/XRoot.hpp>
34 // Script module import
37 : public ::cppu::WeakImplHelper
< css::xml::input::XRoot
>
39 friend class ModuleElement
;
41 ModuleDescriptor
& mrModuleDesc
;
43 sal_Int32 XMLNS_SCRIPT_UID
;
46 explicit ModuleImport(ModuleDescriptor
& rModuleDesc
)
47 : mrModuleDesc(rModuleDesc
)
52 virtual ~ModuleImport() override
;
55 virtual void SAL_CALL
startDocument(
56 css::uno::Reference
< css::xml::input::XNamespaceMapping
> const & xNamespaceMapping
) override
;
57 virtual void SAL_CALL
endDocument() override
;
58 virtual void SAL_CALL
processingInstruction(
59 OUString
const & rTarget
, OUString
const & rData
) override
;
60 virtual void SAL_CALL
setDocumentLocator(
61 css::uno::Reference
< css::xml::sax::XLocator
> const & xLocator
) override
;
62 virtual css::uno::Reference
< css::xml::input::XElement
> SAL_CALL
startRootElement(
63 sal_Int32 nUid
, OUString
const & rLocalName
,
64 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
) override
;
68 : public ::cppu::WeakImplHelper
< css::xml::input::XElement
>
70 rtl::Reference
<ModuleImport
> mxImport
;
72 OUString
const _aLocalName
;
73 css::uno::Reference
< css::xml::input::XAttributes
> _xAttributes
;
74 OUStringBuffer _strBuffer
{512};
78 OUString
const & rLocalName
,
79 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
,
80 ModuleImport
* pImport
);
81 virtual ~ModuleElement() override
;
84 virtual css::uno::Reference
< css::xml::input::XElement
> SAL_CALL
getParent() override
;
85 virtual OUString SAL_CALL
getLocalName() override
;
86 virtual sal_Int32 SAL_CALL
getUid() override
;
87 virtual css::uno::Reference
< css::xml::input::XAttributes
> SAL_CALL
getAttributes() override
;
88 virtual void SAL_CALL
ignorableWhitespace(
89 OUString
const & rWhitespaces
) override
;
90 virtual void SAL_CALL
characters( OUString
const & rChars
) override
;
91 virtual void SAL_CALL
processingInstruction(
92 OUString
const & rTarget
, OUString
const & rData
) override
;
93 virtual void SAL_CALL
endElement() override
;
94 virtual css::uno::Reference
< css::xml::input::XElement
> SAL_CALL
startChildElement(
95 sal_Int32 nUid
, OUString
const & rLocalName
,
96 css::uno::Reference
< css::xml::input::XAttributes
> const & xAttributes
) override
;
101 #endif // INCLUDED_XMLSCRIPT_SOURCE_XMLMOD_IMEXP_IMP_SHARE_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */