LibreOffice Module xmloff (master) 1
xmlbasicscript.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/frame/XModel.hpp>
23#include <com/sun/star/script/XLibraryContainer2.hpp>
25#include <osl/mutex.hxx>
26#include <rtl/ustrbuf.hxx>
27#include <rtl/ref.hxx>
28#include <xmloff/xmlimp.hxx>
29
30namespace xmloff
31{
33{
34protected:
35 static bool
36 getBoolAttr(bool* pRet, sal_Int32 nToken,
37 const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttributes);
38
39public:
41};
42
44{
45private:
46 css::uno::Reference<css::script::XLibraryContainer2> m_xLibContainer;
47
48public:
50 const css::uno::Reference<css::frame::XModel>& rxModel);
51
52 virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext(
53 sal_Int32 Element,
54 const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override;
55};
56
58{
59private:
60 css::uno::Reference<css::script::XLibraryContainer2> m_xLibContainer;
61 css::uno::Reference<css::container::XNameContainer> m_xLib;
62 OUString const m_aLibName;
63 bool const m_bReadOnly;
64
65public:
67 SvXMLImport& rImport,
68 const css::uno::Reference<css::script::XLibraryContainer2>& rxLibContainer,
69 OUString aLibName, bool bReadOnly);
70
71 virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext(
72 sal_Int32 Element,
73 const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override;
74 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
75};
76
78{
79private:
80 css::uno::Reference<css::container::XNameContainer> m_xLib;
81 OUString const m_aName;
82
83public:
85 const css::uno::Reference<css::container::XNameContainer>& rxLib,
86 OUString aName);
87
88 virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext(
89 sal_Int32 Element,
90 const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override;
91};
92
94{
95private:
96 css::uno::Reference<css::container::XNameContainer> m_xLib;
97 OUString const m_aName;
98 OUStringBuffer m_aBuffer;
99
100public:
102 const css::uno::Reference<css::container::XNameContainer>& rxLib,
103 OUString rName);
104
105 virtual void SAL_CALL characters(const OUString& rChars) override;
106 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
107};
108
109} // namespace xmloff
110
111/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
friend class SvXMLImport
Definition: xmlictxt.hxx:49
BasicElementBase(SvXMLImport &rImport)
static bool getBoolAttr(bool *pRet, sal_Int32 nToken, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttributes)
css::uno::Reference< css::container::XNameContainer > m_xLib
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
css::uno::Reference< css::script::XLibraryContainer2 > m_xLibContainer
BasicEmbeddedLibraryElement(SvXMLImport &rImport, const css::uno::Reference< css::script::XLibraryContainer2 > &rxLibContainer, OUString aLibName, bool bReadOnly)
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
css::uno::Reference< css::script::XLibraryContainer2 > m_xLibContainer
BasicLibrariesElement(SvXMLImport &rImport, const css::uno::Reference< css::frame::XModel > &rxModel)
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
BasicModuleElement(SvXMLImport &rImport, const css::uno::Reference< css::container::XNameContainer > &rxLib, OUString aName)
css::uno::Reference< css::container::XNameContainer > m_xLib
css::uno::Reference< css::container::XNameContainer > m_xLib
virtual void SAL_CALL characters(const OUString &rChars) override
This method is called for all characters that are contained in the current element.
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
BasicSourceCodeElement(SvXMLImport &rImport, const css::uno::Reference< css::container::XNameContainer > &rxLib, OUString rName)
DefTokenId nToken