10#ifndef INCLUDED_SAX_SOURCE_TOOLS_CACHEDOUTPUTSTREAM_HXX
11#define INCLUDED_SAX_SOURCE_TOOLS_CACHEDOUTPUTSTREAM_HXX
15#include <com/sun/star/io/XOutputStream.hpp>
16#include <com/sun/star/uno/Sequence.hxx>
27 virtual void append(
const css::uno::Sequence<sal_Int8>& rWhat ) = 0;
37 const css::uno::Sequence<sal_Int8>
mpCache;
56 void setOutputStream(
const css::uno::Reference< css::io::XOutputStream >& xOutputStream )
61 void setOutput( std::shared_ptr< ForMergeBase > pForMerge )
89 mxOutputStream->writeBytes( css::uno::Sequence<sal_Int8>(pStr, nLen) );
91 mpForMerge->append( css::uno::Sequence<sal_Int8>(pStr, nLen) );
static const sal_Int32 mnMaximumSize
When buffer hits this size, it's written to mxOutputStream.
css::uno::Reference< css::io::XOutputStream > mxOutputStream
Output stream, usually writing data into files.
sal_Int32 mnCacheWrittenSize
std::shared_ptr< ForMergeBase > mpForMerge
ForMerge structure is used for sorting elements in Writer.
void setOutput(std::shared_ptr< ForMergeBase > pForMerge)
void writeBytes(const sal_Int8 *pStr, sal_Int32 nLen)
cache string and if limit is hit, flush
const css::uno::Reference< css::io::XOutputStream > & getOutputStream() const
const css::uno::Sequence< sal_Int8 > mpCache
void resetOutputToStream()
void flush()
immediately write buffer into mxOutputStream and clear
void setOutputStream(const css::uno::Reference< css::io::XOutputStream > &xOutputStream)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)