LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ScHTMLLayoutParser Class Reference

#include <htmlpars.hxx>

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

Public Member Functions

 ScHTMLLayoutParser (EditEngine *, OUString aBaseURL, const Size &aPageSize, ScDocument *)
 
virtual ~ScHTMLLayoutParser () override
 
virtual ErrCode Read (SvStream &, const OUString &rBaseURL) override
 
virtual const ScHTMLTableGetGlobalTable () const override
 Returns the "global table" which contains the entire HTML document. More...
 
- Public Member Functions inherited from ScHTMLParser
 ScHTMLParser (EditEngine *pEditEngine, ScDocument *pDoc)
 The destination document. More...
 
virtual ~ScHTMLParser () override
 
virtual ErrCode Read (SvStream &rStrm, const OUString &rBaseURL) override=0
 
ScHTMLStylesGetStyles ()
 
ScDocumentGetDoc ()
 
virtual const ScHTMLTableGetGlobalTable () const =0
 Returns the "global table" which contains the entire HTML document. More...
 
- Public Member Functions inherited from ScEEParser
 ScEEParser (EditEngine *)
 
virtual ~ScEEParser ()
 
virtual ErrCode Read (SvStream &, const OUString &rBaseURL)=0
 
const ColWidthsMapGetColWidths () const
 
ColWidthsMapGetColWidths ()
 
void GetDimensions (SCCOL &nCols, SCROW &nRows) const
 
size_t ListSize () const
 
ScEEParseEntryListEntry (size_t index)
 
const ScEEParseEntryListEntry (size_t index) const
 

Private Member Functions

 DECL_LINK (HTMLImportHdl, HtmlImportInfo &, void)
 
void NewActEntry (const ScEEParseEntry *)
 
void ProcToken (HtmlImportInfo *)
 
void CloseEntry (const HtmlImportInfo *)
 
void NextRow (const HtmlImportInfo *)
 
void SkipLocked (ScEEParseEntry *, bool bJoin=true)
 
void Colonize (ScEEParseEntry *)
 
sal_uInt16 GetWidth (const ScEEParseEntry *)
 
void SetWidths ()
 
void Adjust ()
 
sal_uInt16 GetWidthPixel (const HTMLOption &)
 
bool IsAtBeginningOfText (const HtmlImportInfo *)
 
void TableOn (HtmlImportInfo *)
 
void ColOn (HtmlImportInfo *)
 
void TableRowOn (const HtmlImportInfo *)
 
void TableRowOff (const HtmlImportInfo *)
 
void TableDataOn (HtmlImportInfo *)
 
void TableDataOff (const HtmlImportInfo *)
 
void TableOff (const HtmlImportInfo *)
 
void Image (HtmlImportInfo *)
 
void AnchorOn (HtmlImportInfo *)
 
void FontOn (HtmlImportInfo *)
 

Static Private Member Functions

static void EntryEnd (ScEEParseEntry *, const ESelection &)
 
static bool SeekOffset (const ScHTMLColOffset *, sal_uInt16 nOffset, SCCOL *pCol, sal_uInt16 nOffsetTol)
 
static void MakeCol (ScHTMLColOffset *, sal_uInt16 &nOffset, sal_uInt16 &nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol)
 
static void MakeColNoRef (ScHTMLColOffset *, sal_uInt16 nOffset, sal_uInt16 nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol)
 
static void ModifyOffset (ScHTMLColOffset *, sal_uInt16 &nOldOffset, sal_uInt16 &nNewOffset, sal_uInt16 nOffsetTol)
 

Private Attributes

Size aPageSize
 
OUString aBaseURL
 
::std::stack< std::unique_ptr< ScHTMLTableStackEntry > > aTableStack
 
OUString aString
 
ScRangeListRef xLockedList
 
std::unique_ptr< OuterMappTables
 
ScHTMLColOffset maColOffset
 
ScHTMLColOffsetpLocalColOffset
 
sal_uLong nFirstTableCell
 
short nTableLevel
 
sal_uInt16 nTable
 
sal_uInt16 nMaxTable
 
SCCOL nColCntStart
 
SCCOL nMaxCol
 
sal_uInt16 nTableWidth
 
sal_uInt16 nColOffset
 
sal_uInt16 nColOffsetStart
 
sal_uInt16 nOffsetTolerance
 
bool bFirstRow
 
bool bTabInTabCell:1
 
bool bInCell:1
 
bool bInTitle:1
 

Additional Inherited Members

- Protected Member Functions inherited from ScEEParser
void NewActEntry (const ScEEParseEntry *)
 
- Protected Attributes inherited from ScHTMLParser
sal_uInt32 maFontHeights [SC_HTML_FONTSIZES]
 
ScDocumentmpDoc
 
- Protected Attributes inherited from ScEEParser
EditEnginepEdit
 
rtl::Reference< SfxItemPoolpPool
 
rtl::Reference< SfxItemPoolpDocPool
 
std::vector< std::shared_ptr< ScEEParseEntry > > maList
 
std::shared_ptr< ScEEParseEntrymxActEntry
 
ColWidthsMap maColWidths
 
int nRtfLastToken
 
SCCOL nColCnt
 
SCROW nRowCnt
 
SCCOL nColMax
 
SCROW nRowMax
 

Detailed Description

Definition at line 152 of file htmlpars.hxx.

Constructor & Destructor Documentation

◆ ScHTMLLayoutParser()

ScHTMLLayoutParser::ScHTMLLayoutParser ( EditEngine pEditP,
OUString  aBaseURL,
const Size aPageSize,
ScDocument pDocP 
)

Definition at line 205 of file htmlpars.cxx.

References maColOffset, MakeColNoRef(), and pLocalColOffset.

◆ ~ScHTMLLayoutParser()

ScHTMLLayoutParser::~ScHTMLLayoutParser ( )
overridevirtual

Definition at line 232 of file htmlpars.cxx.

References aTableStack, pLocalColOffset, pS, and pTables.

Member Function Documentation

◆ Adjust()

void ScHTMLLayoutParser::Adjust ( )
private

◆ AnchorOn()

void ScHTMLLayoutParser::AnchorOn ( HtmlImportInfo pInfo)
private

Definition at line 1392 of file htmlpars.cxx.

References ScEEParser::mxActEntry, and HtmlImportInfo::pParser.

Referenced by ProcToken().

◆ CloseEntry()

void ScHTMLLayoutParser::CloseEntry ( const HtmlImportInfo pInfo)
private

◆ ColOn()

void ScHTMLLayoutParser::ColOn ( HtmlImportInfo pInfo)
private

Definition at line 1358 of file htmlpars.cxx.

References GetWidthPixel(), MakeCol(), nColOffset, pLocalColOffset, and HtmlImportInfo::pParser.

Referenced by ProcToken().

◆ Colonize()

void ScHTMLLayoutParser::Colonize ( ScEEParseEntry pE)
private

◆ DECL_LINK()

ScHTMLLayoutParser::DECL_LINK ( HTMLImportHdl  ,
HtmlImportInfo ,
void   
)
private

◆ EntryEnd()

void ScHTMLLayoutParser::EntryEnd ( ScEEParseEntry pE,
const ESelection rSel 
)
staticprivate

Definition at line 317 of file htmlpars.cxx.

References ESelection::nEndPara, ESelection::nEndPos, ESelection::nStartPara, and pE.

Referenced by CloseEntry(), and TableOn().

◆ FontOn()

void ScHTMLLayoutParser::FontOn ( HtmlImportInfo pInfo)
private

◆ GetGlobalTable()

const ScHTMLTable * ScHTMLLayoutParser::GetGlobalTable ( ) const
overridevirtual

Returns the "global table" which contains the entire HTML document.

Implements ScHTMLParser.

Definition at line 297 of file htmlpars.cxx.

◆ GetWidth()

sal_uInt16 ScHTMLLayoutParser::GetWidth ( const ScEEParseEntry pE)
private

◆ GetWidthPixel()

sal_uInt16 ScHTMLLayoutParser::GetWidthPixel ( const HTMLOption rOption)
private

◆ Image()

void ScHTMLLayoutParser::Image ( HtmlImportInfo pInfo)
private

◆ IsAtBeginningOfText()

bool ScHTMLLayoutParser::IsAtBeginningOfText ( const HtmlImportInfo pInfo)
private

◆ MakeCol()

void ScHTMLLayoutParser::MakeCol ( ScHTMLColOffset pOffset,
sal_uInt16 &  nOffset,
sal_uInt16 &  nWidth,
sal_uInt16  nOffsetTol,
sal_uInt16  nWidthTol 
)
staticprivate

◆ MakeColNoRef()

void ScHTMLLayoutParser::MakeColNoRef ( ScHTMLColOffset pOffset,
sal_uInt16  nOffset,
sal_uInt16  nWidth,
sal_uInt16  nOffsetTol,
sal_uInt16  nWidthTol 
)
staticprivate

◆ ModifyOffset()

void ScHTMLLayoutParser::ModifyOffset ( ScHTMLColOffset pOffset,
sal_uInt16 &  nOldOffset,
sal_uInt16 &  nNewOffset,
sal_uInt16  nOffsetTol 
)
staticprivate

◆ NewActEntry()

void ScHTMLLayoutParser::NewActEntry ( const ScEEParseEntry pE)
private

Definition at line 302 of file htmlpars.cxx.

References ScEEParser::mxActEntry, ScEEParser::NewActEntry(), and pE.

Referenced by CloseEntry(), and TableOn().

◆ NextRow()

void ScHTMLLayoutParser::NextRow ( const HtmlImportInfo pInfo)
private

◆ ProcToken()

void ScHTMLLayoutParser::ProcToken ( HtmlImportInfo pInfo)
private

◆ Read()

ErrCode ScHTMLLayoutParser::Read ( SvStream rStream,
const OUString &  rBaseURL 
)
overridevirtual

◆ SeekOffset()

bool ScHTMLLayoutParser::SeekOffset ( const ScHTMLColOffset pOffset,
sal_uInt16  nOffset,
SCCOL pCol,
sal_uInt16  nOffsetTol 
)
staticprivate

◆ SetWidths()

void ScHTMLLayoutParser::SetWidths ( )
private

◆ SkipLocked()

void ScHTMLLayoutParser::SkipLocked ( ScEEParseEntry pE,
bool  bJoin = true 
)
private

◆ TableDataOff()

void ScHTMLLayoutParser::TableDataOff ( const HtmlImportInfo pInfo)
private

Definition at line 1005 of file htmlpars.cxx.

References bInCell, and CloseEntry().

Referenced by ProcToken().

◆ TableDataOn()

void ScHTMLLayoutParser::TableDataOn ( HtmlImportInfo pInfo)
private

◆ TableOff()

void ScHTMLLayoutParser::TableOff ( const HtmlImportInfo pInfo)
private

◆ TableOn()

void ScHTMLLayoutParser::TableOn ( HtmlImportInfo pInfo)
private

◆ TableRowOff()

void ScHTMLLayoutParser::TableRowOff ( const HtmlImportInfo pInfo)
private

Definition at line 1000 of file htmlpars.cxx.

References NextRow().

Referenced by ProcToken(), and TableOff().

◆ TableRowOn()

void ScHTMLLayoutParser::TableRowOn ( const HtmlImportInfo pInfo)
private

Definition at line 993 of file htmlpars.cxx.

References ScEEParser::nColCnt, nColCntStart, nColOffset, nColOffsetStart, and NextRow().

Referenced by ProcToken().

Member Data Documentation

◆ aBaseURL

OUString ScHTMLLayoutParser::aBaseURL
private

Definition at line 156 of file htmlpars.hxx.

Referenced by Image().

◆ aPageSize

Size ScHTMLLayoutParser::aPageSize
private

Definition at line 155 of file htmlpars.hxx.

Referenced by Adjust(), CloseEntry(), GetWidthPixel(), and SetWidths().

◆ aString

OUString ScHTMLLayoutParser::aString
private

Definition at line 159 of file htmlpars.hxx.

Referenced by ProcToken().

◆ aTableStack

::std::stack< std::unique_ptr<ScHTMLTableStackEntry> > ScHTMLLayoutParser::aTableStack
private

Definition at line 158 of file htmlpars.hxx.

