LibreOffice Module sax (master) 1
Classes | Typedefs | Enumerations | Functions
sax_fastparser Namespace Reference

Classes

class  CachedOutputStream
 
class  FastAttributeList
 
class  FastSaxParser
 
class  FastSaxParserImpl
 
class  FastSaxSerializer
 Receives notification of sax document events to write into an XOutputStream. More...
 
class  FastSerializerHelper
 
class  FastTokenHandlerBase
 A native C++ interface to tokenisation. More...
 
class  ForMergeBase
 
struct  TokenValue
 
struct  UnknownAttribute
 

Typedefs

typedef std::shared_ptr< FastSerializerHelperFSHelperPtr
 
typedef std::vector< TokenValueTokenValueList
 
typedef std::shared_ptr< FastSerializerHelperFSHelperPtr
 

Enumerations

enum class  MergeMarks {
  APPEND = 0 ,
  PREPEND = 1 ,
  POSTPONE = 2
}
 

Functions

template<typename Int >
static std::optional< std::pair< unsigned, Int > > invalidChar (char const *string, Int length, Int index)
 Characters not allowed in XML 1.0 XML 1.1 would exclude only U+0000. More...
 
static bool isHexDigit (char c)
 
static void lcl_DebugMergeAppend (std::deque< sal_Int32 > &rLeftEndedElements, std::deque< sal_Int32 > &rLeftStartedElements, std::deque< sal_Int32 > &rRightEndedElements, std::deque< sal_Int32 > &rRightStartedElements)
 
static void lcl_DebugMergePrepend (std::deque< sal_Int32 > &rLeftEndedElements, std::deque< sal_Int32 > &rLeftStartedElements, std::deque< sal_Int32 > &rRightEndedElements, std::deque< sal_Int32 > &rRightStartedElements)
 
FastAttributeListcastToFastAttributeList (const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
 
const char * UseIf (const char *s, bool bUse)
 
template<class TString >
std::optional< TString > UseIf (const TString &s, bool bUse)
 

Typedef Documentation

◆ FSHelperPtr

Definition at line 163 of file fshelper.hxx.

◆ TokenValueList

Definition at line 43 of file fastserializer.hxx.

Enumeration Type Documentation

◆ MergeMarks

enum class sax_fastparser::MergeMarks
strong
Enumerator
APPEND 
PREPEND 
POSTPONE 

Definition at line 41 of file fshelper.hxx.

Function Documentation

◆ castToFastAttributeList()

FastAttributeList & sax_fastparser::castToFastAttributeList ( const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList)
inline

◆ invalidChar()

template<typename Int >
static std::optional< std::pair< unsigned, Int > > sax_fastparser::invalidChar ( char const *  string,
Int  length,
Int  index 
)
static

Characters not allowed in XML 1.0 XML 1.1 would exclude only U+0000.

This assumes that string is UTF-8, but which appears to generally be the case: The only user of this FastSaxSerializer code is FastSerializerHelper, and when its constructor (sax/source/tools/fshelper.cxx) is called with bWriteHeader being true, it calls FastSaxSerializer::startDocument, which writes sXmlHeader claiming encoding="UTF-8". The only place that appears to construct FastSerializerHelper appears to be XmlFilterBase::openFragmentStreamWithSerializer (oox/source/core/xmlfilterbase.cxx), and it only passes false for bWriteHeader when the given rMediaType contains "vml" but not "+xml" (see https://git.libreoffice.org/core/+/6a11add2c4ea975356cfb7bab02301788c79c904%5E!/ "XLSX VML Export fixes", stating "Don't write xml headers for vml files"). But lets assume that even such Vector Markup Language files are written as UTF-8.

Definition at line 121 of file fastserializer.cxx.

References index, and length.

Referenced by sax_fastparser::FastSaxSerializer::write(), and sax_fastparser::FastSaxSerializer::writeBytes().

◆ isHexDigit()

static bool sax_fastparser::isHexDigit ( char  c)
static

Definition at line 150 of file fastserializer.cxx.

Referenced by sax_fastparser::FastSaxSerializer::write().

◆ lcl_DebugMergeAppend()

static void sax_fastparser::lcl_DebugMergeAppend ( std::deque< sal_Int32 > &  rLeftEndedElements,
std::deque< sal_Int32 > &  rLeftStartedElements,
std::deque< sal_Int32 > &  rRightEndedElements,
std::deque< sal_Int32 > &  rRightStartedElements 
)
static

◆ lcl_DebugMergePrepend()

static void sax_fastparser::lcl_DebugMergePrepend ( std::deque< sal_Int32 > &  rLeftEndedElements,
std::deque< sal_Int32 > &  rLeftStartedElements,
std::deque< sal_Int32 > &  rRightEndedElements,
std::deque< sal_Int32 > &  rRightStartedElements 
)
static

◆ UseIf() [1/2]

const char * sax_fastparser::UseIf ( const char *  s,
bool  bUse 
)
inline

Definition at line 167 of file fshelper.hxx.

◆ UseIf() [2/2]

template<class TString >
std::optional< TString > sax_fastparser::UseIf ( const TString &  s,
bool  bUse 
)

Definition at line 170 of file fshelper.hxx.