LibreOffice Module editeng (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
EditHTMLParser Class Reference

#include <eehtml.hxx>

Inheritance diagram for EditHTMLParser:
[legend]
Collaboration diagram for EditHTMLParser:
[legend]

Public Member Functions

 EditHTMLParser (SvStream &rIn, OUString aBaseURL, SvKeyValueIterator *pHTTPHeaderAttrs)
 
virtual ~EditHTMLParser () override
 
SvParserState CallParser (EditEngine *pEE, const EditPaM &rPaM)
 
const EditSelectionGetCurSelection () const
 
- Public Member Functions inherited from HTMLParser
 HTMLParser (SvStream &rIn, bool bReadNewDoc=true)
 
virtual SvParserState CallParser () override
 
bool IsNewDoc () const
 
bool IsInHeader () const
 
bool IsReadListing () const
 
bool IsReadXMP () const
 
bool IsReadPRE () const
 
bool IsReadScript () const
 
bool IsReadStyle () const
 
void StartPRE ()
 
void FinishPRE ()
 
HtmlTokenId FilterPRE (HtmlTokenId nToken)
 
void StartListing ()
 
void FinishListing ()
 
HtmlTokenId FilterListing (HtmlTokenId nToken)
 
void StartXMP ()
 
void FinishXMP ()
 
HtmlTokenId FilterXMP (HtmlTokenId nToken)
 
void FinishTextArea ()
 
void FinishPREListingXMP ()
 
HtmlTokenId FilterToken (HtmlTokenId nToken)
 
void ReadRawData (const OUString &rEndToken)
 
void UnescapeToken ()
 
const HTMLOptionsGetOptions (HtmlOptionId const *pNoConvertToken=nullptr)
 
virtual void Continue (HtmlTokenId nToken) override
 
virtual bool ParseMetaOptions (const css::uno::Reference< css::document::XDocumentProperties > &, SvKeyValueIterator *)
 
void ParseScriptOptions (OUString &rLangString, std::u16string_view rBaseURL, HTMLScriptLanguage &rLang, OUString &rSrc, OUString &rLibrary, OUString &rModule)
 
bool SetEncodingByHTTPHeader (SvKeyValueIterator *pHTTPHeader)
 
- Public Member Functions inherited from SvParser< HtmlTokenId >
 SvParser (SvStream &rIn, sal_uInt8 nStackSize=3)
 
virtual SvParserState CallParser ()=0
 
SvParserState GetStatus () const
 
sal_uInt32 GetLineNr () const
 
sal_uInt32 GetLinePos () const
 
void IncLineNr ()
 
sal_uInt32 IncLinePos ()
 
void SetLineNr (sal_uInt32 nlNum)
 
void SetLinePos (sal_uInt32 nlPos)
 
sal_uInt32 GetNextChar ()
 
void RereadLookahead ()
 
bool IsParserWorking () const
 
Link< LinkParamNone *, void > GetAsynchCallLink () const
 
void SaveState (T nToken)
 
void RestoreState ()
 
virtual void Continue (T nToken)
 
void SetSrcEncoding (rtl_TextEncoding eSrcEnc)
 
rtl_TextEncoding GetSrcEncoding () const
 
void SetSwitchToUCS2 (bool bSet)
 
bool IsSwitchToUCS2 () const
 
sal_uInt16 GetCharSize () const
 
GetSaveToken () const
 

Protected Member Functions

virtual void NextToken (HtmlTokenId nToken) override
 
- Protected Member Functions inherited from HTMLParser
HtmlTokenId ScanText (const sal_Unicode cBreak=0U)
 
HtmlTokenId GetNextRawToken ()
 
virtual HtmlTokenId GetNextToken_ () override
 
virtual ~HTMLParser () override
 
void FinishHeader ()
 
void SetNamespace (std::u16string_view rNamespace)
 
virtual void AddMetaUserDefined (OUString const &i_rMetaName)
 
- Protected Member Functions inherited from SvParser< HtmlTokenId >
SkipToken (short nCnt=-1)
 
TokenStackType * GetStackPtr (short nCnt)
 
GetNextToken ()
 
virtual T GetNextToken_ ()=0
 
virtual void NextToken (T nToken)=0
 
virtual ~SvParser () override
 
void ClearTxtConvContext ()
 

Private Member Functions

void StartPara (bool bReal)
 
void EndPara ()
 
void AnchorStart ()
 
void AnchorEnd ()
 
void HeadingStart (HtmlTokenId nToken)
 
void HeadingEnd ()
 
void SkipGroup (HtmlTokenId nEndToken)
 
bool ThrowAwayBlank ()
 
bool HasTextInCurrentPara ()
 
void ImpInsertParaBreak ()
 
void ImpInsertText (const OUString &rText)
 
void ImpSetAttribs (const SfxItemSet &rItems)
 
void ImpSetStyleSheet (sal_uInt16 nHeadingLevel)
 
virtual SvParserState CallParser () override
 

Private Attributes

OUStringBuffer maStyleSource
 
EditSelection aCurSel
 
OUString aBaseURL
 
EditEnginempEditEngine
 
std::optional< AnchorInfomoCurAnchor
 
bool bInPara:1
 
bool bWasInPara:1
 
bool bFieldsInserted:1
 
bool bInTitle:1
 
sal_uInt8 nInTable
 
sal_uInt8 nInCell
 
sal_uInt8 nDefListLevel
 

Additional Inherited Members

- Static Public Member Functions inherited from HTMLParser
static void RemoveSGMLComment (OUString &rString)
 
static bool InternalImgToPrivateURL (OUString &rURL)
 
static rtl_TextEncoding GetEncodingByHttpHeader (SvKeyValueIterator *pHTTPHeader)
 
- Static Protected Member Functions inherited from HTMLParser
static rtl_TextEncoding GetEncodingByMIME (const OUString &rMime)
 
- Protected Attributes inherited from HTMLParser
OUString sSaveToken
 
- Protected Attributes inherited from SvParser< HtmlTokenId >
SvStreamrInput
 
OUStringBuffer aToken
 
sal_uInt32 nlLineNr
 
sal_uInt32 nlLinePos
 
std::unique_ptr< SvParser_Impl< T > > pImplData
 
tools::Long m_nTokenIndex
 
tools::Long nTokenValue
 
bool bTokenHasValue
 
bool bFuzzing
 
SvParserState eState
 
rtl_TextEncoding eSrcEnc
 
sal_uInt64 nNextChPos
 
sal_uInt32 nNextCh
 
bool bSwitchToUCS2
 
bool bRTF_InTextRead
 

Detailed Description

Definition at line 36 of file eehtml.hxx.

Constructor & Destructor Documentation

◆ EditHTMLParser()

EditHTMLParser::EditHTMLParser ( SvStream rIn,
OUString  aBaseURL,
SvKeyValueIterator pHTTPHeaderAttrs 
)

◆ ~EditHTMLParser()

EditHTMLParser::~EditHTMLParser ( )
overridevirtual

Definition at line 63 of file eehtml.cxx.

Member Function Documentation

◆ AnchorEnd()

void EditHTMLParser::AnchorEnd ( )
private

◆ AnchorStart()

void EditHTMLParser::AnchorStart ( )
private

◆ CallParser() [1/2]

virtual SvParserState HTMLParser::CallParser ( )
privatevirtual

Reimplemented from HTMLParser.

◆ CallParser() [2/2]

SvParserState EditHTMLParser::CallParser ( EditEngine pEE,
const EditPaM rPaM 
)

◆ EndPara()

void EditHTMLParser::EndPara ( )
private

Definition at line 715 of file eehtml.cxx.

References bInPara, HasTextInCurrentPara(), and ImpInsertParaBreak().

Referenced by HeadingEnd(), and NextToken().

◆ GetCurSelection()

const EditSelection & EditHTMLParser::GetCurSelection ( ) const
inline

Definition at line 79 of file eehtml.hxx.

References aCurSel.

◆ HasTextInCurrentPara()

bool EditHTMLParser::HasTextInCurrentPara ( )
private

Definition at line 734 of file eehtml.cxx.

References aCurSel, EditPaM::GetNode(), ContentNode::Len(), and EditSelection::Max().

Referenced by EndPara(), HeadingStart(), and NextToken().

◆ HeadingEnd()

void EditHTMLParser::HeadingEnd ( )
private

Definition at line 801 of file eehtml.cxx.

References bInPara, bWasInPara, EndPara(), and ImpSetStyleSheet().

Referenced by NextToken().

◆ HeadingStart()

void EditHTMLParser::HeadingStart ( HtmlTokenId  nToken)
private

◆ ImpInsertParaBreak()

void EditHTMLParser::ImpInsertParaBreak ( )
private

◆ ImpInsertText()

void EditHTMLParser::ImpInsertText ( const OUString &  rText)
private

◆ ImpSetAttribs()

void EditHTMLParser::ImpSetAttribs ( const SfxItemSet rItems)
private

◆ ImpSetStyleSheet()

void EditHTMLParser::ImpSetStyleSheet ( sal_uInt16  nHeadingLevel)
private

◆ NextToken()

void EditHTMLParser::NextToken ( HtmlTokenId  nToken)
overrideprotectedvirtual

◆ SkipGroup()

void EditHTMLParser::SkipGroup ( HtmlTokenId  nEndToken)
private

Definition at line 659 of file eehtml.cxx.

References SvParser< HtmlTokenId >::GetNextToken(), nInCell, and nToken.

Referenced by NextToken().

◆ StartPara()

void EditHTMLParser::StartPara ( bool  bReal)
private

◆ ThrowAwayBlank()

bool EditHTMLParser::ThrowAwayBlank ( )
private

Member Data Documentation

◆ aBaseURL

OUString EditHTMLParser::aBaseURL
private

Definition at line 42 of file eehtml.hxx.

Referenced by AnchorStart().

◆ aCurSel

EditSelection EditHTMLParser::aCurSel
private

◆ bFieldsInserted

bool EditHTMLParser::bFieldsInserted
private

Definition at line 48 of file eehtml.hxx.

Referenced by AnchorEnd(), and CallParser().

◆ bInPara

bool EditHTMLParser::bInPara
private

Definition at line 46 of file eehtml.hxx.

Referenced by EndPara(), HeadingEnd(), HeadingStart(), NextToken(), and StartPara().

◆ bInTitle

bool EditHTMLParser::bInTitle
private

Definition at line 49 of file eehtml.hxx.

Referenced by NextToken().

◆ bWasInPara

bool EditHTMLParser::bWasInPara
private

Definition at line 47 of file eehtml.hxx.

Referenced by HeadingEnd(), and HeadingStart().

◆ maStyleSource

OUStringBuffer EditHTMLParser::maStyleSource
private

Definition at line 40 of file eehtml.hxx.

Referenced by NextToken().

◆ moCurAnchor

std::optional<AnchorInfo> EditHTMLParser::moCurAnchor
private

Definition at line 44 of file eehtml.hxx.

Referenced by AnchorEnd(), AnchorStart(), and NextToken().

◆ mpEditEngine

EditEngine* EditHTMLParser::mpEditEngine
private

◆ nDefListLevel

sal_uInt8 EditHTMLParser::nDefListLevel
private

Definition at line 53 of file eehtml.hxx.

Referenced by NextToken().

◆ nInCell

sal_uInt8 EditHTMLParser::nInCell
private

Definition at line 52 of file eehtml.hxx.

Referenced by NextToken(), and SkipGroup().

◆ nInTable

sal_uInt8 EditHTMLParser::nInTable
private

Definition at line 51 of file eehtml.hxx.

Referenced by NextToken().


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