Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtexthtmlparser.cpp File Reference

(20521c31634b81543af68dc3166f9804c804f911)

#include "qtexthtmlparser_p.h"
#include <qbytearray.h>
#include <qstack.h>
#include <qdebug.h>
#include <qthread.h>
#include <qguiapplication.h>
#include "qtextdocument.h"
#include "qtextformat_p.h"
#include "qtextdocument_p.h"
#include "qtextcursor.h"
#include "qfont_p.h"
#include <algorithm>
+ Include dependency graph for qtexthtmlparser.cpp:

Go to the source code of this file.

Classes

struct  QTextHtmlEntity
 
class  QTextHtmlStyleSelector
 

Macros

#define MAX_ENTITY   258
 

Functions

static bool operator< (QStringView entityStr, const QTextHtmlEntity &entity)
 
static bool operator< (const QTextHtmlEntity &entity, QStringView entityStr)
 
static QChar resolveEntity (QStringView entity)
 
static bool operator< (QStringView str, const QTextHtmlElement &e)
 
static bool operator< (const QTextHtmlElement &e, QStringView str)
 
static const QTextHtmlElementlookupElementHelper (QStringView element)
 
static QString quoteNewline (const QString &s)
 
static QTextFrameFormat::BorderStyle toQTextFrameFormat (QCss::BorderStyle cssStyle)
 
static bool setIntAttribute (int *destination, const QString &value)
 
static bool setFloatAttribute (qreal *destination, const QString &value)
 
static void setWidthAttribute (QTextLength *width, const QString &valueStr)
 
static int findAttribute (const QStringList &attributes, const QString &name)
 
QList< QCss::DeclarationstandardDeclarationForNode (const QTextHtmlParserNode &node)
 

Variables

static const struct QTextHtmlEntity entities []
 
static const ushort windowsLatin1ExtendedCharacters [0xA0 - 0x80]
 
static const QTextHtmlElement elements [Html_NumElements]
 

Macro Definition Documentation

◆ MAX_ENTITY

#define MAX_ENTITY   258

Definition at line 27 of file qtexthtmlparser.cpp.

Referenced by resolveEntity().

Function Documentation

◆ findAttribute()

static int findAttribute ( const QStringList & attributes,
const QString & name )
inlinestatic

Definition at line 1942 of file qtexthtmlparser.cpp.

Referenced by QTextHtmlStyleSelector::attributeValue().

+ Here is the caller graph for this function:

◆ lookupElementHelper()

static const QTextHtmlElement * lookupElementHelper ( QStringView element)
static

Definition at line 426 of file qtexthtmlparser.cpp.

References elements, and Html_NumElements.

Referenced by QTextHtmlParser::lookupElement(), and QTextHtmlParser::parseTag().

+ Here is the caller graph for this function:

◆ operator<() [1/4]

static bool operator< ( const QTextHtmlElement & e,
QStringView str )
static

Definition at line 421 of file qtexthtmlparser.cpp.

References QTextHtmlElement::name, and str.

◆ operator<() [2/4]

static bool operator< ( const QTextHtmlEntity & entity,
QStringView entityStr )
static

Definition at line 302 of file qtexthtmlparser.cpp.

◆ operator<() [3/4]

static bool operator< ( QStringView entityStr,
const QTextHtmlEntity & entity )
static

Definition at line 297 of file qtexthtmlparser.cpp.

◆ operator<() [4/4]

static bool operator< ( QStringView str,
const QTextHtmlElement & e )
static

Definition at line 416 of file qtexthtmlparser.cpp.

References QTextHtmlElement::name, and str.

◆ quoteNewline()

static QString quoteNewline ( const QString & s)
static

Definition at line 445 of file qtexthtmlparser.cpp.

References QString::replace().

Referenced by QTextHtmlParser::dumpHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveEntity()

static QChar resolveEntity ( QStringView entity)
static

Definition at line 307 of file qtexthtmlparser.cpp.

References QTextHtmlEntity::code, entities, and MAX_ENTITY.

Referenced by QTextHtmlParser::parseEntity().

+ Here is the caller graph for this function:

◆ setFloatAttribute()

static bool setFloatAttribute ( qreal * destination,
const QString & value )
static

Definition at line 1609 of file qtexthtmlparser.cpp.

References destination, and ok.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ setIntAttribute()

static bool setIntAttribute ( int * destination,
const QString & value )
static

Definition at line 1599 of file qtexthtmlparser.cpp.

References destination, and ok.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ setWidthAttribute()

static void setWidthAttribute ( QTextLength * width,
const QString & valueStr )
static

Definition at line 1619 of file qtexthtmlparser.cpp.

References QTextLength::FixedLength, ok, QTextLength::PercentageLength, QString::toDouble(), QStringView::trimmed(), and QStringView::truncate().

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ standardDeclarationForNode()

◆ toQTextFrameFormat()

Variable Documentation

◆ elements

◆ entities

const struct QTextHtmlEntity entities[]
static

Referenced by resolveEntity().

◆ windowsLatin1ExtendedCharacters

const ushort windowsLatin1ExtendedCharacters[0xA0 - 0x80]
static

Definition at line 317 of file qtexthtmlparser.cpp.

Referenced by QTextHtmlParser::parseEntity().