Referenced by TableOff(), TableOn(), and ~ScHTMLLayoutParser().

◆ bFirstRow

bool ScHTMLLayoutParser::bFirstRow
private

Definition at line 174 of file htmlpars.hxx.

Referenced by NextRow(), TableOff(), and TableOn().

◆ bInCell

bool ScHTMLLayoutParser::bInCell
private

Definition at line 176 of file htmlpars.hxx.

Referenced by CloseEntry(), NextRow(), ProcToken(), TableDataOff(), TableDataOn(), TableOff(), and TableOn().

◆ bInTitle

bool ScHTMLLayoutParser::bInTitle
private

Definition at line 177 of file htmlpars.hxx.

Referenced by ProcToken().

◆ bTabInTabCell

bool ScHTMLLayoutParser::bTabInTabCell
private

Definition at line 175 of file htmlpars.hxx.

Referenced by CloseEntry(), TableOff(), and TableOn().

◆ maColOffset

ScHTMLColOffset ScHTMLLayoutParser::maColOffset
private

Definition at line 162 of file htmlpars.hxx.

Referenced by Adjust(), Read(), ScHTMLLayoutParser(), and SetWidths().

◆ nColCntStart

SCCOL ScHTMLLayoutParser::nColCntStart
private

Definition at line 168 of file htmlpars.hxx.

Referenced by Colonize(), GetWidth(), NextRow(), SetWidths(), TableOff(), TableOn(), and TableRowOn().

◆ nColOffset

sal_uInt16 ScHTMLLayoutParser::nColOffset
private

Definition at line 171 of file htmlpars.hxx.

Referenced by ColOn(), Colonize(), NextRow(), TableOff(), TableOn(), and TableRowOn().

◆ nColOffsetStart

sal_uInt16 ScHTMLLayoutParser::nColOffsetStart
private

Definition at line 172 of file htmlpars.hxx.

Referenced by Colonize(), NextRow(), SetWidths(), TableOff(), TableOn(), and TableRowOn().

◆ nFirstTableCell

sal_uLong ScHTMLLayoutParser::nFirstTableCell
private

Definition at line 164 of file htmlpars.hxx.

Referenced by SetWidths(), TableOff(), and TableOn().

◆ nMaxCol

SCCOL ScHTMLLayoutParser::nMaxCol
private

Definition at line 169 of file htmlpars.hxx.

Referenced by CloseEntry(), SetWidths(), TableOff(), and TableOn().

◆ nMaxTable

sal_uInt16 ScHTMLLayoutParser::nMaxTable
private

Definition at line 167 of file htmlpars.hxx.

Referenced by TableOff(), and TableOn().

◆ nOffsetTolerance

sal_uInt16 ScHTMLLayoutParser::nOffsetTolerance
private

Definition at line 173 of file htmlpars.hxx.

Referenced by Adjust(), Colonize(), SetWidths(), TableOff(), and TableOn().

◆ nTable

sal_uInt16 ScHTMLLayoutParser::nTable
private

Definition at line 166 of file htmlpars.hxx.

Referenced by SetWidths(), TableDataOn(), TableOff(), and TableOn().

◆ nTableLevel

short ScHTMLLayoutParser::nTableLevel
private

Definition at line 165 of file htmlpars.hxx.

Referenced by SetWidths(), TableDataOn(), TableOff(), and TableOn().

◆ nTableWidth

sal_uInt16 ScHTMLLayoutParser::nTableWidth
private

Definition at line 170 of file htmlpars.hxx.

Referenced by Colonize(), GetWidthPixel(), SetWidths(), TableOff(), and TableOn().

◆ pLocalColOffset

ScHTMLColOffset* ScHTMLLayoutParser::pLocalColOffset
private

◆ pTables

std::unique_ptr<OuterMap> ScHTMLLayoutParser::pTables
private

Definition at line 161 of file htmlpars.hxx.

Referenced by Adjust(), TableOff(), and ~ScHTMLLayoutParser().

◆ xLockedList

ScRangeListRef ScHTMLLayoutParser::xLockedList
private

Definition at line 160 of file htmlpars.hxx.

Referenced by Adjust(), SkipLocked(), TableOff(), and TableOn().


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