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 *, const OUString &rBaseURL, 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
 
ScHTMLStylesGetStyles ()
 
ScDocumentGetDoc ()
 
- Public Member Functions inherited from ScEEParser
 ScEEParser (EditEngine *)
 
virtual ~ScEEParser ()
 
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
 
SfxItemPoolpPool
 
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 150 of file htmlpars.hxx.

Constructor & Destructor Documentation

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

Definition at line 198 of file htmlpars.cxx.

References maColOffset, MakeColNoRef(), and pLocalColOffset.

ScHTMLLayoutParser::~ScHTMLLayoutParser ( )
overridevirtual

Member Function Documentation

void ScHTMLLayoutParser::Adjust ( )
private
void ScHTMLLayoutParser::AnchorOn ( HtmlImportInfo pInfo)
private

Definition at line 1400 of file htmlpars.cxx.

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

Referenced by ProcToken().

void ScHTMLLayoutParser::CloseEntry ( const HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::ColOn ( HtmlImportInfo pInfo)
private

Definition at line 1366 of file htmlpars.cxx.

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

Referenced by ProcToken().

void ScHTMLLayoutParser::Colonize ( ScEEParseEntry pE)
private
ScHTMLLayoutParser::DECL_LINK ( HTMLImportHdl  ,
HtmlImportInfo ,
void   
)
private
void ScHTMLLayoutParser::EntryEnd ( ScEEParseEntry pE,
const ESelection rSel 
)
staticprivate
void ScHTMLLayoutParser::FontOn ( HtmlImportInfo pInfo)
private
const ScHTMLTable * ScHTMLLayoutParser::GetGlobalTable ( ) const
overridevirtual

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

Implements ScHTMLParser.

Definition at line 290 of file htmlpars.cxx.

sal_uInt16 ScHTMLLayoutParser::GetWidth ( const ScEEParseEntry pE)
private
sal_uInt16 ScHTMLLayoutParser::GetWidthPixel ( const HTMLOption rOption)
private
void ScHTMLLayoutParser::Image ( HtmlImportInfo pInfo)
private
bool ScHTMLLayoutParser::IsAtBeginningOfText ( const HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::MakeCol ( ScHTMLColOffset pOffset,
sal_uInt16 &  nOffset,
sal_uInt16 &  nWidth,
sal_uInt16  nOffsetTol,
sal_uInt16  nWidthTol 
)
staticprivate
void ScHTMLLayoutParser::MakeColNoRef ( ScHTMLColOffset pOffset,
sal_uInt16  nOffset,
sal_uInt16  nWidth,
sal_uInt16  nOffsetTol,
sal_uInt16  nWidthTol 
)
staticprivate
void ScHTMLLayoutParser::ModifyOffset ( ScHTMLColOffset pOffset,
sal_uInt16 &  nOldOffset,
sal_uInt16 &  nNewOffset,
sal_uInt16  nOffsetTol 
)
staticprivate
void ScHTMLLayoutParser::NewActEntry ( const ScEEParseEntry pE)
private
void ScHTMLLayoutParser::NextRow ( const HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::ProcToken ( HtmlImportInfo pInfo)
private
ErrCode ScHTMLLayoutParser::Read ( SvStream rStream,
const OUString &  rBaseURL 
)
overridevirtual
bool ScHTMLLayoutParser::SeekOffset ( const ScHTMLColOffset pOffset,
sal_uInt16  nOffset,
SCCOL pCol,
sal_uInt16  nOffsetTol 
)
staticprivate
void ScHTMLLayoutParser::SetWidths ( )
private
void ScHTMLLayoutParser::SkipLocked ( ScEEParseEntry pE,
bool  bJoin = true 
)
private
void ScHTMLLayoutParser::TableDataOff ( const HtmlImportInfo pInfo)
private

Definition at line 1013 of file htmlpars.cxx.

References bInCell, and CloseEntry().

Referenced by ProcToken().

void ScHTMLLayoutParser::TableDataOn ( HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::TableOff ( const HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::TableOn ( HtmlImportInfo pInfo)
private
void ScHTMLLayoutParser::TableRowOff ( const HtmlImportInfo pInfo)
private

Definition at line 1008 of file htmlpars.cxx.

References NextRow().

Referenced by ProcToken(), and TableOff().

void ScHTMLLayoutParser::TableRowOn ( const HtmlImportInfo pInfo)
private

Definition at line 1001 of file htmlpars.cxx.

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

Referenced by ProcToken().

Member Data Documentation

OUString ScHTMLLayoutParser::aBaseURL
private

Definition at line 154 of file htmlpars.hxx.

Referenced by Image().

Size ScHTMLLayoutParser::aPageSize
private

Definition at line 153 of file htmlpars.hxx.

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

OUString ScHTMLLayoutParser::aString
private

Definition at line 157 of file htmlpars.hxx.

Referenced by ProcToken().

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

Definition at line 156 of file htmlpars.hxx.

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

bool ScHTMLLayoutParser::bFirstRow
private

Definition at line 172 of file htmlpars.hxx.

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

bool ScHTMLLayoutParser::bInCell
private

Definition at line 174 of file htmlpars.hxx.

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

bool ScHTMLLayoutParser::bInTitle
private

Definition at line 175 of file htmlpars.hxx.

Referenced by ProcToken().

bool ScHTMLLayoutParser::bTabInTabCell
private

Definition at line 173 of file htmlpars.hxx.

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

ScHTMLColOffset ScHTMLLayoutParser::maColOffset
private

Definition at line 160 of file htmlpars.hxx.

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

SCCOL ScHTMLLayoutParser::nColCntStart
private

Definition at line 166 of file htmlpars.hxx.

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

sal_uInt16 ScHTMLLayoutParser::nColOffset
private

Definition at line 169 of file htmlpars.hxx.

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

sal_uInt16 ScHTMLLayoutParser::nColOffsetStart
private

Definition at line 170 of file htmlpars.hxx.

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

sal_uLong ScHTMLLayoutParser::nFirstTableCell
private

Definition at line 162 of file htmlpars.hxx.

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

SCCOL ScHTMLLayoutParser::nMaxCol
private

Definition at line 167 of file htmlpars.hxx.

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

sal_uInt16 ScHTMLLayoutParser::nMaxTable
private

Definition at line 165 of file htmlpars.hxx.

Referenced by TableOff(), and TableOn().

sal_uInt16 ScHTMLLayoutParser::nOffsetTolerance
private

Definition at line 171 of file htmlpars.hxx.

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

sal_uInt16 ScHTMLLayoutParser::nTable
private

Definition at line 164 of file htmlpars.hxx.

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

short ScHTMLLayoutParser::nTableLevel
private

Definition at line 163 of file htmlpars.hxx.

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

sal_uInt16 ScHTMLLayoutParser::nTableWidth
private

Definition at line 168 of file htmlpars.hxx.

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

ScHTMLColOffset* ScHTMLLayoutParser::pLocalColOffset
private
std::unique_ptr<OuterMap> ScHTMLLayoutParser::pTables
private

Definition at line 159 of file htmlpars.hxx.

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

ScRangeListRef ScHTMLLayoutParser::xLockedList
private

Definition at line 158 of file htmlpars.hxx.

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


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