22#include <osl/mutex.hxx>
25#include <document.hxx>
35#include <config_fuzzers.h>
43 , aConv(rContext, *pIn, rContext.rDoc.GetSharedStringPool(), eQ, false)
59 sal_uInt16 nFileCode, nFileSub, nSaveCnt;
75 if( nFileSub == 0x0004 )
77 if( nFileCode == 0x1000 )
81 else if( nFileCode == 0x1002 )
90 sal_uInt16 nFileCode(0), nFileSub(0);
95 return ( nFileCode == 0x8007 && ( nFileSub == 0x0000 || nFileSub == 0x00001 ) );
100 SAL_WARN_IF( nRecLen < 4,
"sc.filter",
"*ImportLotus::Columnwidth(): Record too short!" );
102 sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
132 SAL_WARN_IF( nRecLen < 4,
"sc.filter",
"*ImportLotus::Hiddencolumn(): Record too short!" );
134 sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
159 sal_uInt16 nRangeType;
172 SAL_WARN(
"sc.filter",
"invalid range");
188 SAL_WARN(
"sc.filter",
"invalid address");
207 SAL_WARN(
"sc.filter",
"invalid address");
230 SAL_WARN(
"sc.filter",
"invalid address");
251 SAL_WARN(
"sc.filter",
"invalid address");
270 SAL_WARN(
"sc.filter",
"invalid address");
281 SAL_WARN_IF( !
pIn,
"sc.filter",
"-ImportLotus::Formulacell(): Null-Stream!" );
288 n -= std::min<sal_uInt16>(
n, 14);
290 std::unique_ptr<ScTokenArray> pErg;
301 SAL_WARN(
"sc.filter",
"invalid address");
319 SAL_WARN_IF( nRecLen < 5,
"sc.filter",
"*ImportLotus::RowPresentation(): Record too short!" );
321 sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 8;
331 sal_uInt16 nHeight(0);
355 sal_uInt16 nTmpTab(0);
415 sal_uInt16 nCntDwn = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 5;
420 bool bCenter =
false;
421 SCCOL nCenterStart = 0, nCenterEnd = 0;
424 sal_uInt16 nTmpRow(0);
427 sal_uInt16 nHeight(0);
445 rContext, nColCnt,
static_cast<SCCOL> ( nColCnt + nRepeats ), nRow, aAttr );
457 rD.
DoMerge( nCenterStart, nRow, nCenterEnd, nRow, nDestTab);
458 nCenterStart = nColCnt;
465 nCenterStart = nColCnt;
467 nCenterEnd = nColCnt +
static_cast<SCCOL>(nRepeats);
474 rD.
DoMerge( nCenterStart, nRow, nCenterEnd, nRow, nDestTab );
479 nColCnt = nColCnt +
static_cast<SCCOL>(nRepeats);
487 rD.
DoMerge( nCenterStart, nRow, nCenterEnd, nRow, nDestTab );
SCTAB SanitizeTab(SCTAB nTab)
void Formulacell(sal_uInt16 nRecLen)
void Hiddencolumn(sal_uInt16 nRecLen)
virtual ~ImportLotus() override
void Columnwidth(sal_uInt16 nRecLen)
void Row_(const sal_uInt16 nRecLen)
ImportLotus(LotusContext &rContext, SvStream &, rtl_TextEncoding eSrc)
void RowPresentation(sal_uInt16 nRecLen)
void Skip(const sal_uInt16 nNumBytes)
rtl_TextEncoding eQuellChar
void SetAttr(const LotusContext &rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3 &)
void SetHeight(const sal_uInt16 nIndex, const sal_uInt16 nHeight)
static const sal_uInt16 nSize
void SetType(const sal_uInt16 nIndex, const sal_uInt16 nType)
void SetName(const sal_uInt16 nIndex, const OUString &rName)
virtual void Convert(std::unique_ptr< ScTokenArray > &rpErg, sal_Int32 &nRest) override
LotusContext & getContext()
void Reset(const ScAddress &rEingPos)
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
SCROW SanitizeRow(SCROW nRow) const
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
bool ValidAddress(const ScAddress &rAddress) const
SC_DLLPUBLIC void DoMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bDeleteCaptions=true)
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
SC_DLLPUBLIC bool HasData(SCCOL nCol, SCROW nRow, SCTAB nTab)
SC_DLLPUBLIC CRFlags GetRowFlags(SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
SC_DLLPUBLIC void SetRowFlags(SCROW nRow, SCTAB nTab, CRFlags nNewFlags)
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
std::size_t ReadBytes(void *pData, std::size_t nSize)
constexpr auto TWIPS_PER_CHAR
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
static osl::Mutex aLotImpSemaphore
LotusFontBuffer maFontBuff
std::unique_ptr< RangeNameBufferWK3 > pRngNmBffWK3
Store parameters used in the ScDocument::SetString() method.
void setTextInput()
Call this whenever you need to unconditionally set input as text, no matter what the input is.
std::unique_ptr< char[]> aBuffer