/src/libwps/src/lib/WPSStream.cpp
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ |
2 | | /* libwps |
3 | | * Version: MPL 2.0 / LGPLv2.1+ |
4 | | * |
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/. |
8 | | * |
9 | | * Major Contributor(s): |
10 | | * Copyright (C) 2006, 2007 Andrew Ziem |
11 | | * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca) |
12 | | * Copyright (C) 2003 Marc Maurer (uwog@uwog.net) |
13 | | * |
14 | | * For minor contributions see the git repository. |
15 | | * |
16 | | * Alternatively, the contents of this file may be used under the terms |
17 | | * of the GNU Lesser General Public License Version 2.1 or later |
18 | | * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are |
19 | | * applicable instead of those above. |
20 | | */ |
21 | | |
22 | | #include "WPSStream.h" |
23 | | |
24 | | WPSStream::WPSStream(RVNGInputStreamPtr input, libwps::DebugFile &ascii) |
25 | 321k | : m_input(input) |
26 | 321k | , m_ascii(ascii) |
27 | 321k | , m_eof(-1) |
28 | 321k | , m_asciiFile() |
29 | 321k | { |
30 | 321k | if (!input || input->seek(0, librevenge::RVNG_SEEK_END)!=0) |
31 | 0 | return; |
32 | 321k | m_eof=input->tell(); |
33 | 321k | input->seek(0, librevenge::RVNG_SEEK_SET); |
34 | 321k | } |
35 | | |
36 | | WPSStream::WPSStream(RVNGInputStreamPtr input) |
37 | 242 | : m_input(input) |
38 | 242 | , m_ascii(m_asciiFile) |
39 | 242 | , m_eof(-1) |
40 | 242 | , m_asciiFile() |
41 | 242 | { |
42 | 242 | if (!input || input->seek(0, librevenge::RVNG_SEEK_END)!=0) |
43 | 0 | return; |
44 | 242 | m_eof=input->tell(); |
45 | 242 | input->seek(0, librevenge::RVNG_SEEK_SET); |
46 | 242 | } |
47 | | |
48 | | WPSStream::~WPSStream() |
49 | 321k | { |
50 | 321k | } |
51 | | /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ |