21 #include <osl/diagnose.h>
35 #include <document.hxx>
37 #include <stlpool.hxx>
38 #include <stlsheet.hxx>
43 #include <tokenarray.hxx>
49 ScHTMLImport aImp( pDoc, rBaseURL, rRange, bCalcWidthHeight );
59 return std::make_unique<ScHTMLImport>( pDocP, rBaseURL, rRange,
true );
69 GetStyleSheetPool()->Find( aPageStyle, SfxStyleFamily::Page ));
82 OSL_FAIL(
"PageSize Null ?!?!?");
85 aPageSize.
AdjustWidth( -(nLeftMargin + nRightMargin) );
91 OSL_FAIL(
"no StyleSheet?!?");
95 if( bCalcWidthHeight )
114 bool bSizeColsRows,
double nOutputFactor,
SvNumberFormatter* pFormatter,
bool bConvertDate )
145 aNewItem.
SetLine( pFromItem->
GetLine( SvxBoxItemLine::RIGHT ), SvxBoxItemLine::RIGHT );
151 aNewItem.
SetLine( pFromItem->
GetLine( SvxBoxItemLine::BOTTOM ), SvxBoxItemLine::BOTTOM );
176 while( (pTable = pGlobTable->
FindNestedTable( ++nTableId )) !=
nullptr )
179 if (!aNewRange.
Move( nColDiff, nRowDiff, nTabDiff, aErrorRange ))
202 if (rOrigName.isEmpty())
208 sal_Int32 nStringIx = 0;
211 OUString aToken( rOrigName.getToken( 0,
';', nStringIx ) );
222 if( pRangeData->
IsReference( aRange ) && !aRangeList.
In( aRange ) )
tools::Long const nBottomMargin
formula::FormulaToken * AddDoubleReference(const ScComplexRefData &rRef)
SCCOL GetColMerge() const
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
sal_uInt16 GetLower() const
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
tools::Long const nLeftMargin
tools::Long GetRight() const
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
static OUString GetHTMLRangeNameList(const ScDocument &rDoc, const OUString &rOrigName)
SC_DLLPUBLIC bool Move(SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ, ScRange &rErrorRange, const ScDocument *pDocument=nullptr)
SCCOLROW GetDocSize(ScHTMLOrient eOrient, SCCOLROW nCellPos) const
Returns the resulting document row/column count of the specified HTML row/column. ...
std::unique_ptr< ScTabEditEngine > mpEngine
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
static OutputDevice * GetDefaultDevice()
sal_uInt16 ScHTMLTableId
Type for a unique identifier for each table.
virtual const ScHTMLTable * GetGlobalTable() const =0
Returns the "global table" which contains the entire HTML document.
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool In(const ScRange &) const
void push_back(const ScRange &rRange)
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
static void InsertRangeName(ScDocument &rDoc, const OUString &rName, const ScRange &rRange)
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
void IncCol(SCCOL nDelta=1)
void SetFlag3D(bool bVal)
tools::Long GetLeft() const
std::unique_ptr< ScEEParser > mpParser
tools::Long Width() const
void IncRow(SCROW nDelta=1)
The HTML parser for data queries.
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
const ScHTMLTableId SC_HTML_GLOBAL_TABLE
Identifier of the "global table" (the entire HTML document).
void GetDocRange(ScRange &rRange) const
Calculates the current Calc document area of this table.
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
Point LogicToPixel(const Point &rLogicPt) const
tools::Long const nTopMargin
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SC_DLLPUBLIC OUString addToken(const OUString &rTokenList, const OUString &rToken, sal_Unicode cSep, sal_Int32 nSepCount=1, bool bForceSep=false)
Adds the string rToken to rTokenList, using a list separator character.
ScHTMLTable * FindNestedTable(ScHTMLTableId nTableId) const
Searches in all nested tables for the specified table.
tools::Long AdjustWidth(tools::Long n)
void InitRange(const ScRange &rRange)
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
tools::Long Height() const
Base class for HTML parser classes.
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
virtual void WriteToDocument(bool bSizeColsRows=false, double nOutputFactor=1.0, SvNumberFormatter *pFormatter=nullptr, bool bConvertDate=true) override
tools::Long const nRightMargin
virtual void WriteToDocument(bool bSizeColsRows=false, double nOutputFactor=1.0, SvNumberFormatter *pFormatter=nullptr, bool bConvertDate=true) override
const OUString & GetTableName() const
Returns the name of the table, specified in the TABLE tag.
ScHTMLImport(ScDocument *pDoc, const OUString &rBaseURL, const ScRange &rRange, bool bCalcWidthHeight)
tools::Long AdjustHeight(tools::Long n)
SC_DLLPUBLIC bool IsReference(ScRange &rRef) const
Complex reference (a range) into the sheet.
Stores data for one table in an HTML document.
SCROW GetRowMerge() const
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
virtual ErrCode Read(SvStream &rStream, const OUString &rBaseURL) override
virtual ScRange GetRange() override
sal_uInt16 GetUpper() const
void ApplyCellBorders(ScDocument *pDoc, const ScAddress &rFirstPos) const
Applies border formatting to the passed document.
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
ScEEParseEntry * ListEntry(size_t index)