20 #include <com/sun/star/sheet/TableValidationVisibility.hpp>
37 #include <document.hxx>
44 #include <stlsheet.hxx>
63 using ::com::sun::star::uno::Sequence;
64 using ::std::unique_ptr;
78 if (nStrCount > nBytesAvailable)
80 SAL_WARN(
"sc.filter",
"xls claimed to have " << nStrCount <<
" strings, but only " << nBytesAvailable <<
" bytes available, truncating");
81 nStrCount = nBytesAvailable;
85 while( (nStrCount > 0) && rStrm.
IsValid() )
88 aString.
Read( rStrm );
106 void lclAppendString32( OUString& rString,
XclImpStream& rStrm, sal_uInt32 nChars,
bool b16Bit )
108 sal_uInt16 nReadChars =
ulimit_cast< sal_uInt16 >( nChars );
111 std::size_t nIgnore = nChars - nReadChars;
119 void lclAppendString32( OUString& rString,
XclImpStream& rStrm,
bool b16Bit )
121 lclAppendString32( rString, rStrm, rStrm.
ReaduInt32(), b16Bit );
135 void lclGetAbsPath( OUString& rPath, sal_uInt16 nLevel,
const SfxObjectShell* pDocShell )
137 OUStringBuffer aTmpStr;
140 aTmpStr.append(
"../" );
143 aTmpStr.append( rPath );
147 bool bWasAbs =
false;
152 rPath = aTmpStr.makeStringAndClear();
159 ScAddress aScPos( nScCol, nScRow, nScTab );
161 switch( aCell.meType )
172 if (aDisplText.isEmpty())
176 SvxURLField aUrlField( rUrl, aDisplText, SvxURLFormat::AppDefault );
191 pPattern->FillEditItemSet( &aItemSet );
227 aXclRange.maLast.mnCol &= 0xFF;
229 if ( !aString.isEmpty() )
247 ::std::unique_ptr< OUString > xLongName;
248 ::std::unique_ptr< OUString > xShortName;
249 ::std::unique_ptr< OUString > xTextMark;
253 lclIgnoreString32( rStrm );
256 lclIgnoreString32( rStrm );
265 xLongName.reset(
new OUString );
266 lclAppendString32( *xLongName, rStrm,
true );
267 lclGetAbsPath( *xLongName, 0, pDocShell );
277 xShortName.reset(
new OUString );
278 lclAppendString32( *xShortName, rStrm,
false );
287 xLongName.reset(
new OUString );
288 lclAppendString32( *xLongName, rStrm, nStrLen,
true );
289 lclGetAbsPath( *xLongName, nLevel, pDocShell );
292 lclGetAbsPath( *xShortName, nLevel, pDocShell );
298 xLongName.reset(
new OUString );
299 lclAppendString32( *xLongName, rStrm, nStrLen,
true );
301 lclGetAbsPath( *xLongName, 0, pDocShell );
305 OSL_FAIL(
"XclImpHyperlink::ReadEmbeddedData - unknown content GUID" );
312 xTextMark.reset(
new OUString );
313 lclAppendString32( *xTextMark, rStrm,
true );
318 OSL_ENSURE( rStrm.
GetRecLeft() == 0,
"XclImpHyperlink::ReadEmbeddedData - record size mismatch" );
320 if (!xLongName && xShortName)
321 xLongName = std::move(xShortName);
322 else if (!xLongName && xTextMark)
323 xLongName.reset(
new OUString );
329 if( xLongName->isEmpty() )
331 sal_Int32 nSepPos = xTextMark->lastIndexOf(
'!' );
338 if (nSepPos < xTextMark->
getLength() - 1)
344 xTextMark.reset(
new OUString( xTextMark->replaceAt( nSepPos, 1, OUString(
'.' ))));
348 xLongName.reset(
new OUString( *xLongName +
"#" + *xTextMark ) );
350 return( *xLongName );
352 return( OUString() );
357 sal_Int32
n = rUrl.getLength();
366 OUStringBuffer aNewUrl(
"#");
367 OUStringBuffer aTabName;
369 bool bInQuote =
false;
370 bool bQuoteTabName =
false;
371 for( sal_Int32
i = 1;
i < n; ++
i )
376 if (bInQuote &&
i+1 < n && rUrl[
i+1] ==
'\'')
381 bQuoteTabName =
true;
382 aTabName.append(c).append(c);
387 bInQuote = !bInQuote;
388 if (!bInQuote && !aTabName.isEmpty())
392 aNewUrl.append(aTabName);
408 rUrl = aNewUrl.makeStringAndClear();
420 SCCOL nScCol1, nScCol2;
421 SCROW nScRow1, nScRow2;
422 aScRange.
GetVars( nScCol1, nScRow1, nScTab, nScCol2, nScRow2, nScTab );
423 for(
SCCOL nScCol = nScCol1; nScCol <= nScCol2; ++nScCol )
424 for(
SCROW nScRow = nScRow1; nScRow <= nScRow2; ++nScRow )
425 lclInsertUrl( rRoot, aUrl, nScCol, nScRow, nScTab );
442 rStrm >> aRowXclRanges >> aColXclRanges;
447 xLabelRangesRef = rDoc.GetRowNameRangesRef();
448 for (
size_t i = 0, nRanges = aRowScRanges.
size();
i < nRanges; ++
i )
450 const ScRange & rScRange = aRowScRanges[
i ];
451 ScRange aDataRange( rScRange );
452 if( aDataRange.
aEnd.
Col() < rDoc.MaxCol() )
468 xLabelRangesRef = rDoc.GetColNameRangesRef();
470 for (
size_t i = 0, nRanges = aColScRanges.
size();
i < nRanges; ++
i )
472 const ScRange & rScRange = aColScRanges[
i ];
473 ScRange aDataRange( rScRange );
474 if( aDataRange.
aEnd.
Row() < rDoc.MaxRow() )
492 mnFormatIndex( nFormatIndex ),
504 OSL_ENSURE( !
mnCondCount,
"XclImpCondFormat::ReadCondfmt - already initialized" );
516 OSL_FAIL(
"XclImpCondFormat::ReadCF - CF without leading CONDFMT" );
550 "sc.filter",
"unknown CF comparison " << nOperator);
560 SAL_INFO(
"sc.filter",
"unknown CF mode " << nType);
577 sal_uInt16 nFormat = rNumFmtBuffer.
ReadCFFormat( rStrm, bIFmt );
594 sal_uInt16 nAlign(0);
595 sal_uInt16 nAlignMisc(0);
607 sal_uInt16 nLineStyle(0);
608 sal_uInt32 nLineColor(0);
614 aBorder.
FillFromCF8( nLineStyle, nLineColor, nFlags );
622 sal_uInt16 nPattern(0), nColor(0);
633 sal_uInt16 nCellProt;
645 ::std::unique_ptr< ScTokenArray > xTokArr1;
648 std::unique_ptr<ScTokenArray> pTokArr;
649 rFmlaConv.
Reset( rPos );
654 xTokArr1 = std::move( pTokArr );
659 ::std::unique_ptr< ScTokenArray > xTokArr2;
662 std::unique_ptr<ScTokenArray> pTokArr;
663 rFmlaConv.
Reset( rPos );
668 xTokArr2 = std::move( pTokArr );
712 maCondFmtList.push_back( std::unique_ptr<XclImpCondFormat>(pFmt) );
717 OSL_ENSURE( !
maCondFmtList.empty(),
"XclImpCondFormatManager::ReadCF - CF without leading CONDFMT" );
726 maCondFmtList.clear();
732 maRanges(rRanges), maValidData(rValidData) {}
744 sal_uInt32 nObjId(0);
749 OSL_ENSURE( nObjId <= 0xFFFF,
"XclImpValidation::ReadDval - invalid object ID" );
784 ::std::unique_ptr< ScTokenArray > xTokArr1;
791 rStrm.
Ignore(nLenFormula1);
794 ::std::unique_ptr< ScTokenArray > xTokArr2;
800 rStrm.
Ignore(nLenFormula2);
811 if ( aScRanges.
empty() )
819 if( nLenFormula1 > 0 )
821 std::unique_ptr<ScTokenArray> pTokArr;
826 xTokArr1 = std::move( pTokArr );
829 if (nLenFormula2 > 0)
832 std::unique_ptr<ScTokenArray> pTokArr;
837 xTokArr2 = std::move( pTokArr );
842 bool bIsValid =
true;
855 default: bIsValid =
false;
870 default: bIsValid =
false;
894 std::make_unique<DVItem>(aScRanges,
ScValidationData(eValMode, eCondMode, xTokArr1.get(), xTokArr2.get(), rDoc, rScRange.
aStart)));
901 if( !aPromptTitle.isEmpty() || !aPromptMessage.isEmpty() )
927 DVItem& rItem = *rxDVItem;
934 for (
size_t i = 0, nRanges = rItem.
maRanges.
size();
i < nRanges; ++
i )
947 maDestRange( rDestRange ),
956 sal_uInt16
nType = ::extract_value< sal_uInt16 >( nFlags, 0, 3 );
997 const OUString aQuotedPairs(
"\"\"" );
999 for ( sal_Int32 nStringIx {aTables.isEmpty() ? -1 : 0}; nStringIx>=0; )
1008 if( !aToken.isEmpty() )
1021 maURL, &rFilterName, &maTables );
1038 aXclName = aXclName.replaceAll(
" ",
"_" );
1046 if( pRangeData->IsReference( aRange ) )
1060 maWQList.back().ReadParamqry( rStrm );
1066 maWQList.back().ReadWqstring( rStrm );
1072 maWQList.back().ReadWqsettings( rStrm );
1078 maWQList.back().ReadWqtables( rStrm );
1095 OSL_ENSURE( rStrm.
GetRecLeft() == 4,
"lclReadFilepass5 - wrong record size" );
1098 sal_uInt16 nKey(0), nHash(0);
1101 xDecr = std::make_shared<XclImpBiff5Decrypter>( nKey, nHash );
1109 OSL_ENSURE( rStrm.
GetRecLeft() == 48,
"lclReadFilepass8 - wrong record size" );
1112 std::vector<sal_uInt8> aSalt(16);
1113 std::vector<sal_uInt8> aVerifier(16);
1114 std::vector<sal_uInt8> aVerifierHash(16);
1115 rStrm.
Read(aSalt.data(), 16);
1116 rStrm.
Read(aVerifier.data(), 16);
1117 rStrm.
Read(aVerifierHash.data(), 16);
1118 xDecr = std::make_shared<XclImpBiff8StdDecrypter>(aSalt, aVerifier, aVerifierHash);
1135 sal_uInt32 nHeaderSize = rStream.
ReaduInt32();
1136 sal_uInt32 actualHeaderSize =
sizeof(info.
header);
1138 if( nHeaderSize < actualHeaderSize )
1150 rStream.
Ignore(nHeaderSize - actualHeaderSize);
1177 xDecr = std::make_shared<XclImpBiff8CryptoAPIDecrypter>(
1196 xDecr = lclReadFilepass5( rStrm );
1206 xDecr = lclReadFilepass8_Standard(rStrm);
1213 xDecr = lclReadFilepass8_Strong(rStrm);
1216 OSL_FAIL(
"lclReadFilepass8 - unknown BIFF8 encryption sub mode");
1221 OSL_FAIL(
"lclReadFilepass8 - unknown encryption mode" );
1240 case EXC_BIFF5: xDecr = lclReadFilepass5( rStrm );
break;
1241 case EXC_BIFF8: xDecr = lclReadFilepass8( rStrm );
break;
1261 mbDocProtect(false),
1290 pProtect->setProtected(
true);
1310 mnPasswordHash(0x0000),
1316 mbProtected(r.mbProtected),
1317 mnPasswordHash(r.mnPasswordHash),
1318 mnOptions(r.mnOptions)
1343 sal_Int32 nFlagSize = rStrm.
ReadInt32();
1344 if (nFlagSize != -1)
1375 if (!rSheet.mbProtected)
1380 pProtect->setProtected(
true);
1383 const sal_uInt16 nHash = rSheet.mnPasswordHash;
1391 const sal_uInt16 nOptions = rSheet.mnOptions;
1409 pProtect->setEnhancedProtection( rSheet.maEnhancedProtections);
1428 return &itr->second;
XclImpWebQueryBuffer(const XclImpRoot &rRoot)
const sal_uInt32 EXC_DV_COND_NOTBETWEEN
SC_DLLPUBLIC ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
sal_uInt8 encryptedVerifierHash[comphelper::SHA1_HASH_LENGTH]
void ReadDV(XclImpStream &rStrm)
Reads a DV record and inserts validation data into the document.
const sal_uInt16 EXC_WQSETT_SPECTABLES
All tables or entire document.
const sal_uInt32 EXC_DV_MODE_DECIMAL
void SetNulSubstChar(sal_Unicode cNulSubst= '?')
Sets a replacement character for NUL characters.
void ReadParamqry(XclImpStream &rStrm)
Reads a PARAMQRY record and sets data to the web query.
const sal_uInt32 EXC_DVAL_NOOBJ
const sal_uInt32 ENCRYPTINFO_CRYPTOAPI
sal_uInt16 mnPasswordHash
ScDocumentImport & GetDocImport()
void FillFromCF(sal_uInt16 nAlign, sal_uInt16 nMiscAttrib)
Fills this struct with CF record data.
const sal_uInt8 EXC_CF_CMP_LESS
const sal_uInt32 EXC_DV_COND_EQGREATER
const sal_uInt32 EXC_DV_COND_GREATER
void ReadWqstring(XclImpStream &rStrm)
Reads a WQSTRING record and sets URL.
void ReadCFFontBlock(XclImpStream &rStrm)
Reads the font block from a CF (conditional format) record.
XclImpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
void ReadProtect(XclImpStream &rStrm, SCTAB nTab)
void ReadQsi(XclImpStream &rStrm)
Reads the QSI record and creates a new web query in the buffer.
Stores all data of an Excel font and provides import of FONT records.
Extends the XclCellBorder struct for import.
EncryptionVerifierRC4 verifier
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
const sal_uInt32 EXC_HLINK_BODY
const SfxItemSet & GetEmptyItemSet() const
const sal_uInt32 ENCRYPTINFO_AES
void SetDecrypter(XclImpDecrypterRef const &xDecrypter)
Enables decryption of record contents for the rest of the stream.
sheet protection state container
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
const sal_uInt32 EXC_HLINK_ABS
Contains file link or URL.
void FillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
Inserts items representing this protection style into the item set.
XclImpWebQueryMode meMode
Destination range.
const sal_uInt8 EXC_CF_CMP_EQUAL
const sal_uInt32 VERSION_INFO_2007_FORMAT
const sal_uInt32 EXC_DV_MODE_TIME
bool IsValid() const
Returns record reading state: false = record overread.
OUString maTables
Source document URL.
std::size_t Read(void *pData, std::size_t nBytes)
Reads nBytes bytes to the existing(!) buffer pData.
XclImpXFRangeBuffer & GetXFRangeBuffer() const
Returns the buffer of XF index ranges for a sheet.
void Read(XclImpStream &rStrm, XclStrFlags nFlags=XclStrFlags::NONE)
Reads a complete string from the passed stream.
void ConvertRangeList(ScRangeList &rScRanges, const XclRangeList &rXclRanges, SCTAB nScTab, bool bWarn)
Converts the passed Excel cell range list to a Calc cell range list.
std::vector< std::unique_ptr< DVItem > > maDVItems
const SfxItemSet & GetItemSet() const
const sal_uInt8 EXC_CF_CMP_BETWEEN
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
const sal_uInt32 EXC_DV_SHOWERROR
sal_uInt8 salt[SALT_LENGTH]
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
const sal_uInt32 EXC_DV_STRINGLIST
Extends the XclCellArea struct for import.
const sal_uInt32 EXC_DV_COND_NOTEQUAL
void TraceDVType(bool bType)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
const sal_uInt8 EXC_CF_CMP_LESS_EQUAL
void Append(const ScRangePair &rRangePair)
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
const sal_uInt32 EXC_DV_COND_LESS
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Accessor class to ScDocument.
const sal_uInt32 EXC_DV_COND_EQLESS
void FillToItemSet(SfxItemSet &rItemSet, XclFontItemType eType, bool bSkipPoolDefs=false) const
Fills all font properties to the item set.
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
const XclImpString * GetString(sal_uInt32 nSstIndex) const
Returns a pointer to the string with the passed index.
const sal_uInt32 VERSION_INFO_1997_FORMAT
const sal_uInt32 ENCRYPT_ALGO_RC4
void setEditCell(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
const sal_uInt32 EXC_DV_COND_BETWEEN
const sal_uInt16 EXC_PQRYTYPE_WEBQUERY
Source type: ODBC.
XclImpDocProtectBuffer(const XclImpRoot &rRoot)
XclImpWebQueryList maWQList
SC_DLLPUBLIC ScDocumentPool * GetPool()
void SetListType(sal_Int16 nListType)
Provides functions to convert Excel cell addresses to Calc cell addresses.
const sal_uInt32 EXC_DV_MODE_DATE
void ReadWinProtect(XclImpStream &rStrm)
document windows properties protection flag
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
static SC_DLLPUBLIC void EraseQuotes(OUString &rString, sal_Unicode cQuote, bool bUnescapeEmbedded=true)
Erases the character cQuote from rString, if it exists at beginning AND end.
const sal_uInt32 EXC_DV_MODE_CUSTOM
XclImpPalette & GetPalette() const
Returns the color buffer.
DVItem(const ScRangeList &rRanges, const ScValidationData &rValidData)
XclImpSheetProtectBuffer(const XclImpRoot &rRoot)
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a box item representing this border style into the item set.
ScStyleSheetPool & GetStyleSheetPool() const
Returns the style sheet pool of the Calc document.
const sal_uInt8 EXC_CF_TYPE_CELL
void ReadWqtables(XclImpStream &rStrm)
Reads a WEBQRYTABLES record and sets source range list.
void StorePosition(XclImpStreamPos &rPos)
Stores current stream position into rPos.
void SetHyperlink(const XclRange &rXclRange, const OUString &rUrl)
Inserts a range of hyperlink cells.
XclImpSst(const XclImpRoot &rRoot)
ExcelToSc & GetOldFmlaConverter() const
Returns the old formula converter.
void SetInput(const OUString &rTitle, const OUString &rMsg)
Extends the XclCellProt struct for import.
const sal_uInt32 EXC_CF_BLOCK_AREA
Border block present?
EncryptionStandardHeader header
sal_uInt16 ReadCFFormat(XclImpStream &rStrm, bool bIFmt)
Read NumFmt from conditional format record.
void ReadWqtables(XclImpStream &rStrm)
Reads a WEBQRYTABLES record and sets source range list to the current web query.
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void ReadWqsettings(XclImpStream &rStrm)
Reads a WEBQRYSETTINGS record and sets refresh rate to the current web query.
bool getFlag(Type nBitField, Type nMask)
const sal_uInt16 EXC_FILEPASS_BIFF5
Sheet * GetSheetItem(SCTAB nTab)
const sal_uInt16 EXC_PQRY_WEBQUERY
ODBC connection.
Extends the XclCellAlign struct for import.
void DisableDecryption()
Switches usage of current decryption algorithm off.
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, const OUString &rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
sal_uInt32 encryptedVerifierHashSize
#define SAL_N_ELEMENTS(arr)
const sal_uInt32 EXC_DV_MODE_LIST
const sal_uInt32 EXC_CF_BLOCK_BORDER
Alignment block present?
const sal_uInt32 SALT_LENGTH
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
const sal_uInt32 ENCRYPTINFO_EXTERNAL
const sal_uInt32 EXC_CF_BLOCK_PROTECTION
Pattern block present?
void ReadPasswordHash(XclImpStream &rStrm)
const sal_uInt32 ENCRYPT_HASH_SHA1
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a brush item representing this area style into the item set.
static const ErrCode & ReadFilepass(XclImpStream &rStrm)
Reads the FILEPASS record, queries a password and sets decryption algorithm.
void FillFromCF8(sal_uInt16 nLineStyle, sal_uInt32 nLineColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
MS Excel 5.0, MS Excel 7.0 (95)
const sal_uInt8 EXC_CF_CMP_GREATER_EQUAL
OUString ReadRawUniString(sal_uInt16 nChars, bool b16Bit)
Reads nChars characters and returns the string.
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
XclImpStringVec maStrings
const sal_uInt16 EXC_PQRY_TABLES
Web query.
ScValidationData maValidData
void FillToItemSet(SfxItemSet &rItemSet, const XclImpFont *pFont, bool bSkipPoolDefs=false) const
Inserts items representing this alignment style into the item set.
std::shared_ptr< XclImpDecrypter > XclImpDecrypterRef
const sal_uInt32 EXC_DV_ERROR_WARNING
const sal_uInt32 EXC_CF_BLOCK_NUMFMT
Default flags.
XclImpValidationManager(const XclImpRoot &rRoot)
ProtectedSheetMap maProtectedSheets
const sal_uInt32 EXC_DV_MODE_TEXTLEN
const sal_uInt32 EXC_CF_BLOCK_FONT
Font block present?
XclImpAddressConverter & GetAddressConverter() const
Returns the address converter.
const sal_uInt32 EXC_CF_IFMT_USER
Protection block present?
A 2D cell range address list with Excel column and row indexes.
std::unique_ptr< EditTextObject > CreateTextObject()
void ReadSst(XclImpStream &rStrm)
Reads the entire SST record.
Stores all user defined number formats occurred in the file.
sal_uInt16 mnRefresh
Current mode of the web query.
const sal_uInt32 EXC_HLINK_MARK
Description.
const sal_uInt32 EXC_DV_IGNOREBLANK
void SetSkipObj(sal_uInt16 nObjId)
Sets the object with the passed identification to be skipped on import.
css::uno::Sequence< css::beans::NamedValue > RequestEncryptionData(::comphelper::IDocPasswordVerifier &rVerifier) const
Requests and verifies a password from the medium or the user.
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
static void ReadDval(XclImpStream &rStrm)
Reads a DVAL record and sets marks the dropdown arrow control to be ignored.
void SetIgnoreBlank(bool bSet)
Container for the Excel EnhancedProtection feature.
void ReadWqstring(XclImpStream &rStrm)
Reads a WQSTRING record and sets URL to the current web query.
const sal_uInt8 EXC_CF_TYPE_FMLA
void GetVars(SCCOL &nCol1, SCROW &nRow1, SCTAB &nTab1, SCCOL &nCol2, SCROW &nRow2, SCTAB &nTab2) const
const sal_uInt32 EXC_DV_COND_MASK
XclImpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
const sal_uInt8 EXC_CF_CMP_GREATER
static void ReadHlink(XclImpStream &rStrm)
Reads a HLINK record and inserts it into the document.
static void ConvertToValidTabName(OUString &rName)
Convert the sheet name with invalid character(s) in URL when the URL is to a location within the same...
void ReadDocProtect(XclImpStream &rStrm)
document structure protection flag
void EnableDecryption(bool bEnable=true)
Switches usage of current decryption algorithm on/off.
const sal_uInt16 EXC_FILEPASS_BIFF8
XclImpWebQuery(const ScRange &rDestRange)
::std::vector< ScEnhancedProtection > maEnhancedProtections
XclTracer & GetTracer() const
Returns the filter tracer.
virtual ConvErr Convert(std::unique_ptr< ScTokenArray > &, XclImpStream &rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT=FT_CellFormula) override
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
const sal_uInt32 EXC_DV_SUPPRESSDROPDOWN
ScRange maDestRange
List of source range names.
void FillToItemSet(SfxItemSet &rItemSet, sal_uInt16 nXclNumFmt, bool bSkipPoolDefs=false) const
Fills an Excel number format to the passed item set.
XclImpSheetDrawing & GetCurrSheetDrawing() const
Returns the drawing container of the current sheet.
const sal_uInt32 EXC_DV_COND_EQUAL
const XclImpRoot & GetRoot() const
Returns the filter root data.
const sal_uInt32 EXC_HLINK_FRAME
Text mark.
std::size_t GetRecLeft()
Returns remaining data size of the whole record without record headers.
SC_DLLPUBLIC sal_uLong AddValidationEntry(const ScValidationData &rNew)
This struct stores a GUID (class ID) and supports reading, writing and comparison.
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
OUString ReadUniString(sal_uInt16 nChars, sal_uInt8 nFlags)
Reads ext.
void ReadPasswordHash(XclImpStream &rStrm, SCTAB nTab)
ScEditEngineDefaulter & GetEditEngine() const
Returns the edit engine for import/export of rich strings etc.
const sal_uInt32 EXC_DV_ERROR_MASK
sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH]
void AppendEnhancedProtection(const ScEnhancedProtection &rProt, SCTAB nTab)
void FillFromCF8(sal_uInt16 nPattern, sal_uInt16 nColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
void Join(const ScRange &, bool bIsInList=false)
void Ignore(std::size_t nBytes)
Seeks forward inside the current record.
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.
#define SAL_INFO(area, stream)
void SetError(const OUString &rTitle, const OUString &rMsg, ScValidErrorStyle eStyle)
static OUString SC_DLLPUBLIC GetQuotedToken(const OUString &rIn, sal_Int32 nToken, const OUString &rQuotedPairs, sal_Unicode cTok, sal_Int32 &rIndex)
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
void ReadWqsettings(XclImpStream &rStrm)
Reads a WEBQRYSETTINGS record and sets refresh rate.
This class represents an Excel stream position.
const INetURLObject & GetURLObject() const
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
const sal_uInt8 EXC_CF_CMP_NOT_BETWEEN
double getLength(const B2DPolygon &rCandidate)
bool ConvertRange(ScRange &rScRange, const XclRange &rXclRange, SCTAB nScTab1, SCTAB nScTab2, bool bWarn)
Converts the passed Excel cell range to a Calc cell range.
static bool isAsciiNumeric(const OUString &rStr)
const sal_uInt8 EXC_CF_CMP_NOT_EQUAL
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
Stores the default colors for the current BIFF version and the contents of a PALETTE record...
void Apply(ScDocument &rDoc, const OUString &rFilterName)
Inserts the web query into the document.
ScInterpreterContext & GetNonThreadedContext() const
static void ConvertStringToList(ScTokenArray &rScTokArr, svl::SharedStringPool &rSPool, sal_Unicode cStringSep)
Tries to convert a formula that consists of a single string token to a list of strings.
const sal_uInt32 VERSION_INFO_2007_FORMAT_SP2
const sal_uInt32 EXC_DV_MODE_MASK
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC void SetDocProtection(const ScDocProtection *pProtect)
#define SAL_WARN(area, stream)
#define EXC_WEBQRY_FILTER
UNC path.
SfxObjectShell * GetDocShell() const
Returns the object shell of the Calc document.
This class is used to import record oriented streams.
const sal_uInt32 EXC_DV_MODE_ANY
const sal_uInt32 EXC_HLINK_DESCR
Absolute path.
static void InsertUrl(XclImpRoot &rRoot, const XclRange &rXclRange, const OUString &rUrl)
Inserts the URL into a range of cells.
INetURLObject smartRel2Abs(OUString const &rTheRelURIRef, bool &rWasAbsolute, bool bIgnoreFragment=false, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs=false, FSysStyle eStyle=FSysStyle::Detect) const
const ErrCode EXC_ENCR_ERROR_UNSUPP_CRYPT
const sal_uInt32 EXC_HLINK_UNC
Target frame.
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
const sal_uInt32 EXC_DV_ERROR_INFO
Access to global data from other classes.
This class represents an unformatted or formatted string and provides importing from stream...
void Apply()
Inserts all web queries into the document.
const sal_uInt32 EXC_CF_BLOCK_ALIGNMENT
Font block present?
Represents a defined name.
void ReadParamqry(XclImpStream &rStrm)
Reads a PARAMQRY record and sets data to the current web query.
void ReadOptions(XclImpStream &rStrm, SCTAB nTab)
void FillFromXF3(sal_uInt16 nProt)
Fills this struct with BIFF3-BIFF8 XF record data.
static OUString ReadEmbeddedData(XclImpStream &rStrm)
Reads the (undocumented) embedded hyperlink data and returns the URL.
const sal_uInt32 EXC_DV_MODE_WHOLE
void RestorePosition(const XclImpStreamPos &rPos)
Restores stream position contained in rPos.
A 2D cell range address struct with Excel column and row indexes.
const sal_uInt32 EXC_DV_SHOWPROMPT
SC_DLLPUBLIC void AddCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
static void ReadLabelranges(XclImpStream &rStrm)
Reads a LABELRANGES record and inserts the label ranges into the document.
SfxMedium * GetMedium() const