25 #include <string_view>
26 #include <unordered_map>
49 typedef std::unordered_map<OUString, OUString>
PropsType;
51 typedef ::std::map<OUString, std::unique_ptr<NamePropsType>>
ElemsType;
60 void add(
const char* pElemName,
size_t nElemName,
const char* pClassName,
size_t nClassName,
61 const OUString& aProp,
const OUString& aValue);
67 const OUString& rElem,
const OUString& rClass,
const OUString& rPropName)
const;
71 NamePropsType& rProps,
const OUString& aName,
72 const OUString& aProp,
const OUString& aValue);
117 sal_uInt16 nTW, sal_uInt16 nCO, sal_uInt16 nCOS,
119 : xLockedList( rL ), xCellEntry(rE),
120 pLocalColOffset( pTO ),
121 nFirstTableCell( nFTC ),
123 nColCntStart( nStart ), nMaxCol( nMax ),
124 nTable( nTab ), nTableWidth( nTW ),
125 nColOffset( nCO ), nColOffsetStart( nCOS ),
137 : nLastCol( nLCol ), nNextRow( nNRow ),
147 typedef ::std::map<SCROW, SCROW>
InnerMap;
148 typedef ::std::map<sal_uInt16, InnerMap*>
OuterMap;
155 ::std::stack< std::unique_ptr<ScHTMLTableStackEntry> >
185 SCCOL* pCol, sal_uInt16 nOffsetTol );
187 sal_uInt16& nWidth, sal_uInt16 nOffsetTol,
188 sal_uInt16 nWidthTol );
190 sal_uInt16 nWidth, sal_uInt16 nOffsetTol,
191 sal_uInt16 nWidthTol );
193 sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol );
240 mnCol( nCol ), mnRow( nRow ) {}
244 {
return (eOrient ==
tdCol) ? mnCol :
mnRow; }
246 { mnCol = nCol; mnRow = nRow; }
265 mnCols( nCols ), mnRows( nRows ) {}
267 { mnCols = nCols; mnRows = nRows; }
430 std::vector<std::shared_ptr<ScEEParseEntry>>& rEEParseList,
471 bool PushEntry( ScHTMLEntryPtr& rxEntry );
551 std::vector<std::shared_ptr<ScEEParseEntry>>& rEEParseList,
603 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 (