20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_HTMLPARS_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_HTMLPARS_HXX
26 #include <string_view>
27 #include <unordered_map>
50 typedef std::unordered_map<OUString, OUString>
PropsType;
52 typedef ::std::map<OUString, std::unique_ptr<NamePropsType>>
ElemsType;
61 void add(
const char* pElemName,
size_t nElemName,
const char* pClassName,
size_t nClassName,
62 const OUString& aProp,
const OUString& aValue);
68 const OUString& rElem,
const OUString& rClass,
const OUString& rPropName)
const;
72 NamePropsType& rProps,
const OUString& aName,
73 const OUString& aProp,
const OUString& aValue);
118 sal_uInt16 nTW, sal_uInt16 nCO, sal_uInt16 nCOS,
120 : xLockedList( rL ), xCellEntry(rE),
121 pLocalColOffset( pTO ),
122 nFirstTableCell( nFTC ),
124 nColCntStart( nStart ), nMaxCol( nMax ),
125 nTable( nTab ), nTableWidth( nTW ),
126 nColOffset( nCO ), nColOffsetStart( nCOS ),
138 : nLastCol( nLCol ), nNextRow( nNRow ),
148 typedef ::std::map<SCROW, SCROW>
InnerMap;
149 typedef ::std::map<sal_uInt16, InnerMap*>
OuterMap;
156 ::std::stack< std::unique_ptr<ScHTMLTableStackEntry> >
186 SCCOL* pCol, sal_uInt16 nOffsetTol );
188 sal_uInt16& nWidth, sal_uInt16 nOffsetTol,
189 sal_uInt16 nWidthTol );
191 sal_uInt16 nWidth, sal_uInt16 nOffsetTol,
192 sal_uInt16 nWidthTol );
194 sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol );
241 mnCol( nCol ), mnRow( nRow ) {}
245 {
return (eOrient ==
tdCol) ? mnCol :
mnRow; }
247 { mnCol = nCol; mnRow = nRow; }
266 mnCols( nCols ), mnRows( nRows ) {}
268 { mnCols = nCols; mnRows = nRows; }
431 std::vector<std::shared_ptr<ScEEParseEntry>>& rEEParseList,
472 bool PushEntry( ScHTMLEntryPtr& rxEntry );
552 std::vector<std::shared_ptr<ScEEParseEntry>>& rEEParseList,
604 static void ParseStyle(std::u16string_view rStrm);
DECL_LINK(HTMLImportHdl, HtmlImportInfo &, void)
std::unique_ptr< OuterMap > pTables
void RowOn(const HtmlImportInfo &rInfo)
Starts next row (tag).
EditEngine & mrEditEngine
List of all used cells.
ScHTMLStyles()
just a persistent empty string.
std::vector< std::shared_ptr< ScEEParseEntry > > & mrEEParseList
Edit engine (from ScEEParser).
::std::unique_ptr< ScHTMLTableMap > ScHTMLTableMapPtr
ScHTMLTable * PreOn(const HtmlImportInfo &rInfo)
Starts a new table based on preformatted text (.
void AnchorOn(HtmlImportInfo *)
SfxItemSet maTableItemSet
Unique identifier of this table.
const sal_uInt16 SC_HTML_OFFSET_TOLERANCE_LARGE
static void EntryEnd(ScEEParseEntry *, const ESelection &)
void Set(const ScAddress &rAddr)
ScHTMLSize maSize
Cumulated cell counts for each HTML table column/row.
static void MakeCol(ScHTMLColOffset *, sal_uInt16 &nOffset, sal_uInt16 &nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol)
ScHTMLTableAutoId(ScHTMLTableId &rnUnusedId)
Reference to global unused identifier variable.
static void ModifyOffset(ScHTMLColOffset *, sal_uInt16 &nOldOffset, sal_uInt16 &nNewOffset, sal_uInt16 nOffsetTol)
A map of ScHTMLTable objects.
virtual ~ScHTMLParser() override
void Strip(const EditEngine &rEditEngine)
Deletes leading and trailing empty paragraphs from the entry.
A single entry containing a line of text or representing a table.
bool PushEntry(ScHTMLEntryPtr &rxEntry)
Tries to insert the entry into the current cell.
const sal_uInt32 SC_HTML_FONTSIZES
ScHTMLEntry(const SfxItemSet &rItemSet, ScHTMLTableId nTableId=SC_HTML_NO_TABLE)
void Colonize(ScEEParseEntry *)
::std::map< SCROW, SCROW > InnerMap
bool IsEmptyCell() const
Returns true, if the current cell does not contain an entry yet.
void InsertNewCell(const ScHTMLSize &rSpanSize)
Inserts a new cell in an unused position, starting from current cell position.
::std::map< sal_uInt16, InnerMap * > OuterMap
OUString maTableName
Table of nested HTML tables.
ScRangeList maHMergedCells
Items for the current cell.
void CloseEntry(const HtmlImportInfo *)
DECL_LINK(HTMLImportHdl, HtmlImportInfo &, void)
void AdjustEnd(const HtmlImportInfo &rInfo)
Sets end point of the entry selection to the end of the import info object.
bool IsAtBeginningOfText(const HtmlImportInfo *)
ScHTMLTable * TableOn(const HtmlImportInfo &rInfo)
Starts a new table nested in this table (.
ScHTMLTable * TableOff(const HtmlImportInfo &rInfo)
Closes this table (tag).
NamePropsType m_GlobalProps
bool mbPreFormText
true = Table borders on.
ScSizeVec maCumSizes[2]
Working entry, not yet inserted in a list.
void InsertText(const HtmlImportInfo &rInfo)
Inserts a text portion into current entry.
ScHTMLPos(SCCOL nCol, SCROW nRow)
void CloseTable(const HtmlImportInfo &rInfo)
Closes the current table, regardless on opening tag.
ScHTMLTableAutoId maTableId
Table name from.
SCCOLROW GetDocSize(ScHTMLOrient eOrient, SCCOLROW nCellPos) const
Returns the resulting document row/column count of the specified HTML row/column. ...
void ProcToken(HtmlImportInfo *)
virtual ~ScHTMLGlobalTable() override
ScHTMLEntryPtr mxCurrEntry
Current entry vector from map for faster access.
ScHTMLTableId & mrnUnusedId
The created unique table identifier.
ScHTMLParser * mpParser
Resulting base address in a Calc document.
static void ParseStyle(std::u16string_view rStrm)
void NextRow(const HtmlImportInfo *)
void BodyOff(const HtmlImportInfo &rInfo)
Closes the body of the HTML document (