blob: 2e9dc097108407fb19b0ecb930d74c936b7fb8e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef WPXSVSTREAM_H
#define WPXSVSTREAM_H
#include <sot/storage.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_H_
#include <com/sun/star/io/XSeekable.hpp>
#endif
#if defined _MSC_VER
#pragma warning( push, 1 )
#endif
#include <libwpd-stream/WPXStream.h>
#if defined _MSC_VER
#pragma warning( pop )
#endif
class WPXSvInputStream : public WPXInputStream
{
public:
WPXSvInputStream( ::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream > xStream );
virtual ~WPXSvInputStream();
virtual bool isOLEStream();
virtual WPXInputStream * getDocumentOLEStream(const char *name);
virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
virtual int seek(long offset, WPX_SEEK_TYPE seekType);
virtual long tell();
virtual bool atEOS();
private:
std::vector< SotStorageRef > mxChildrenStorages;
std::vector< SotStorageStreamRef > mxChildrenStreams;
::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream > mxStream;
::com::sun::star::uno::Reference<
::com::sun::star::io::XSeekable > mxSeekable;
::com::sun::star::uno::Sequence< sal_Int8 > maData;
sal_Int64 mnLength;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|