LibreOffice Module sw (master) 1
Public Member Functions | Private Types | Private Attributes | List of all members
RtfStringBuffer Class Reference

Wrapper around OStringBuffers, so less hexdump of graphics have to be kept in memory during RTF export. More...

#include <rtfstringbuffer.hxx>

Public Member Functions

 RtfStringBuffer ()
 
sal_Int32 getLength () const
 Length of all the contained buffers. More...
 
void makeStringAndClear (RtfAttributeOutput *pAttributeOutput)
 Writes the contents of the buffer directly to the supplied stream. More...
 
OString makeStringAndClear ()
 Returns the buffered strings as a string (ignores graphic elements!) More...
 
OStringBuffer & getLastBuffer ()
 Access to the last buffer. More...
 
OStringBuffer * operator-> ()
 
void clear ()
 Similar to ->setLength(0), but for all buffers. More...
 
void append (const SwFlyFrameFormat *pFlyFrameFormat, const SwGrfNode *pGrfNode)
 Same as ->append(), but for graphics and without expanding contents to save memory. More...
 
void appendAndClear (RtfStringBuffer &rBuf)
 Append all contained buffers and clear the argument. More...
 

Private Types

using Values_t = std::vector< RtfStringBufferValue >
 

Private Attributes

Values_t m_aValues
 

Detailed Description

Wrapper around OStringBuffers, so less hexdump of graphics have to be kept in memory during RTF export.

Definition at line 42 of file rtfstringbuffer.hxx.

Member Typedef Documentation

◆ Values_t

using RtfStringBuffer::Values_t = std::vector<RtfStringBufferValue>
private

Definition at line 63 of file rtfstringbuffer.hxx.

Constructor & Destructor Documentation

◆ RtfStringBuffer()

RtfStringBuffer::RtfStringBuffer ( )
default

Member Function Documentation

◆ append()

void RtfStringBuffer::append ( const SwFlyFrameFormat pFlyFrameFormat,
const SwGrfNode pGrfNode 
)

◆ appendAndClear()

void RtfStringBuffer::appendAndClear ( RtfStringBuffer rBuf)

Append all contained buffers and clear the argument.

Definition at line 82 of file rtfstringbuffer.cxx.

References clear(), and m_aValues.

Referenced by RtfAttributeOutput::EndParagraph(), and RtfAttributeOutput::EndRun().

◆ clear()

void RtfStringBuffer::clear ( )

Similar to ->setLength(0), but for all buffers.

Definition at line 75 of file rtfstringbuffer.cxx.

References m_aValues.

Referenced by appendAndClear(), RtfAttributeOutput::TextFootnote_Impl(), RtfAttributeOutput::WriteHeaderFooter_Impl(), and RtfAttributeOutput::writeTextFrame().

◆ getLastBuffer()

OStringBuffer & RtfStringBuffer::getLastBuffer ( )

Access to the last buffer.

Definition at line 66 of file rtfstringbuffer.cxx.

References m_aValues.

Referenced by operator->(), and RtfAttributeOutput::RunText().

◆ getLength()

sal_Int32 RtfStringBuffer::getLength ( ) const

Length of all the contained buffers.

Definition at line 42 of file rtfstringbuffer.cxx.

References m_aValues.

Referenced by RtfAttributeOutput::StartParagraph(), and RtfAttributeOutput::StartRun().

◆ makeStringAndClear() [1/2]

OString RtfStringBuffer::makeStringAndClear ( )

Returns the buffered strings as a string (ignores graphic elements!)

Definition at line 57 of file rtfstringbuffer.cxx.

References aBuf, and m_aValues.

◆ makeStringAndClear() [2/2]

void RtfStringBuffer::makeStringAndClear ( RtfAttributeOutput pAttributeOutput)

Writes the contents of the buffer directly to the supplied stream.

Definition at line 51 of file rtfstringbuffer.cxx.

References m_aValues.

Referenced by RtfAttributeOutput::EndParagraph(), RtfAttributeOutput::OutputFlyFrame_Impl(), and RtfAttributeOutput::writeTextFrame().

◆ operator->()

OStringBuffer * RtfStringBuffer::operator-> ( )

Definition at line 73 of file rtfstringbuffer.cxx.

References getLastBuffer().

Member Data Documentation

◆ m_aValues

Values_t RtfStringBuffer::m_aValues
private

The documentation for this class was generated from the following files: