27#include <document.hxx>
32 mrStrm(
rStrm), mnStrmPos(0), mnStrmSize(0) {}
57 nFlagsBiff2 =
rStrm.ReaduInt8();
60 nNameLen =
rStrm.ReaduInt8();
61 nFmlaSize =
rStrm.ReaduInt8();
69 nFlags =
rStrm.ReaduInt16();
71 nNameLen =
rStrm.ReaduInt8();
72 nFmlaSize =
rStrm.ReaduInt16();
79 nFlags =
rStrm.ReaduInt16();
81 nNameLen =
rStrm.ReaduInt8();
82 nFmlaSize =
rStrm.ReaduInt16();
83 nExtSheet =
rStrm.ReaduInt16();
125 if( cBuiltIn ==
'?' )
146 std::unique_ptr<ScTokenArray> pTokArr;
158 rStrm.PushPosition();
181 if (pTokArr->IsReference(aRange,
ScAddress()))
193 if (pTokArr->IsValidReference(aRange,
ScAddress()))
200 else if( nFmlaSize > 0 )
210 if (pTokArr && !bFunction && !
mbVBName)
221 std::unique_ptr<ScTokenArray> pArray;
225 rStrm.StorePosition(aOldPos);
228 rStrm.RestorePosition(aOldPos);
240 pData->GuessPosition();
265 if (
pData->IsValidReference( aRange ) )
287 maNameList.push_back( std::make_unique<XclImpName>(
rStrm,
static_cast< sal_uInt16
>(
nCount + 1 ) ) );
302 const auto& rxName = *itName;
303 if( rxName->GetXclName() == rXclName )
305 if( rxName->GetScTab() == nScTab )
306 pLocalName = rxName.get();
307 else if( rxName->IsGlobal() )
308 pGlobalName = rxName.get();
314 return pLocalName ? pLocalName : pGlobalName;
319 OSL_ENSURE( nXclNameIdx > 0,
"XclImpNameManager::GetName - index must be >0" );
320 return ( nXclNameIdx <= 0 || nXclNameIdx >
maNameList.size() ) ? nullptr :
maNameList.at( nXclNameIdx - 1 ).get();
326 rxName->ConvertTokens();
std::unique_ptr< ScTokenArray > GetDummy()
virtual ConvErr Convert(std::unique_ptr< ScTokenArray > &, XclImpStream &rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT=FT_CellFormula) override
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
ScExtTabSettings & GetOrCreateTabSettings(SCTAB nTab)
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
void AddAdvancedRange(const ScRange &rRange)
void AddExtractPos(const ScRange &rRange)
void Insert(RootData *pRoot, const ScRange &rRange)
XclImpNameManager(const XclImpRoot &rRoot)
XclImpNameList maNameList
const XclImpName * FindName(std::u16string_view rXclName, SCTAB nScTab) const
Tries to find the name used in Calc, based on the original Excel defined name.
void ReadName(XclImpStream &rStrm)
Reads a NAME record and creates an entry in this buffer.
const XclImpName * GetName(sal_uInt16 nXclNameIdx) const
Returns the defined name specified by its Excel index.
Represents a defined name.
XclImpName(const XclImpName &)=delete
const ScRangeData * mpScData
Name inserted into the Calc document.
SCTAB mnScTab
Pointer to Calc defined name (no ownership).
std::unique_ptr< TokenStrmData > mpTokensData
Whether it's a user-defined macro.
OUString maScName
Original name read from the file.
ScRangeData::Type meNameType
Calc sheet index of local names.
bool mbMacro
true = Visual Basic procedure or function.
void InsertName(const ScTokenArray *pArray)
Access to global data from other classes.
ScRangeListTabs & GetPrintAreaBuffer() const
Returns the buffer that contains all print areas in the document.
ExcelToSc & GetOldFmlaConverter() const
Returns the old formula converter.
ScRangeListTabs & GetTitleAreaBuffer() const
Returns the buffer that contains all print titles in the document.
XclImpAutoFilterBuffer & GetFilterManager() const
Returns the filter manager.
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
This class represents an Excel stream position.
This class is used to import record oriented streams.
ScExtDocOptions & GetExtDocOptions() const
Returns the extended document options.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
RootData & GetOldRoot() const
Returns old RootData struct.
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
std::unique_ptr< sal_Int32[]> pData
TokenStrmData(XclImpStream &rStrm)
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
const sal_Unicode EXC_BUILTIN_UNKNOWN
const sal_uInt16 EXC_NAME_BIG
const sal_Unicode EXC_BUILTIN_EXTRACT
const sal_uInt16 EXC_NAME_VB
const sal_Unicode EXC_BUILTIN_FILTERDATABASE
const sal_uInt16 EXC_NAME_BUILTIN
const sal_Unicode EXC_BUILTIN_PRINTTITLES
const sal_uInt16 EXC_NAME_GLOBAL
BIFF2 function/command flag.
const sal_uInt16 EXC_NAME_PROC
const sal_Unicode EXC_BUILTIN_CRITERIA
const sal_Unicode EXC_BUILTIN_PRINTAREA
const sal_uInt16 EXC_NAME_FUNC
const sal_uInt8 EXC_NAME2_FUNC