LibreOffice Module writerperfect (master) 1
WPXSvInputStream.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
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
10#pragma once
11
12#include <librevenge-stream/librevenge-stream.h>
13#include <com/sun/star/uno/Reference.h>
14#include <tools/long.hxx>
15#include "writerperfectdllapi.h"
16#include <memory>
17
18namespace com::sun::star::io
19{
20class XInputStream;
21class XSeekable;
22}
23
24namespace writerperfect
25{
26class WPXSvInputStreamImpl;
27
28class SAL_DLLPUBLIC_RTTI WPXSvInputStream final : public librevenge::RVNGInputStream
29{
30public:
32 WPXSvInputStream(css::uno::Reference<css::io::XInputStream> const& xStream);
34
35 virtual bool isStructured() override;
36 virtual unsigned subStreamCount() override;
37 virtual const char* subStreamName(unsigned id) override;
38 virtual bool existsSubStream(const char* name) override;
39 virtual librevenge::RVNGInputStream* getSubStreamByName(const char* name) override;
40 virtual librevenge::RVNGInputStream* getSubStreamById(unsigned id) override;
41
42 WRITERPERFECT_DLLPUBLIC virtual const unsigned char* read(unsigned long numBytes,
43 unsigned long& numBytesRead) override;
44 WRITERPERFECT_DLLPUBLIC virtual int seek(long offset,
45 librevenge::RVNG_SEEK_TYPE seekType) override;
46 virtual long tell() override;
47 virtual bool isEnd() override;
48
49private:
50 std::unique_ptr<WPXSvInputStreamImpl> mpImpl;
51};
52}
53
54/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XInputStream > xStream
OString name
Name of the stream.
std::unique_ptr< WPXSvInputStreamImpl > mpImpl
#define WRITERPERFECT_DLLPUBLIC