1*cdf0e10cSrcweir #ifndef WPXSVSTREAM_H
2*cdf0e10cSrcweir #define WPXSVSTREAM_H
3*cdf0e10cSrcweir 
4*cdf0e10cSrcweir #include <sot/storage.hxx>
5*cdf0e10cSrcweir #include <com/sun/star/io/XInputStream.hpp>
6*cdf0e10cSrcweir 
7*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_H_
8*cdf0e10cSrcweir #include <com/sun/star/io/XSeekable.hpp>
9*cdf0e10cSrcweir #endif
10*cdf0e10cSrcweir 
11*cdf0e10cSrcweir 
12*cdf0e10cSrcweir #if defined _MSC_VER
13*cdf0e10cSrcweir #pragma warning( push, 1 )
14*cdf0e10cSrcweir #endif
15*cdf0e10cSrcweir #include <libwpd/WPXStream.h>
16*cdf0e10cSrcweir #if defined _MSC_VER
17*cdf0e10cSrcweir #pragma warning( pop )
18*cdf0e10cSrcweir #endif
19*cdf0e10cSrcweir 
20*cdf0e10cSrcweir class WPXSvInputStream : public WPXInputStream
21*cdf0e10cSrcweir {
22*cdf0e10cSrcweir public:
23*cdf0e10cSrcweir 	WPXSvInputStream( ::com::sun::star::uno::Reference<
24*cdf0e10cSrcweir 					  ::com::sun::star::io::XInputStream > xStream );
25*cdf0e10cSrcweir 	virtual ~WPXSvInputStream();
26*cdf0e10cSrcweir 
27*cdf0e10cSrcweir 	virtual bool isOLEStream();
28*cdf0e10cSrcweir 	virtual WPXInputStream * getDocumentOLEStream();
29*cdf0e10cSrcweir 	virtual WPXInputStream * getDocumentOLEStream(const char *name);
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 	virtual const uint8_t *read(size_t numBytes, size_t &numBytesRead);
32*cdf0e10cSrcweir 	virtual int seek(long offset, WPX_SEEK_TYPE seekType);
33*cdf0e10cSrcweir 	virtual long tell();
34*cdf0e10cSrcweir 	virtual bool atEOS();
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir private:
37*cdf0e10cSrcweir 	SotStorageRef       mxChildStorage;
38*cdf0e10cSrcweir 	SotStorageStreamRef mxChildStream;
39*cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
40*cdf0e10cSrcweir 			::com::sun::star::io::XInputStream > mxStream;
41*cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
42*cdf0e10cSrcweir 			::com::sun::star::io::XSeekable > mxSeekable;
43*cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< sal_Int8 > maData;
44*cdf0e10cSrcweir 	sal_Int64 mnLength;
45*cdf0e10cSrcweir };
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir #endif
48