Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qtexthtmlparser.cpp File Reference
#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< (const QString &str, const QTextHtmlElement &e)
 
static bool operator< (const QTextHtmlElement &e, const QString &str)
 
static const QTextHtmlElementlookupElementHelper (const QString &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.

Function Documentation

◆ findAttribute()

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

Definition at line 1839 of file qtexthtmlparser.cpp.

Referenced by QTextHtmlStyleSelector::attributeValue().

+ Here is the caller graph for this function:

◆ lookupElementHelper()

static const QTextHtmlElement * lookupElementHelper ( const QString element)
static

Definition at line 426 of file qtexthtmlparser.cpp.

References e, 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 QString str,
const QTextHtmlElement e 
)
static

Definition at line 416 of file qtexthtmlparser.cpp.

References e, and str.

◆ operator<() [2/4]

static bool operator< ( const QTextHtmlElement e,
const QString str 
)
static

Definition at line 421 of file qtexthtmlparser.cpp.

References e, and str.

◆ operator<() [3/4]

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

Definition at line 302 of file qtexthtmlparser.cpp.

References QTextHtmlEntity::name.

◆ operator<() [4/4]

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

Definition at line 297 of file qtexthtmlparser.cpp.

References QTextHtmlEntity::name.

◆ quoteNewline()

static QString quoteNewline ( const QString s)
static

Definition at line 445 of file qtexthtmlparser.cpp.

Referenced by QTextHtmlParser::dumpHtml().

+ Here is the caller graph for this function:

◆ resolveEntity()

static QChar resolveEntity ( QStringView  entity)
static

Definition at line 307 of file qtexthtmlparser.cpp.

References e, 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 1506 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 1496 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 1516 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().