Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / comphelper / ofopxmlhelper.hxx
blobc0215a0d21d3cc57f5c3196d1f1b50c9755af005
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_COMPHELPER_OFOPXMLHELPER_HXX
21 #define INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
23 #include <com/sun/star/beans/StringPair.hpp>
24 #include <com/sun/star/io/XInputStream.hpp>
25 #include <com/sun/star/io/XOutputStream.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <comphelper/comphelperdllapi.h>
31 namespace comphelper
34 namespace OFOPXMLHelper {
36 // returns sequence of elements, where each element is described by sequence of tags,
37 // where each tag is described by StringPair ( First - name, Second - value )
38 // the first tag of each element sequence must be "Id"
39 /// @throws css::uno::Exception
40 COMPHELPER_DLLPUBLIC
41 css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >
42 ReadRelationsInfoSequence(
43 const css::uno::Reference< css::io::XInputStream >& xInStream,
44 const OUString & aStreamName,
45 const css::uno::Reference< css::uno::XComponentContext >& rContext );
47 // returns sequence containing two entries of type sequence<StringPair>
48 // the first sequence describes "Default" elements, where each element is described
49 // by StringPair object ( First - Extension, Second - ContentType )
50 // the second sequence describes "Override" elements, where each element is described
51 // by StringPair object ( First - PartName, Second - ContentType )
52 /// @throws css::uno::Exception
53 COMPHELPER_DLLPUBLIC
54 css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >
55 ReadContentTypeSequence(
56 const css::uno::Reference< css::io::XInputStream >& xInStream,
57 const css::uno::Reference< css::uno::XComponentContext >& rContext );
59 // writes sequence of elements, where each element is described by sequence of tags,
60 // where each tag is described by StringPair ( First - name, Second - value )
61 // the first tag of each element sequence must be "Id"
62 /// @throws css::uno::Exception
63 COMPHELPER_DLLPUBLIC
64 void WriteRelationsInfoSequence(
65 const css::uno::Reference< css::io::XOutputStream >& xOutStream,
66 const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >& aSequence,
67 const css::uno::Reference< css::uno::XComponentContext >& rContext );
69 // writes two entries of type sequence<StringPair>
70 // the first sequence describes "Default" elements, where each element is described
71 // by StringPair object ( First - Extension, Second - ContentType )
72 // the second sequence describes "Override" elements, where each element is described
73 // by StringPair object ( First - PartName, Second - ContentType )
74 /// @throws css::uno::Exception
75 COMPHELPER_DLLPUBLIC
76 void WriteContentSequence(
77 const css::uno::Reference< css::io::XOutputStream >& xOutStream,
78 const css::uno::Sequence< css::beans::StringPair >& aDefaultsSequence,
79 const css::uno::Sequence< css::beans::StringPair >& aOverridesSequence,
80 const css::uno::Reference< css::uno::XComponentContext >& rContext );
82 } // namespace OFOPXMLHelper
84 } // namespace comphelper
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */