Branch data Line data Source code
1 : : /*
2 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
3 : : *
4 : : * The contents of this file are subject to the Mozilla Public License Version
5 : : * 1.1 (the "License"); you may not use this file except in compliance with
6 : : * the License. You may obtain a copy of the License at
7 : : * http://www.mozilla.org/MPL/
8 : : *
9 : : * Software distributed under the License is distributed on an "AS IS" basis,
10 : : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 : : * for the specific language governing rights and limitations under the
12 : : * License.
13 : : *
14 : : * The Initial Developer of the Original Code is
15 : : * Miklos Vajna <vmiklos@frugalware.org>
16 : : * Portions created by the Initial Developer are Copyright (C) 2011 the
17 : : * Initial Developer. All Rights Reserved.
18 : : *
19 : : * Contributor(s):
20 : : *
21 : : * Alternatively, the contents of this file may be used under the terms of
22 : : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
23 : : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
24 : : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
25 : : * instead of those above.
26 : : */
27 : :
28 : : #ifndef _RTFDOCUMENT_HXX_
29 : : #define _RTFDOCUMENT_HXX_
30 : :
31 : : #include <resourcemodel/WW8ResourceModel.hxx>
32 : : #include <com/sun/star/uno/XComponentContext.hpp>
33 : : #include <com/sun/star/io/XInputStream.hpp>
34 : : #include <com/sun/star/lang/XComponent.hpp>
35 : : #include <com/sun/star/frame/XFrame.hpp>
36 : : #include <com/sun/star/task/XStatusIndicator.hpp>
37 : :
38 : : namespace writerfilter {
39 : : namespace rtftok {
40 : : /// The RTFDocument opens and resolves the RTF document.
41 : 336 : class WRITERFILTER_RTFTOK_DLLPUBLIC RTFDocument
42 : : : public writerfilter::Reference<Stream>
43 : : {
44 : : public:
45 : : /// Pointer to this stream.
46 : : typedef ::boost::shared_ptr<RTFDocument> Pointer_t;
47 : :
48 [ - + ]: 336 : virtual ~RTFDocument() { }
49 : :
50 : : /// Resolves this document to a stream handler.
51 : : virtual void resolve(Stream & rHandler) = 0;
52 : :
53 : : /// Returns string representation of the type of this reference. (Debugging purpose only.)
54 : : virtual ::std::string getType() const = 0;
55 : : };
56 : :
57 : : /// Interface to create an RTFDocument instance.
58 : : class WRITERFILTER_RTFTOK_DLLPUBLIC RTFDocumentFactory
59 : : {
60 : : public:
61 : : static RTFDocument::Pointer_t
62 : : createDocument(
63 : : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext,
64 : : ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > const & xInputStream,
65 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > const & xDstDoc,
66 : : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & xFrame,
67 : : ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > const & xStatusIndicator);
68 : : };
69 : : } // namespace rtftok
70 : : } // namespace writerfilter
71 : :
72 : : #endif // _RTFDOCUMENT_HXX_
73 : :
74 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|