blob: 248e081821d3133de94608867a9a934be8f8cfb8 (
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>
#include <com/sun/star/io/XSeekable.hpp>
#include <libwpd-stream/libwpd-stream.h>
typedef struct
{
SotStorageRef ref;
} SotStorageRefWrapper;
typedef struct
{
SotStorageStreamRef ref;
} SotStorageStreamRefWrapper;
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< SotStorageRefWrapper > mxChildrenStorages;
std::vector< SotStorageStreamRefWrapper > 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: */
|