LibreOffice Module svtools (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
HtmlWriter Class Referencefinal

#include <HtmlWriter.hxx>

Collaboration diagram for HtmlWriter:
[legend]

Public Member Functions

 HtmlWriter (SvStream &rStream, std::string_view rNamespace=std::string_view())
 
 ~HtmlWriter ()
 
void prettyPrint (bool b)
 
void start (const OString &aElement)
 
bool end (const OString &aElement)
 
void end ()
 
void flushStack ()
 
void attribute (std::string_view aAttribute, const char *aValue)
 
void attribute (std::string_view aAttribute, sal_Int32 aValue)
 
void attribute (std::string_view aAttribute, std::string_view aValue)
 
void attribute (std::string_view aAttribute, std::u16string_view aValue)
 
void attribute (std::string_view aAttribute)
 
void single (const OString &aContent)
 
void endAttribute ()
 
void characters (std::string_view rChars)
 Writes character data. More...
 

Static Public Member Functions

static void writeAttribute (SvStream &rStream, std::string_view aAttribute, sal_Int32 aValue)
 
static void writeAttribute (SvStream &rStream, std::string_view aAttribute, std::string_view aValue)
 

Private Attributes

std::vector< OString > maElementStack
 
SvStreammrStream
 
bool mbElementOpen
 
bool mbCharactersWritten
 
bool mbPrettyPrint
 
OString maNamespace
 XML namespace, in case of XHTML. More...
 

Detailed Description

Definition at line 20 of file HtmlWriter.hxx.

Constructor & Destructor Documentation

◆ HtmlWriter()

HtmlWriter::HtmlWriter ( SvStream rStream,
std::string_view  rNamespace = std::string_view() 
)

Definition at line 16 of file HtmlWriter.cxx.

References maNamespace.

◆ ~HtmlWriter()

HtmlWriter::~HtmlWriter ( )

Definition at line 29 of file HtmlWriter.cxx.

Member Function Documentation

◆ attribute() [1/5]

void HtmlWriter::attribute ( std::string_view  aAttribute)

◆ attribute() [2/5]

void HtmlWriter::attribute ( std::string_view  aAttribute,
const char *  aValue 
)

Definition at line 149 of file HtmlWriter.cxx.

References attribute().

Referenced by HtmlWriterHelper::applyColor(), HtmlWriterHelper::applyEvents(), and attribute().

◆ attribute() [3/5]

void HtmlWriter::attribute ( std::string_view  aAttribute,
sal_Int32  aValue 
)

Definition at line 144 of file HtmlWriter.cxx.

References attribute().

◆ attribute() [4/5]

void HtmlWriter::attribute ( std::string_view  aAttribute,
std::string_view  aValue 
)

Definition at line 135 of file HtmlWriter.cxx.

References mbElementOpen, mrStream, writeAttribute(), and SvStream::WriteChar().

◆ attribute() [5/5]

void HtmlWriter::attribute ( std::string_view  aAttribute,
std::u16string_view  aValue 
)

Definition at line 154 of file HtmlWriter.cxx.

References attribute(), and OUStringToOString().

◆ characters()

void HtmlWriter::characters ( std::string_view  rChars)

Writes character data.

Definition at line 168 of file HtmlWriter.cxx.

References mbCharactersWritten, mrStream, and SvStream::WriteOString().

◆ end() [1/2]

void HtmlWriter::end ( )

◆ end() [2/2]

bool HtmlWriter::end ( const OString &  aElement)

Definition at line 85 of file HtmlWriter.cxx.

References end(), maElementStack, and SAL_WARN_IF.

◆ endAttribute()

void HtmlWriter::endAttribute ( )

Definition at line 66 of file HtmlWriter.cxx.

References mbElementOpen, mbPrettyPrint, mrStream, and SvStream::WriteOString().

◆ flushStack()

void HtmlWriter::flushStack ( )

Definition at line 77 of file HtmlWriter.cxx.

References end(), and maElementStack.

◆ prettyPrint()

void HtmlWriter::prettyPrint ( bool  b)

Definition at line 32 of file HtmlWriter.cxx.

References mbPrettyPrint.

◆ single()

void HtmlWriter::single ( const OString &  aContent)

Definition at line 60 of file HtmlWriter.cxx.

References end(), and start().

◆ start()

void HtmlWriter::start ( const OString &  aElement)

◆ writeAttribute() [1/2]

void HtmlWriter::writeAttribute ( SvStream rStream,
std::string_view  aAttribute,
sal_Int32  aValue 
)
static

Definition at line 121 of file HtmlWriter.cxx.

References writeAttribute().

Referenced by attribute(), and writeAttribute().

◆ writeAttribute() [2/2]

void HtmlWriter::writeAttribute ( SvStream rStream,
std::string_view  aAttribute,
std::string_view  aValue 
)
static

Member Data Documentation

◆ maElementStack

std::vector<OString> HtmlWriter::maElementStack
private

Definition at line 23 of file HtmlWriter.hxx.

Referenced by end(), flushStack(), and start().

◆ maNamespace

OString HtmlWriter::maNamespace
private

XML namespace, in case of XHTML.

Definition at line 31 of file HtmlWriter.hxx.

Referenced by end(), HtmlWriter(), and start().

◆ mbCharactersWritten

bool HtmlWriter::mbCharactersWritten
private

Definition at line 28 of file HtmlWriter.hxx.

Referenced by characters(), and end().

◆ mbElementOpen

bool HtmlWriter::mbElementOpen
private

Definition at line 27 of file HtmlWriter.hxx.

Referenced by attribute(), end(), endAttribute(), and start().

◆ mbPrettyPrint

bool HtmlWriter::mbPrettyPrint
private

Definition at line 29 of file HtmlWriter.hxx.

Referenced by end(), endAttribute(), prettyPrint(), and start().

◆ mrStream

SvStream& HtmlWriter::mrStream
private

Definition at line 25 of file HtmlWriter.hxx.

Referenced by attribute(), characters(), end(), endAttribute(), and start().


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