20#include <com/sun/star/sheet/TableValidationVisibility.hpp>
39#include <document.hxx>
46#include <stlsheet.hxx>
64using ::com::sun::star::uno::Sequence;
65using ::std::unique_ptr;
77 sal_uInt32 nStrCount =
rStrm.ReaduInt32();
78 auto nBytesAvailable =
rStrm.GetRecLeft();
79 if (nStrCount > nBytesAvailable)
81 SAL_WARN(
"sc.filter",
"xls claimed to have " << nStrCount <<
" strings, but only " << nBytesAvailable <<
" bytes available, truncating");
82 nStrCount = nBytesAvailable;
86 while( (nStrCount > 0) &&
rStrm.IsValid() )
107void lclAppendString32( OUString& rString,
XclImpStream& rStrm, sal_uInt32 nChars,
bool b16Bit )
109 sal_uInt16 nReadChars = ulimit_cast< sal_uInt16 >( nChars );
110 rString +=
rStrm.ReadRawUniString( nReadChars, b16Bit );
112 std::size_t nIgnore = nChars - nReadChars;
115 rStrm.Ignore( nIgnore );
120void lclAppendString32( OUString& rString,
XclImpStream& rStrm,
bool b16Bit )
122 lclAppendString32( rString, rStrm,
rStrm.ReaduInt32(), b16Bit );
128 sal_uInt32 nChars =
rStrm.ReaduInt32();
130 rStrm.Ignore( nChars );
136void lclGetAbsPath( OUString& rPath, sal_uInt16 nLevel,
const SfxObjectShell* pDocShell )
138 OUStringBuffer aTmpStr;
141 aTmpStr.append(
"../" );
144 aTmpStr.append( rPath );
148 bool bWasAbs =
false;
153 rPath = aTmpStr.makeStringAndClear();
160 ScAddress aScPos( nScCol, nScRow, nScTab );
162 switch( aCell.getType() )
172 if (aDisplText.isEmpty())
176 SvxURLField aUrlField( rUrl, aDisplText, SvxURLFormat::AppDefault );
191 pPattern->FillEditItemSet( &aItemSet );
229 if ( !aString.isEmpty() )
230 rStrm.GetRoot().GetXFRangeBuffer().SetHyperlink( aXclRange, aString );
243 sal_uInt32 nFlags =
rStrm.ReaduInt32();
247 ::std::unique_ptr< OUString > xLongName;
248 ::std::unique_ptr< OUString > xShortName;
249 ::std::unique_ptr< OUString > xTextMark;
253 lclIgnoreString32(
rStrm );
256 lclIgnoreString32(
rStrm );
260 rStrm.SetNulSubstChar(
'\0' );
265 xLongName.reset(
new OUString );
266 lclAppendString32( *xLongName,
rStrm,
true );
267 lclGetAbsPath( *xLongName, 0, pDocShell );
276 sal_uInt16 nLevel =
rStrm.ReaduInt16();
277 xShortName.reset(
new OUString );
278 lclAppendString32( *xShortName,
rStrm,
false );
281 sal_uInt32 nStrLen =
rStrm.ReaduInt32();
284 nStrLen =
rStrm.ReaduInt32();
287 xLongName.reset(
new OUString );
288 lclAppendString32( *xLongName,
rStrm, nStrLen,
true );
289 lclGetAbsPath( *xLongName, nLevel, pDocShell );
292 lclGetAbsPath( *xShortName, nLevel, pDocShell );
296 sal_uInt32 nStrLen =
rStrm.ReaduInt32();
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 );
316 rStrm.SetNulSubstChar();
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, rtl::OUStringChar(
'.' ))));
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(OUStringChar(c) + OUStringChar(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 );
426 SCROW nRows = nScRow2 - nScRow1;
429 SAL_WARN(
"sc.filter",
"for fuzzing performance, clamped hyperlink apply range end row from " << nScRow2 <<
" to " << nScRow1 + 1024);
430 nScRow2 = nScRow1 + 1024;
434 for(
SCCOL nScCol = nScCol1; nScCol <= nScCol2; ++nScCol )
435 for(
SCROW nScRow = nScRow1; nScRow <= nScRow2; ++nScRow )
436 lclInsertUrl( rRoot, aUrl, nScCol, nScRow, nScTab );
453 rStrm >> aRowXclRanges >> aColXclRanges;
459 for (
size_t i = 0, nRanges = aRowScRanges.
size();
i < nRanges; ++
i )
461 const ScRange & rScRange = aRowScRanges[
i ];
462 ScRange aDataRange( rScRange );
473 xLabelRangesRef->Append(
ScRangePair( rScRange, aDataRange ) );
481 for (
size_t i = 0, nRanges = aColScRanges.
size();
i < nRanges; ++
i )
483 const ScRange & rScRange = aColScRanges[
i ];
484 ScRange aDataRange( rScRange );
495 xLabelRangesRef->Append(
ScRangePair( rScRange, aDataRange ) );
503 mnFormatIndex( nFormatIndex ),
515 OSL_ENSURE( !
mnCondCount,
"XclImpCondFormat::ReadCondfmt - already initialized" );
527 OSL_FAIL(
"XclImpCondFormat::ReadCF - CF without leading CONDFMT" );
537 sal_uInt16 nFmlaSize1 =
rStrm.ReaduInt16();
538 sal_uInt16 nFmlaSize2 =
rStrm.ReaduInt16();
539 sal_uInt32 nFlags =
rStrm.ReaduInt32();
561 "sc.filter",
"unknown CF comparison " << nOperator);
605 sal_uInt16 nAlign(0);
606 sal_uInt16 nAlignMisc(0);
607 nAlign =
rStrm.ReaduInt16();
608 nAlignMisc =
rStrm.ReaduInt16();
618 sal_uInt16 nLineStyle(0);
619 sal_uInt32 nLineColor(0);
620 nLineStyle =
rStrm.ReaduInt16();
621 nLineColor =
rStrm.ReaduInt32();
625 aBorder.
FillFromCF8( nLineStyle, nLineColor, nFlags );
633 sal_uInt16 nPattern(0), nColor(0);
634 nPattern =
rStrm.ReaduInt16();
635 nColor =
rStrm.ReaduInt16();
644 sal_uInt16 nCellProt;
645 nCellProt =
rStrm.ReaduInt16();
656 ::std::unique_ptr< ScTokenArray > xTokArr1;
659 std::unique_ptr<ScTokenArray> pTokArr;
660 rFmlaConv.
Reset( rPos );
665 xTokArr1 = std::move( pTokArr );
670 ::std::unique_ptr< ScTokenArray > xTokArr2;
673 std::unique_ptr<ScTokenArray> pTokArr;
674 rFmlaConv.
Reset( rPos );
679 xTokArr2 = std::move( pTokArr );
723 maCondFmtList.push_back( std::unique_ptr<XclImpCondFormat>(pFmt) );
728 OSL_ENSURE( !
maCondFmtList.empty(),
"XclImpCondFormatManager::ReadCF - CF without leading CONDFMT" );
743 maRanges(
std::move(aRanges)), maValidData(rValidData) {}
755 sal_uInt32 nObjId(0);
757 nObjId =
rStrm.ReaduInt32();
760 OSL_ENSURE( nObjId <= 0xFFFF,
"XclImpValidation::ReadDval - invalid object ID" );
775 sal_uInt32 nFlags =
rStrm.ReaduInt32();
780 rStrm.SetNulSubstChar(
'\0' );
781 OUString aPromptTitle(
rStrm.ReadUniString() );
782 OUString aErrorTitle(
rStrm.ReadUniString() );
783 OUString aPromptMessage(
rStrm.ReadUniString() );
784 OUString aErrorMessage(
rStrm.ReadUniString() );
785 rStrm.SetNulSubstChar();
788 if (
rStrm.GetRecLeft() <= 8 )
794 rStrm.SetNulSubstChar(
'\n' );
795 ::std::unique_ptr< ScTokenArray > xTokArr1;
798 sal_uInt16 nLenFormula1 =
rStrm.ReaduInt16();
801 rStrm.StorePosition(aPosFormula1);
802 rStrm.Ignore(nLenFormula1);
805 ::std::unique_ptr< ScTokenArray > xTokArr2;
807 sal_uInt16 nLenFormula2 =
rStrm.ReaduInt16();
810 rStrm.StorePosition(aPosFormula2);
811 rStrm.Ignore(nLenFormula2);
822 if ( aScRanges.
empty() )
828 rStrm.StorePosition(aCurrentPos);
829 rStrm.RestorePosition(aPosFormula1);
830 if( nLenFormula1 > 0 )
832 std::unique_ptr<ScTokenArray> pTokArr;
837 xTokArr1 = std::move( pTokArr );
839 rStrm.SetNulSubstChar();
840 if (nLenFormula2 > 0)
842 rStrm.RestorePosition(aPosFormula2);
843 std::unique_ptr<ScTokenArray> pTokArr;
848 xTokArr2 = std::move( pTokArr );
851 rStrm.RestorePosition(aCurrentPos);
853 bool bIsValid =
true;
866 default: bIsValid =
false;
881 default: bIsValid =
false;
905 std::make_unique<DVItem>(aScRanges,
ScValidationData(eValMode, eCondMode, xTokArr1.get(), xTokArr2.get(), rDoc, rScRange.
aStart)));
912 if( !aPromptTitle.isEmpty() || !aPromptMessage.isEmpty() )
936 size_t nPatterns = 0;
941 DVItem& rItem = *rxDVItem;
948 for (
size_t i = 0, nRanges = rItem.
maRanges.
size();
i < nRanges; ++
i, ++nPatterns )
953 if (bFuzzing && nPatterns >= 128)
955 SAL_WARN(
"sc.filter",
"for fuzzing performance, abandoned pattern after " << nPatterns <<
" insertions");
966 maDestRange( rDestRange ),
974 sal_uInt16 nFlags =
rStrm.ReaduInt16();
975 sal_uInt16
nType = ::extract_value< sal_uInt16 >( nFlags, 0, 3 );
999 sal_uInt16 nFlags =
rStrm.ReaduInt16();
1013 OUString aTables(
rStrm.ReadUniString() );
1016 static constexpr OUStringLiteral aQuotedPairs(
u"\"\"" );
1018 for ( sal_Int32 nStringIx {aTables.isEmpty() ? -1 : 0}; nStringIx>=0; )
1027 if( !aToken.isEmpty() )
1054 OUString aXclName(
rStrm.ReadUniString() );
1057 aXclName = aXclName.replaceAll(
" ",
"_" );
1065 if( pRangeData->IsReference( aRange ) )
1114 OSL_ENSURE(
rStrm.GetRecLeft() == 4,
"lclReadFilepass5 - wrong record size" );
1115 if(
rStrm.GetRecLeft() == 4 )
1117 sal_uInt16 nKey(0), nHash(0);
1118 nKey =
rStrm.ReaduInt16();
1119 nHash =
rStrm.ReaduInt16();
1120 xDecr = std::make_shared<XclImpBiff5Decrypter>( nKey, nHash );
1128 OSL_ENSURE(
rStrm.GetRecLeft() == 48,
"lclReadFilepass8 - wrong record size" );
1129 if(
rStrm.GetRecLeft() == 48 )
1131 std::vector<sal_uInt8> aSalt(16);
1132 std::vector<sal_uInt8> aVerifier(16);
1133 std::vector<sal_uInt8> aVerifierHash(16);
1134 rStrm.Read(aSalt.data(), 16);
1135 rStrm.Read(aVerifier.data(), 16);
1136 rStrm.Read(aVerifierHash.data(), 16);
1137 xDecr = std::make_shared<XclImpBiff8StdDecrypter>(std::move(aSalt), std::move(aVerifier), std::move(aVerifierHash));
1154 sal_uInt32 nHeaderSize = rStream.
ReaduInt32();
1155 sal_uInt32 actualHeaderSize =
sizeof(info.
header);
1157 if( nHeaderSize < actualHeaderSize )
1169 rStream.
Ignore(nHeaderSize - actualHeaderSize);
1196 xDecr = std::make_shared<XclImpBiff8CryptoAPIDecrypter>(
1211 sal_uInt16 nMode =
rStrm.ReaduInt16();
1215 xDecr = lclReadFilepass5( rStrm );
1225 xDecr = lclReadFilepass8_Standard(rStrm);
1232 xDecr = lclReadFilepass8_Strong(rStrm);
1235 OSL_FAIL(
"lclReadFilepass8 - unknown BIFF8 encryption sub mode");
1240 OSL_FAIL(
"lclReadFilepass8 - unknown encryption mode" );
1251 rStrm.DisableDecryption();
1254 switch(
rStrm.GetRoot().GetBiff() )
1265 rStrm.SetDecrypter( xDecr );
1269 rStrm.GetRoot().RequestEncryptionData( *xDecr );
1280 mbDocProtect(false),
1297 rStrm.EnableDecryption();
1309 pProtect->setProtected(
true);
1329 mnPasswordHash(0x0000),
1335 mbProtected(r.mbProtected),
1336 mnPasswordHash(r.mnPasswordHash),
1337 mnOptions(r.mnOptions)
1348 if (
rStrm.ReaduInt16() )
1363 if (nFlagSize != -1)
1368 sal_uInt16 nOptions =
rStrm.ReaduInt16();
1384 sal_uInt16 nHash =
rStrm.ReaduInt16();
1394 if (!rSheet.mbProtected)
1399 pProtect->setProtected(
true);
1402 const sal_uInt16 nHash = rSheet.mnPasswordHash;
1410 const sal_uInt16 nOptions = rSheet.mnOptions;
1428 pProtect->setEnhancedProtection( std::vector(rSheet.maEnhancedProtections) );
1447 return &itr->second;
static bool isAsciiNumeric(std::u16string_view rStr)
std::unique_ptr< EditTextObject > CreateTextObject()
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
const SfxItemSet & GetEmptyItemSet() const
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
virtual ConvErr Convert(std::unique_ptr< ScTokenArray > &, XclImpStream &rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT=FT_CellFormula) override
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
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
void SetIgnoreBlank(bool bSet)
Accessor class to ScDocument.
void setEditCell(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
ScInterpreterContext & GetNonThreadedContext() const
ScRangePairListRef & GetRowNameRangesRef()
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
SC_DLLPUBLIC sal_uLong AddValidationEntry(const ScValidationData &rNew)
SC_DLLPUBLIC void AddCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
ScRangePairListRef & GetColNameRangesRef()
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC void SetDocProtection(const ScDocProtection *pProtect)
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
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.
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.
SfxItemSet & GetItemSet()
void Join(const ScRange &, bool bIsInList=false)
void GetVars(SCCOL &nCol1, SCROW &nRow1, SCTAB &nTab1, SCCOL &nCol2, SCROW &nRow2, SCTAB &nTab2) const
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
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
sheet protection state container
void SetListType(sal_Int16 nListType)
void SetInput(const OUString &rTitle, const OUString &rMsg)
void SetError(const OUString &rTitle, const OUString &rMsg, ScValidErrorStyle eStyle)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const INetURLObject & GetURLObject() const
SfxMedium * GetMedium() const
SvStream & ReadInt32(sal_Int32 &rInt32)
Provides functions to convert Excel cell addresses to Calc cell addresses.
bool ConvertRange(ScRange &rScRange, const XclRange &rXclRange, SCTAB nScTab1, SCTAB nScTab2, bool bWarn)
Converts the passed Excel cell range to a Calc cell range.
void ConvertRangeList(ScRangeList &rScRanges, const XclRangeList &rXclRanges, SCTAB nScTab, bool bWarn)
Converts the passed Excel cell range list to a Calc cell range list.
static const ErrCode & ReadFilepass(XclImpStream &rStrm)
Reads the FILEPASS record, queries a password and sets decryption algorithm.
XclImpDocProtectBuffer(const XclImpRoot &rRoot)
void ReadPasswordHash(XclImpStream &rStrm)
void ReadDocProtect(XclImpStream &rStrm)
document structure protection flag
void ReadWinProtect(XclImpStream &rStrm)
document windows properties protection flag
void SetSkipObj(sal_uInt16 nObjId)
Sets the object with the passed identification to be skipped on import.
Stores all data of an Excel font and provides import of FONT records.
void ReadCFFontBlock(XclImpStream &rStrm)
Reads the font block from a CF (conditional format) record.
void FillToItemSet(SfxItemSet &rItemSet, XclFontItemType eType, bool bSkipPoolDefs=false) const
Fills all font properties to the item set.
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...
static void ReadHlink(XclImpStream &rStrm)
Reads a HLINK record and inserts it into the document.
static OUString ReadEmbeddedData(XclImpStream &rStrm)
Reads the (undocumented) embedded hyperlink data and returns the URL.
static void InsertUrl(XclImpRoot &rRoot, const XclRange &rXclRange, const OUString &rUrl)
Inserts the URL into a range of cells.
static void ReadLabelranges(XclImpStream &rStrm)
Reads a LABELRANGES record and inserts the label ranges into the document.
Represents a defined name.
Stores all user defined number formats occurred in the file.
sal_uInt16 ReadCFFormat(XclImpStream &rStrm, bool bIFmt)
Read NumFmt from conditional format record.
void FillToItemSet(SfxItemSet &rItemSet, sal_uInt16 nXclNumFmt, bool bSkipPoolDefs=false) const
Fills an Excel number format to the passed item set.
Stores the default colors for the current BIFF version and the contents of a PALETTE record.
Access to global data from other classes.
ExcelToSc & GetOldFmlaConverter() const
Returns the old formula converter.
XclImpAddressConverter & GetAddressConverter() const
Returns the address converter.
ScDocumentImport & GetDocImport()
XclImpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
XclImpPalette & GetPalette() const
Returns the color buffer.
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
XclImpSheetDrawing & GetCurrSheetDrawing() const
Returns the drawing container of the current sheet.
XclImpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
XclImpSheetProtectBuffer(const XclImpRoot &rRoot)
void ReadOptions(XclImpStream &rStrm, SCTAB nTab)
void ReadProtect(XclImpStream &rStrm, SCTAB nTab)
Sheet * GetSheetItem(SCTAB nTab)
void AppendEnhancedProtection(const ScEnhancedProtection &rProt, SCTAB nTab)
ProtectedSheetMap maProtectedSheets
void ReadPasswordHash(XclImpStream &rStrm, SCTAB nTab)
XclImpSst(const XclImpRoot &rRoot)
const XclImpString * GetString(sal_uInt32 nSstIndex) const
Returns a pointer to the string with the passed index.
XclImpStringVec maStrings
void ReadSst(XclImpStream &rStrm)
Reads the entire SST record.
This class represents an Excel stream position.
This class is used to import record oriented streams.
std::size_t Read(void *pData, std::size_t nBytes)
Reads nBytes bytes to the existing(!) buffer pData.
void Ignore(std::size_t nBytes)
Seeks forward inside the current record.
This class represents an unformatted or formatted string and provides importing from stream.
void Read(XclImpStream &rStrm, XclStrFlags nFlags=XclStrFlags::NONE)
Reads a complete string from the passed stream.
std::vector< std::unique_ptr< DVItem > > maDVItems
XclImpValidationManager(const XclImpRoot &rRoot)
static void ReadDval(XclImpStream &rStrm)
Reads a DVAL record and sets marks the dropdown arrow control to be ignored.
void ReadDV(XclImpStream &rStrm)
Reads a DV record and inserts validation data into the document.
void ReadWqsettings(XclImpStream &rStrm)
Reads a WEBQRYSETTINGS record and sets refresh rate to the current web query.
void Apply()
Inserts all web queries into the document.
void ReadWqtables(XclImpStream &rStrm)
Reads a WEBQRYTABLES record and sets source range list to the current web query.
void ReadWqstring(XclImpStream &rStrm)
Reads a WQSTRING record and sets URL to the current web query.
void ReadQsi(XclImpStream &rStrm)
Reads the QSI record and creates a new web query in the buffer.
XclImpWebQueryList maWQList
void ReadParamqry(XclImpStream &rStrm)
Reads a PARAMQRY record and sets data to the current web query.
XclImpWebQueryBuffer(const XclImpRoot &rRoot)
void ReadWqtables(XclImpStream &rStrm)
Reads a WEBQRYTABLES record and sets source range list.
@ xlWQAllTables
Entire document.
@ xlWQDocument
Not specified.
@ xlWQSpecTables
All tables.
XclImpWebQueryMode meMode
Destination range.
void ReadWqsettings(XclImpStream &rStrm)
Reads a WEBQRYSETTINGS record and sets refresh rate.
OUString maTables
Source document URL.
sal_uInt16 mnRefresh
Current mode of the web query.
XclImpWebQuery(const ScRange &rDestRange)
void ReadWqstring(XclImpStream &rStrm)
Reads a WQSTRING record and sets URL.
void ReadParamqry(XclImpStream &rStrm)
Reads a PARAMQRY record and sets data to the web query.
void Apply(ScDocument &rDoc, const OUString &rFilterName)
Inserts the web query into the document.
ScRange maDestRange
List of source range names.
A 2D cell range address list with Excel column and row indexes.
SfxObjectShell * GetDocShell() const
Returns the object shell of the Calc document.
XclTracer & GetTracer() const
Returns the filter tracer.
ScEditEngineDefaulter & GetEditEngine() const
Returns the edit engine for import/export of rich strings etc.
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
ScStyleSheetPool & GetStyleSheetPool() const
Returns the style sheet pool of the Calc document.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
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.
void TraceDVType(bool bType)
void InsertFileLink(sfx2::SvBaseLink &, SvBaseLinkObjectType nFileType, std::u16string_view rFileNm, const OUString *pFilterNm=nullptr, const OUString *pRange=nullptr)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
double getLength(const B2DPolygon &rCandidate)
const sal_uInt32 VERSION_INFO_1997_FORMAT
const sal_uInt32 VERSION_INFO_2007_FORMAT
const sal_uInt32 VERSION_INFO_2007_FORMAT_SP2
const sal_uInt32 ENCRYPT_HASH_SHA1
const sal_uInt32 ENCRYPTINFO_AES
const sal_uInt32 SALT_LENGTH
const sal_uInt32 ENCRYPTINFO_CRYPTOAPI
const sal_uInt32 ENCRYPT_ALGO_RC4
const sal_uInt32 ENCRYPTINFO_EXTERNAL
bool getFlag(Type nBitField, Type nMask)
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
Container for the Excel EnhancedProtection feature.
This is very similar to ScCellValue, except that it references the original value instead of copying ...
This struct stores a GUID (class ID) and supports reading, writing and comparison.
Extends the XclCellAlign struct for import.
void FillFromCF(sal_uInt16 nAlign, sal_uInt16 nMiscAttrib)
Fills this struct with CF record data.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpFont *pFont, bool bSkipPoolDefs=false) const
Inserts items representing this alignment style into the item set.
Extends the XclCellArea struct for import.
void FillFromCF8(sal_uInt16 nPattern, sal_uInt16 nColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a brush item representing this area style into the item set.
Extends the XclCellBorder struct for import.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a box item representing this border style into the item set.
void FillFromCF8(sal_uInt16 nLineStyle, sal_uInt32 nLineColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
Extends the XclCellProt struct for import.
void FillFromXF3(sal_uInt16 nProt)
Fills this struct with BIFF3-BIFF8 XF record data.
void FillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
Inserts items representing this protection style into the item set.
sal_uInt16 mnPasswordHash
::std::vector< ScEnhancedProtection > maEnhancedProtections
DVItem(ScRangeList aRanges, const ScValidationData &rValidData)
ScValidationData maValidData
A 2D cell range address struct with Excel column and row indexes.
sal_uInt32 encryptedVerifierHashSize
sal_uInt8 encryptedVerifierHash[comphelper::SHA1_HASH_LENGTH]
sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH]
sal_uInt8 salt[SALT_LENGTH]
EncryptionStandardHeader header
EncryptionVerifierRC4 verifier
std::shared_ptr< XclImpDecrypter > XclImpDecrypterRef
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
const sal_uInt32 EXC_DV_COND_NOTBETWEEN
const sal_uInt32 EXC_HLINK_FRAME
Text mark.
const sal_uInt16 EXC_WQSETT_SPECTABLES
All tables or entire document.
const sal_uInt32 EXC_DV_ERROR_INFO
const sal_uInt32 EXC_DV_IGNOREBLANK
const sal_uInt32 EXC_DV_COND_BETWEEN
const sal_uInt32 EXC_DV_COND_NOTEQUAL
const sal_uInt32 EXC_HLINK_DESCR
Absolute path.
const sal_uInt32 EXC_DV_MODE_ANY
constexpr OUStringLiteral EXC_WEBQRY_FILTER
UNC path.
const sal_uInt32 EXC_DV_SHOWPROMPT
const sal_uInt16 EXC_PQRYTYPE_WEBQUERY
Source type: ODBC.
const sal_uInt32 EXC_DV_MODE_WHOLE
const sal_uInt32 EXC_CF_BLOCK_AREA
Border block present?
const sal_uInt8 EXC_CF_CMP_NOT_BETWEEN
const sal_uInt32 EXC_HLINK_BODY
const sal_uInt32 EXC_CF_BLOCK_NUMFMT
Default flags.
const sal_uInt32 EXC_DV_MODE_MASK
const sal_uInt16 EXC_FILEPASS_BIFF5
const sal_uInt32 EXC_DV_ERROR_WARNING
const sal_uInt32 EXC_CF_BLOCK_BORDER
Alignment block present?
const sal_uInt32 EXC_DV_COND_MASK
const sal_uInt8 EXC_CF_TYPE_FMLA
const sal_uInt32 EXC_CF_BLOCK_FONT
Font block present?
const sal_uInt32 EXC_CF_IFMT_USER
Protection block present?
const sal_uInt32 EXC_DV_SUPPRESSDROPDOWN
const sal_uInt32 EXC_DV_SHOWERROR
const sal_uInt32 EXC_DV_COND_LESS
const sal_uInt32 EXC_DV_MODE_TIME
const sal_uInt8 EXC_CF_TYPE_CELL
const sal_uInt32 EXC_CF_BLOCK_ALIGNMENT
Font block present?
const sal_uInt8 EXC_CF_CMP_LESS
const sal_uInt8 EXC_CF_CMP_GREATER
const sal_uInt32 EXC_DV_MODE_TEXTLEN
const sal_uInt16 EXC_PQRY_WEBQUERY
ODBC connection.
const sal_uInt16 EXC_FILEPASS_BIFF8
const sal_uInt32 EXC_DV_MODE_LIST
const sal_uInt8 EXC_CF_CMP_LESS_EQUAL
const sal_uInt32 EXC_DV_COND_EQGREATER
const sal_uInt32 EXC_DV_MODE_DATE
const sal_uInt32 EXC_DV_COND_EQUAL
const sal_uInt32 EXC_DV_MODE_DECIMAL
const sal_uInt8 EXC_CF_CMP_GREATER_EQUAL
const sal_uInt32 EXC_DV_ERROR_MASK
const sal_uInt32 EXC_DV_MODE_CUSTOM
const sal_uInt8 EXC_CF_CMP_NOT_EQUAL
const sal_uInt32 EXC_DVAL_NOOBJ
const sal_uInt32 EXC_DV_STRINGLIST
const sal_uInt8 EXC_CF_CMP_EQUAL
const sal_uInt32 EXC_DV_COND_EQLESS
const sal_uInt32 EXC_HLINK_MARK
Description.
const sal_uInt16 EXC_PQRY_TABLES
Web query.
const sal_uInt32 EXC_CF_BLOCK_PROTECTION
Pattern block present?
const sal_uInt32 EXC_DV_COND_GREATER
const sal_uInt32 EXC_HLINK_UNC
Target frame.
const sal_uInt8 EXC_CF_CMP_BETWEEN
const sal_uInt32 EXC_HLINK_ABS
Contains file link or URL.
const ErrCode EXC_ENCR_ERROR_UNSUPP_CRYPT