android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / filter / xml / wrtxml.hxx
blobd08dbb12afaaf2017ce8756cf4a7a25ec7b3e633
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 .
19 #ifndef INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
20 #define INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
22 #include <com/sun/star/io/XOutputStream.hpp>
23 #include <com/sun/star/uno/Sequence.hxx>
24 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <com/sun/star/beans/PropertyValue.hpp>
26 #include <shellio.hxx>
28 class SwPaM;
29 class SfxMedium;
31 namespace com::sun::star {
32 namespace uno { template<class A> class Reference; }
33 namespace uno { template<class A> class Sequence; }
34 namespace uno { class Any; }
35 namespace lang { class XComponent; }
36 namespace lang { class XMultiServiceFactory; }
37 namespace beans { struct PropertyValue; }
40 class SwXMLWriter : public StgWriter
42 ErrCode Write_(const SfxItemSet* pMediumItemSet);
44 using StgWriter::Write;
46 protected:
47 virtual ErrCode WriteStorage() override;
48 virtual ErrCode WriteMedium( SfxMedium& aTargetMedium ) override;
50 public:
52 SwXMLWriter( const OUString& rBaseURL );
53 virtual ~SwXMLWriter() override;
55 virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
57 private:
59 // helper methods to write XML streams
61 // write a single XML stream into the package
62 bool WriteThroughComponent(
63 // the component we export
64 const css::uno::Reference<css::lang::XComponent> & xComponent,
65 const char* pStreamName, // the stream name
66 // service factory for pServiceName
67 const css::uno::Reference<css::uno::XComponentContext> & rFactory,
68 const char* pServiceName, // service name of the component
69 // the argument (XInitialization)
70 const css::uno::Sequence<css::uno::Any> & rArguments,
71 // output descriptor
72 const css::uno::Sequence<css::beans::PropertyValue> & rMediaDesc );
74 // write a single output stream
75 // (to be called either directly or by WriteThroughComponent(...))
76 static bool WriteThroughComponent(
77 const css::uno::Reference<css::io::XOutputStream> & xOutputStream,
78 const css::uno::Reference<css::lang::XComponent> & xComponent,
79 const css::uno::Reference<css::uno::XComponentContext> & rFactory,
80 const char* pServiceName,
81 const css::uno::Sequence<css::uno::Any> & rArguments,
82 const css::uno::Sequence<css::beans::PropertyValue> & rMediaDesc );
85 #endif // INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */