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 .
19 #ifndef INCLUDED_XMLSCRIPT_XMLLIB_IMEXP_HXX
20 #define INCLUDED_XMLSCRIPT_XMLLIB_IMEXP_HXX
22 #include <com/sun/star/uno/Sequence.hxx>
24 #include <xmlscript/xmlscriptdllapi.h>
28 namespace com
{ namespace sun
{ namespace star
{ namespace xml
{ namespace sax
{ class XDocumentHandler
; } } } } }
29 namespace com
{ namespace sun
{ namespace star
{ namespace xml
{ namespace sax
{ class XWriter
; } } } } }
35 // Library container export
36 // HACK C++ struct to transport info. Later the container
37 // itself should do the export/import and use exported XML
38 // functionality from xmlscript
39 struct XMLSCRIPT_DLLPUBLIC LibDescriptor
45 bool bPasswordProtected
;
46 css::uno::Sequence
< OUString
> aElementNames
;
50 struct XMLSCRIPT_DLLPUBLIC LibDescriptorArray
52 std::unique_ptr
<LibDescriptor
[]> mpLibs
;
55 LibDescriptorArray() { mpLibs
= nullptr; mnLibCount
= 0; }
56 LibDescriptorArray( sal_Int32 nLibCount
);
58 ~LibDescriptorArray();
62 XMLSCRIPT_DLLPUBLIC
void
63 exportLibraryContainer(
64 css::uno::Reference
< css::xml::sax::XWriter
> const & xOut
,
65 const LibDescriptorArray
* pLibArray
);
67 XMLSCRIPT_DLLPUBLIC
css::uno::Reference
<
68 css::xml::sax::XDocumentHandler
>
69 importLibraryContainer( LibDescriptorArray
* pLibArray
);
72 XMLSCRIPT_DLLPUBLIC
void
74 css::uno::Reference
< css::xml::sax::XWriter
> const & xOut
,
75 const LibDescriptor
& rLib
);
77 XMLSCRIPT_DLLPUBLIC
css::uno::Reference
<
78 css::xml::sax::XDocumentHandler
>
79 importLibrary( LibDescriptor
& rLib
);
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */