1 /*
2  * This file is part of the LibreOffice project.
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 #pragma once
10 
11 #include <dmapper/resourcemodel.hxx>
12 #include <com/sun/star/uno/XComponentContext.hpp>
13 #include <com/sun/star/io/XInputStream.hpp>
14 #include <com/sun/star/lang/XComponent.hpp>
15 #include <com/sun/star/frame/XFrame.hpp>
16 #include <com/sun/star/task/XStatusIndicator.hpp>
17 #include <unotools/mediadescriptor.hxx>
18 
19 namespace writerfilter::rtftok
20 {
21 /// The RTFDocument opens and resolves the RTF document.
22 class RTFDocument : public writerfilter::Reference<Stream>
23 {
24 public:
25     /// Pointer to this stream.
26     using Pointer_t = tools::SvRef<RTFDocument>;
27 
28     /// Resolves this document to a stream handler.
29     void resolve(Stream& rHandler) override = 0;
30 };
31 
32 /// Interface to create an RTFDocument instance.
33 class RTFDocumentFactory
34 {
35 public:
36     static RTFDocument::Pointer_t
37     createDocument(css::uno::Reference<css::uno::XComponentContext> const& xContext,
38                    css::uno::Reference<css::io::XInputStream> const& xInputStream,
39                    css::uno::Reference<css::lang::XComponent> const& xDstDoc,
40                    css::uno::Reference<css::frame::XFrame> const& xFrame,
41                    css::uno::Reference<css::task::XStatusIndicator> const& xStatusIndicator,
42                    const utl::MediaDescriptor& rMediaDescriptor);
43 };
44 } // namespace writerfilter::rtftok
45 
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
47