diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-04-27 01:31:35 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-04-27 01:31:35 +0200 |
commit | 48c61f72dd9e205f3d44838ae21cde0419538f1c (patch) | |
tree | 22eb884e19dd4f7c5b7dfaa0ba10bb77e12e3f19 /oox/inc/oox/vml/vmlinputstream.hxx | |
parent | f433a86839499662cfc1356882b0538f01d850b6 (diff) | |
parent | 275e5c6544ff2f90cf6bd57b6a8a6293fe10943c (diff) |
Merge commit 'ooo/DEV300_m106' into integration/dev300_m106
Conflicts:
binfilter/bf_svtools/source/filter.vcl/jpeg/svt_jpegc.c
filter/source/config/fragments/filters/SVG___Scalable_Vector_Graphics.xcu
filter/source/config/fragments/internalgraphicfilters/svg_Import.xcu
filter/source/config/fragments/types/svg_Scalable_Vector_Graphics.xcu
filter/source/graphicfilter/eos2met/eos2met.cxx
filter/source/msfilter/msvbahelper.cxx
filter/source/svg/makefile.mk
filter/source/svg/svgexport.cxx
filter/source/svg/svgfilter.cxx
filter/source/svg/svgfilter.hxx
filter/source/svg/svgfontexport.cxx
filter/source/svg/svgfontexport.hxx
filter/source/svg/svgwriter.cxx
filter/source/svg/svgwriter.hxx
oox/inc/oox/core/relations.hxx
oox/inc/oox/core/relationshandler.hxx
oox/inc/oox/dump/biffdumper.hxx
oox/inc/oox/dump/dffdumper.hxx
oox/inc/oox/dump/dumperbase.hxx
oox/inc/oox/dump/oledumper.hxx
oox/inc/oox/dump/pptxdumper.hxx
oox/inc/oox/helper/containerhelper.hxx
oox/inc/oox/helper/propertyset.hxx
oox/inc/oox/xls/commentsbuffer.hxx
oox/inc/oox/xls/sharedformulabuffer.hxx
oox/source/drawingml/shape.cxx
oox/source/dump/oledumper.cxx
oox/source/helper/binaryinputstream.cxx
oox/source/helper/binaryoutputstream.cxx
oox/source/helper/binarystreambase.cxx
oox/source/helper/propertyset.cxx
oox/source/ole/vbacontrol.cxx
oox/source/ole/vbaproject.cxx
oox/source/token/namespaces.hxx.tail
oox/source/vml/vmlshape.cxx
oox/source/xls/commentsbuffer.cxx
oox/source/xls/condformatbuffer.cxx
oox/source/xls/drawingfragment.cxx
oox/source/xls/formulaparser.cxx
oox/source/xls/pivotcachebuffer.cxx
oox/source/xls/richstring.cxx
oox/source/xls/sharedformulabuffer.cxx
oox/source/xls/sheetdatacontext.cxx
oox/source/xls/worksheethelper.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
Diffstat (limited to 'oox/inc/oox/vml/vmlinputstream.hxx')
-rw-r--r-- | oox/inc/oox/vml/vmlinputstream.hxx | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/oox/inc/oox/vml/vmlinputstream.hxx b/oox/inc/oox/vml/vmlinputstream.hxx index ad46888c3856..da16ff14d9a6 100644 --- a/oox/inc/oox/vml/vmlinputstream.hxx +++ b/oox/inc/oox/vml/vmlinputstream.hxx @@ -29,36 +29,72 @@ #ifndef OOX_VML_VMLINPUTSTREAM_HXX #define OOX_VML_VMLINPUTSTREAM_HXX -#include <comphelper/seqstream.hxx> +#include <com/sun/star/io/XInputStream.hpp> +#include <cppuhelper/implbase1.hxx> +#include <rtl/string.hxx> + +namespace com { namespace sun { namespace star { + namespace io { class XTextInputStream; } + namespace uno { class XComponentContext; } +} } } namespace oox { namespace vml { // ============================================================================ -struct StreamDataContainer -{ - ::comphelper::ByteSequence maDataSeq; +typedef ::cppu::WeakImplHelper1< ::com::sun::star::io::XInputStream > InputStream_BASE; - explicit StreamDataContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm ); -}; +/** An input stream class for VML streams, implementing the UNO interface + com.sun.star.io.XInputStream needed by the Expat XML parsers. -// ============================================================================ + This stream reads the data from the input stream passed to the constructor, + and parses all XML elements for features unsupported by the current Expat + XML parser: -/** An input stream class for VML streams. + 1) All elements that have the form '<![inst]>' where 'inst' is any string + not containing the characters '<' and '>' are stripped from the input + stream. - This stream reads the entire data from the input stream passed to the - constructor, and parses all XML elements for features unsupported by the - current Expat parser. + 2) Multiple occurences of the same attribute in an element but the last + are removed. - All elements that have the form '<![inst]>' where 'inst' is any string not - containing the characters '<' and '>' are stripped from the input stream. + 3) Line breaks represented by a single <br> element (without matching + </br> element) are replaced by a literal LF character. */ -class InputStream : private StreamDataContainer, public ::comphelper::SequenceInputStream +class InputStream : public InputStream_BASE { public: - explicit InputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm ); + explicit InputStream( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm ); virtual ~InputStream(); + + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead ) + throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead ) + throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL available() + throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL closeInput() + throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + +private: + void updateBuffer() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + ::rtl::OString readToElementBegin() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + ::rtl::OString readToElementEnd() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::io::XTextInputStream > + mxTextStrm; + ::com::sun::star::uno::Sequence< sal_Unicode > maOpeningBracket; + ::com::sun::star::uno::Sequence< sal_Unicode > maClosingBracket; + const ::rtl::OString maOpeningCData; + const ::rtl::OString maClosingCData; + ::rtl::OString maBuffer; + sal_Int32 mnBufferPos; }; // ============================================================================ @@ -68,4 +104,4 @@ public: #endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |