21#include <osl/diagnose.h>
36#include <document.hxx>
39#include <stlsheet.hxx>
44#include <tokenarray.hxx>
48 bool bConvertDate,
bool bConvertScientific )
50 ScHTMLImport aImp( pDoc, rBaseURL, rRange, bCalcWidthHeight );
54 aImp.
WriteToDocument(
true, nOutputFactor, pFormatter, bConvertDate, bConvertScientific );
60 return std::make_unique<ScHTMLImport>( pDocP, rBaseURL, rRange,
true );
70 GetStyleSheetPool()->Find( aPageStyle, SfxStyleFamily::Page ));
83 OSL_FAIL(
"PageSize Null ?!?!?");
92 OSL_FAIL(
"no StyleSheet?!?");
96 if( bCalcWidthHeight )
115 bool bSizeColsRows,
double nOutputFactor,
SvNumberFormatter* pFormatter,
bool bConvertDate,
116 bool bConvertScientific )
147 aNewItem.
SetLine( pFromItem->
GetLine( SvxBoxItemLine::RIGHT ), SvxBoxItemLine::RIGHT );
153 aNewItem.
SetLine( pFromItem->
GetLine( SvxBoxItemLine::BOTTOM ), SvxBoxItemLine::BOTTOM );
178 while( (pTable = pGlobTable->
FindNestedTable( ++nTableId )) !=
nullptr )
181 if (!aNewRange.
Move( nColDiff, nRowDiff, nTabDiff, aErrorRange, *
mpDoc ))
183 assert(!
"can't move");
193 const OUString
sName(
aName.makeStringAndClear());
206 if (rOrigName.empty())
212 sal_Int32 nStringIx = 0;
static OutputDevice * GetDefaultDevice()
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void IncCol(SCCOL nDelta=1)
void IncRow(SCROW nDelta=1)
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
virtual void WriteToDocument(bool bSizeColsRows=false, double nOutputFactor=1.0, SvNumberFormatter *pFormatter=nullptr, bool bConvertDate=true, bool bConvertScientific=true) override
virtual ErrCode Read(SvStream &rStream, const OUString &rBaseURL) override
std::unique_ptr< ScTabEditEngine > mpEngine
virtual ScRange GetRange() override
std::unique_ptr< ScEEParser > mpParser
ScEEParseEntry * ListEntry(size_t index)
static SC_DLLPUBLIC OUString addToken(std::u16string_view rTokenList, std::u16string_view rToken, sal_Unicode cSep, sal_Int32 nSepCount=1, bool bForceSep=false)
Adds the string rToken to rTokenList, using a list separator character.
static SC_DLLPUBLIC const CharClass & getCharClass()
static void InsertRangeName(ScDocument &rDoc, const OUString &rName, const ScRange &rRange)
virtual void WriteToDocument(bool bSizeColsRows=false, double nOutputFactor=1.0, SvNumberFormatter *pFormatter=nullptr, bool bConvertDate=true, bool bConvertScientific=true) override
ScHTMLImport(ScDocument *pDoc, const OUString &rBaseURL, const ScRange &rRange, bool bCalcWidthHeight)
static OUString GetHTMLRangeNameList(const ScDocument &rDoc, std::u16string_view rOrigName)
Base class for HTML parser classes.
virtual const ScHTMLTable * GetGlobalTable() const =0
Returns the "global table" which contains the entire HTML document.
The HTML parser for data queries.
Stores data for one table in an HTML document.
const OUString & GetTableName() const
Returns the name of the table, specified in the TABLE tag.
void ApplyCellBorders(ScDocument *pDoc, const ScAddress &rFirstPos) const
Applies border formatting to the passed document.
const OUString & GetTableCaption() const
Returns the caption of the table, specified in the tag.
ScHTMLTable * FindNestedTable(ScHTMLTableId nTableId) const
Searches in all nested tables for the specified table.
SCCOLROW GetDocSize(ScHTMLOrient eOrient, SCCOLROW nCellPos) const
Returns the resulting document row/column count of the specified HTML row/column.
void GetDocRange(ScRange &rRange) const
Calculates the current Calc document area of this table.
SCCOL GetColMerge() const
SCROW GetRowMerge() const
SC_DLLPUBLIC bool IsReference(ScRange &rRef) const
bool Contains(const ScRange &) const
void push_back(const ScRange &rRange)
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
bool Move(SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ, ScRange &rErrorRange, const ScDocument &rDoc)
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
formula::FormulaToken * AddDoubleReference(const ScComplexRefData &rRef)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
tools::Long GetRight() const
tools::Long GetLeft() const
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
const ScHTMLTableId SC_HTML_GLOBAL_TABLE
Identifier of the "global table" (the entire HTML document).
sal_uInt16 ScHTMLTableId
Type for a unique identifier for each table.
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
Complex reference (a range) into the sheet.
void InitRange(const ScRange &rRange)
void SetFlag3D(bool bVal)