22#include <tokenarray.hxx>
32class SharedStringPool;
49 operator const sal_uInt16&()
const {
return nId; }
71template<
typename T,
int InitialCapacity>
79 ppP_Str( new T[InitialCapacity] ),
84 bool Grow(sal_uInt16 nByMin = 1)
90 T* ppP_StrNew =
new T[ nP_StrNew ];
93 ppP_StrNew[
i ] = std::move(
ppP_Str[
i ]);
101 static sal_uInt16
lcl_canGrow( sal_uInt16 nOld, sal_uInt16 nByMin )
104 return nByMin ? nByMin : 1;
107 sal_uInt32 nNew = ::std::max(
static_cast<sal_uInt32
>(nOld) * 2,
108 static_cast<sal_uInt32
>(nOld) + nByMin);
111 if (nNew - nByMin < nOld)
113 return static_cast<sal_uInt16
>(nNew);
146 std::unique_ptr<sal_uInt16[]>
pP_Id;
204 std::unique_ptr<sal_uInt16[]>
pSize;
268 static const sal_uInt16
nSize = 1024;
287 SAL_WARN(
"sc.filter",
"*TokenStack::Get(): is empty, is empty, ...");
308 SAL_WARN(
"sc.filter",
"*TokenStack::<<(): Stack overflow for " <<
static_cast<sal_uInt16
>(rNewId));
323 SAL_WARN(
"sc.filter",
"*TokenStack::>>(): is empty, is empty, ...");
338 sal_uInt16
nId =
static_cast<sal_uInt16
>(rId);
342 SAL_WARN(
"sc.filter",
"-TokenPool::operator <<: TokenId 0");
347 SAL_WARN(
"sc.filter",
"-TokenPool::operator <<: TokenId in DefToken-Range! " <<
static_cast<sal_uInt16
>(rId));
366 if (
static_cast<sal_uInt32
>(eId) +
nScTokenOff >= 0xFFFF)
368 SAL_WARN(
"sc.filter",
"-TokenPool::operator<<: enum too large! " <<
static_cast<sal_uInt32
>(eId));
385 sal_uInt16
nId =
static_cast<sal_uInt16
>(rStack.
Get());
413 std::unique_ptr<ScTokenArray> pScToken(
new ScTokenArray(rDoc) );
420 GetElement(
static_cast<sal_uInt16
>(rId) - 1, pScToken.get());
Matrix data type that can store values of mixed types.
TokenId StoreName(sal_uInt16 nIndex, sal_Int16 nSheet)
static const sal_uInt16 nScTokenOff
TokenId StoreExtName(sal_uInt16 nFileId, const OUString &rName)
TokenId StoreNlf(const ScSingleRefData &rTr)
bool IsSingleOp(const TokenId &rId, const DefTokenId eId) const
::std::vector< ExtCellRef > maExtCellRefs
ScMatrix * GetMatrix(unsigned int n) const
bool GetElement(const sal_uInt16 nId, ScTokenArray *pScToken)
std::unique_ptr< sal_uInt16[]> pP_Id
svl::SharedStringPool & mrStringPool
TokenPoolPool< sal_uInt16, 8 > pP_Err
std::unique_ptr< E_TYPE[]> pType
TokenPoolPool< std::unique_ptr< EXTCONT >, 32 > ppP_Ext
::std::vector< ExtAreaRef > maExtAreaRefs
TokenPool & operator<<(const TokenId &rId)
TokenPoolPool< double, 8 > pP_Dbl
::std::vector< ExtName > maExtNames
sal_uInt16 nP_MatrixCurrent
TokenPool(svl::SharedStringPool &rSPool)
std::unique_ptr< ScMatrix *[]> ppP_Matrix
::std::vector< RangeName > maRangeNames
bool GetElementRek(const sal_uInt16 nId, ScTokenArray *pScToken)
TokenId StoreExtRef(sal_uInt16 nFileId, const OUString &rTabName, const ScSingleRefData &rRef)
TokenPoolPool< std::unique_ptr< ScSingleRefData >, 16 > ppP_Nlf
sal_uInt16 nElementCurrent
bool GrowTripel(sal_uInt16 nByMin)
TokenPoolPool< std::unique_ptr< ScSingleRefData >, 32 > ppP_RefTr
std::unique_ptr< sal_uInt16[]> pSize
TokenPoolPool< std::unique_ptr< OUString >, 4 > ppP_Str
std::unique_ptr< sal_uInt16[]> pElement
std::unique_ptr< ScTokenArray > GetTokenArray(const ScDocument &rDoc, const TokenId &rId)
const OUString * GetExternal(const TokenId &rId) const
void operator>>(TokenId &rId)
bool CheckElementOrGrow()
static const sal_uInt16 nSize
std::unique_ptr< TokenId[]> pStack
TokenStack & operator<<(const TokenId &rNewId)
void operator>>(TokenId &rId)
bool HasMoreTokens() const
#define SAL_WARN(area, stream)
These need to be in global namespace just like their respective types are.
Complex reference (a range) into the sheet.
Single reference (one address) into the sheet.
TokenId(const TokenId &r)
TokenId & operator=(const TokenId &r)
bool Grow(sal_uInt16 nByMin=1)
T * getIfInRange(sal_uInt16 n) const
std::unique_ptr< T[]> ppP_Str
T const & operator[](sal_uInt16 n) const
T & operator[](sal_uInt16 n)
static sal_uInt16 lcl_canGrow(sal_uInt16 nOld, sal_uInt16 nByMin)
Returns the new number of elements, or 0 if overflow.
EXTCONT(const DefTokenId e, OUString a)
for storage of external area references
for storage of external cell references
for storage of external names
for storage of named ranges