LibreOffice Module svtools (master) 1
Typedefs | Functions | Variables
htmlkywd.cxx File Reference
#include <algorithm>
#include <string_view>
#include <o3tl/string_view.hxx>
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
Include dependency graph for htmlkywd.cxx:

Go to the source code of this file.

Typedefs

using HTML_TokenEntry = TokenEntry< HtmlTokenId >
 
using HTML_CharEntry = TokenEntry< sal_Unicode >
 
using HTML_OptionEntry = TokenEntry< HtmlOptionId >
 
using HTML_ColorEntry = TokenEntry< sal_uInt32 >
 

Functions

template<typename T >
static bool sortCompare (const TokenEntry< T > &lhs, const TokenEntry< T > &rhs)
 
template<typename T >
static bool findCompare (const TokenEntry< T > &lhs, std::u16string_view rhs)
 
template<typename T , size_t LEN>
static T search (TokenEntry< T > const (&dataTable)[LEN], std::u16string_view key, T notFoundValue)
 
HtmlTokenId GetHTMLToken (std::u16string_view rName)
 
sal_Unicode GetHTMLCharName (std::u16string_view rName)
 
HtmlOptionId GetHTMLOption (std::u16string_view rName)
 
sal_uInt32 GetHTMLColor (const OUString &rName)
 

Variables

HTML_TokenEntry const aHTMLTokenTab []
 
static bool bSortCharKeyWords = false
 
static HTML_CharEntry aHTMLCharNameTab []
 
static bool bSortOptionKeyWords = false
 
static HTML_OptionEntry aHTMLOptionTab []
 
static bool bSortColorKeyWords = false
 
HTML_ColorEntry const aHTMLColorNameTab []
 

Typedef Documentation

◆ HTML_CharEntry

using HTML_CharEntry = TokenEntry<sal_Unicode>

Definition at line 197 of file htmlkywd.cxx.

◆ HTML_ColorEntry

using HTML_ColorEntry = TokenEntry<sal_uInt32>

Definition at line 652 of file htmlkywd.cxx.

◆ HTML_OptionEntry

using HTML_OptionEntry = TokenEntry<HtmlOptionId>

Definition at line 483 of file htmlkywd.cxx.

◆ HTML_TokenEntry

using HTML_TokenEntry = TokenEntry<HtmlTokenId>

Definition at line 64 of file htmlkywd.cxx.

Function Documentation

◆ findCompare()

template<typename T >
static bool findCompare ( const TokenEntry< T > &  lhs,
std::u16string_view  rhs 
)
static

Definition at line 50 of file htmlkywd.cxx.

Referenced by GetRTFToken().

◆ GetHTMLCharName()

sal_Unicode GetHTMLCharName ( std::u16string_view  rName)

Definition at line 468 of file htmlkywd.cxx.

References aHTMLCharNameTab, and bSortCharKeyWords.

Referenced by HTMLParser::ScanText().

◆ GetHTMLColor()

sal_uInt32 GetHTMLColor ( const OUString &  rName)

Definition at line 803 of file htmlkywd.cxx.

References aHTMLColorNameTab, bSortColorKeyWords, and SAL_MAX_UINT32.

Referenced by HTMLOption::GetColor().

◆ GetHTMLOption()

HtmlOptionId GetHTMLOption ( std::u16string_view  rName)

Definition at line 640 of file htmlkywd.cxx.

References aHTMLOptionTab, bSortOptionKeyWords, search(), and UNKNOWN.

Referenced by HTMLParser::GetOptions().

◆ GetHTMLToken()

HtmlTokenId GetHTMLToken ( std::u16string_view  rName)

◆ search()

template<typename T , size_t LEN>
static T search ( TokenEntry< T > const (&)  dataTable[LEN],
std::u16string_view  key,
notFoundValue 
)
static

Definition at line 55 of file htmlkywd.cxx.

Referenced by GetHTMLOption(), and GetHTMLToken().

◆ sortCompare()

template<typename T >
static bool sortCompare ( const TokenEntry< T > &  lhs,
const TokenEntry< T > &  rhs 
)
static

Definition at line 45 of file htmlkywd.cxx.

Variable Documentation

◆ aHTMLCharNameTab

HTML_CharEntry aHTMLCharNameTab[]
static

Definition at line 202 of file htmlkywd.cxx.

Referenced by GetHTMLCharName().

◆ aHTMLColorNameTab

HTML_ColorEntry const aHTMLColorNameTab[]

Definition at line 660 of file htmlkywd.cxx.

Referenced by GetHTMLColor().

◆ aHTMLOptionTab

HTML_OptionEntry aHTMLOptionTab[]
static

Definition at line 485 of file htmlkywd.cxx.

Referenced by GetHTMLOption().

◆ aHTMLTokenTab

HTML_TokenEntry const aHTMLTokenTab[]

Definition at line 67 of file htmlkywd.cxx.

Referenced by GetHTMLToken().

◆ bSortCharKeyWords

bool bSortCharKeyWords = false
static

Definition at line 200 of file htmlkywd.cxx.

Referenced by GetHTMLCharName().

◆ bSortColorKeyWords

bool bSortColorKeyWords = false
static

Definition at line 655 of file htmlkywd.cxx.

Referenced by GetHTMLColor().

◆ bSortOptionKeyWords

bool bSortOptionKeyWords = false
static

Definition at line 481 of file htmlkywd.cxx.

Referenced by GetHTMLOption().