22#include <document.hxx>
36#include <rtl/math.hxx>
44#include <osl/diagnose.h>
47#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
53#define ENABLE_THREADED_PIVOT_CACHE 0
55#if ENABLE_THREADED_PIVOT_CACHE
63using ::com::sun::star::uno::Exception;
68 maInfo(rInfo), mnGroupType(nGroupType) {}
84struct ClearObjectSource
108class MacroInterpretIncrementer
111 explicit MacroInterpretIncrementer(
ScDocument& rDoc) :
114 mrDoc.IncMacroInterpretLevel();
116 ~MacroInterpretIncrementer()
118 mrDoc.DecMacroInterpretLevel();
126 return rPool.insert(rStr).first->pData;
133 if (aDocStr.isEmpty())
174 mnOrderIndex(0), mnDataIndex(0) {}
176 maValue(rValue), mnOrderIndex(0), mnDataIndex(nData) {}
186 void operator() (
const Bucket& v)
const
188 cout <<
"value: " <<
v.maValue.GetValue() <<
" order index: " <<
v.mnOrderIndex <<
" data index: " <<
v.mnDataIndex <<
endl;
196 bool operator() (
const Bucket& left,
const Bucket& right)
const
202struct LessByOrderIndex
204 bool operator() (
const Bucket& left,
const Bucket& right)
const
206 return left.mnOrderIndex <
right.mnOrderIndex;
210struct LessByDataIndex
212 bool operator() (
const Bucket& left,
const Bucket& right)
const
214 return left.mnDataIndex <
right.mnDataIndex;
218struct EqualByOrderIndex
220 bool operator() (
const Bucket& left,
const Bucket& right)
const
222 return left.mnOrderIndex ==
right.mnOrderIndex;
231 void operator() (
const Bucket& v)
233 mrItems.push_back(
v.maValue);
237class PushBackOrderIndex
242 void operator() (
const Bucket& v)
244 mrData.push_back(
v.mnOrderIndex);
250 if (aBuckets.empty())
259 std::vector<Bucket>::iterator it = aBuckets.begin(), itEnd = aBuckets.end();
261 it->mnOrderIndex = nCurIndex;
262 for (++it; it != itEnd; ++it)
267 it->mnOrderIndex = nCurIndex;
276 rField.
maData.reserve(aBuckets.size());
277 std::for_each(aBuckets.begin(), aBuckets.end(), PushBackOrderIndex(rField.
maData));
283 std::vector<Bucket>::iterator itUniqueEnd =
284 std::unique(aBuckets.begin(), aBuckets.end(), EqualByOrderIndex());
287 std::vector<Bucket>::iterator itBeg = aBuckets.begin();
288 size_t nLen =
distance(itBeg, itUniqueEnd);
290 std::for_each(itBeg, itUniqueEnd, PushBackValue(rField.
maItems));
304 maEmptyRows(0, rSheetLimits.GetMaxRowCount(), true),
311 mpStrPool = pStrPool;
323 bool mbTailEmptyRows;
330 mbTailEmptyRows(false) {}
333typedef std::unordered_set<OUString> LabelSet;
335void normalizeAddLabel(
const OUString& rLabel, std::vector<OUString>& rLabels, LabelSet& rExistingNames)
338 sal_Int32 nSuffix = 1;
339 OUString aNewLabel = rLabel;
340 OUString aNewLabelLower = aLabelLower;
343 if (!rExistingNames.count(aNewLabelLower))
346 rLabels.push_back(aNewLabel);
347 rExistingNames.insert(aNewLabelLower);
352 aNewLabel = rLabel + OUString::number(++nSuffix);
353 aNewLabelLower = aLabelLower + OUString::number(nSuffix);
357std::vector<OUString> normalizeLabels(
const std::vector<InitColumnData>& rColData)
359 std::vector<OUString> aLabels;
360 aLabels.reserve(rColData.size() + 1);
362 LabelSet aExistingNames;
363 normalizeAddLabel(
ScResId(STR_PIVOT_DATA), aLabels, aExistingNames);
365 for (
const InitColumnData& rCol : rColData)
366 normalizeAddLabel(rCol.maLabel, aLabels, aExistingNames);
373 std::vector<OUString> aLabels;
374 aLabels.reserve(nLabelCount + 1);
376 LabelSet aExistingNames;
377 normalizeAddLabel(
ScResId(STR_PIVOT_DATA), aLabels, aExistingNames);
379 for (sal_Int32 nCol = 0; nCol < nLabelCount; ++nCol)
382 normalizeAddLabel(aColTitle, aLabels, aExistingNames);
388void initColumnFromDoc( InitDocData& rDocData, InitColumnData &rColData )
392 SCTAB nDocTab = rDocData.mnDocTab;
393 SCCOL nCol = rColData.mnCol;
394 SCROW nStartRow = rDocData.mnStartRow;
395 SCROW nEndRow = rDocData.mnEndRow;
396 bool bTailEmptyRows = rDocData.mbTailEmptyRows;
398 std::optional<sc::ColumnIterator> pIter =
401 assert(pIter->hasCell());
405 rColData.maLabel = createLabelString(rDoc, nCol, pIter->getCell());
408 std::vector<Bucket> aBuckets;
409 aBuckets.reserve(nEndRow-nStartRow);
412 for (
SCROW i = 0, n = nEndRow-nStartRow;
i <
n; ++
i, pIter->next())
414 assert(pIter->hasCell());
416 sal_uInt32 nNumFormat = 0;
417 ScAddress aPos(nCol, pIter->getRow(), nDocTab);
418 initFromCell(*rColData.mpStrPool, rDoc, aPos, pIter->getCell(), aData, nNumFormat);
420 aBuckets.emplace_back(aData, i);
422 if (!
aData.IsEmpty())
424 rColData.maEmptyRows.insert_back(i, i+1,
false);
431 processBuckets(aBuckets, rField);
440 rField.
maItems.push_back(aData);
445#if ENABLE_THREADED_PIVOT_CACHE
449 using FutureType = std::future<void>;
450 std::queue<FutureType> maQueue;
452 std::condition_variable maCond;
457 ThreadQueue(
size_t nMaxQueue ) : mnMaxQueue(nMaxQueue) {}
459 void push( std::function<
void()> aFunc )
461 std::unique_lock<std::mutex>
lock(maMutex);
463 while (maQueue.size() >= mnMaxQueue)
466 FutureType f = std::async(std::launch::async, aFunc);
467 maQueue.push(std::move(f));
475 std::unique_lock<std::mutex>
lock(maMutex);
477 while (maQueue.empty())
480 FutureType ret = std::move(maQueue.front());
490class ThreadScopedGuard
492 std::thread maThread;
494 ThreadScopedGuard(std::thread thread) : maThread(
std::move(thread)) {}
495 ThreadScopedGuard(ThreadScopedGuard&& other) : maThread(
std::move(other.maThread)) {}
497 ThreadScopedGuard(
const ThreadScopedGuard&) =
delete;
498 ThreadScopedGuard& operator= (
const ThreadScopedGuard&) =
delete;
514 InitDocData aDocData(rDoc);
520 MacroInterpretIncrementer aMacroInc(rDoc);
522 aDocData.mnStartRow = rRange.
aStart.
Row();
523 aDocData.mnEndRow = rRange.
aEnd.
Row();
536 mnRowCount = aDocData.mnEndRow - aDocData.mnStartRow;
539 SCCOL nCol1 = nStartCol, nCol2 = nEndCol;
540 SCROW nRow1 = aDocData.mnStartRow, nRow2 = aDocData.mnEndRow;
542 aDocData.mbTailEmptyRows = aDocData.mnEndRow > nRow2;
543 aDocData.mnEndRow = nRow2;
545 if (aDocData.mnEndRow <= aDocData.mnStartRow)
558 maFields.push_back(std::make_unique<Field>());
565#if ENABLE_THREADED_PIVOT_CACHE
566 ThreadQueue aQueue(std::thread::hardware_concurrency());
568 auto aFuncLaunchFieldThreads = [&]()
570 for (sal_uInt16 nCol = nStartCol; nCol <= nEndCol; ++nCol)
572 size_t nDim = nCol - nStartCol;
573 InitColumnData& rColData = aColData[nDim];
576 auto func = [&aDocData,&rColData]()
578 initColumnFromDoc(aDocData, rColData);
581 aQueue.push(std::move(func));
587 std::thread
t(aFuncLaunchFieldThreads);
588 ThreadScopedGuard sg(std::move(
t));
596 for (sal_uInt16 nCol = nStartCol; nCol <= nEndCol; ++nCol)
598 size_t nDim = nCol - nStartCol;
599 InitColumnData& rColData = aColData[nDim];
602 initColumnFromDoc(aDocData, rColData);
609 for (
const InitColumnData& rCol : aColData)
611 EmptyRowsType::const_segment_iterator it = rCol.maEmptyRows.begin_segment();
612 EmptyRowsType::const_segment_iterator ite = rCol.maEmptyRows.end_segment();
615 for (; it != ite; ++it)
637 maFields.push_back(std::make_unique<Field>());
642 std::vector<Bucket> aBuckets;
657 aBuckets.emplace_back(
aData, nRow);
658 if (!
aData.IsEmpty())
669 processBuckets(aBuckets, rField);
697 std::vector<bool> aPassed(nEntryCount,
false);
703 for (
size_t i = 0;
i < nEntryCount && rParam.
GetEntry(
i).bDoQuery; ++
i)
710 if ( nQueryCol < rParam.
nCol1 )
711 nQueryCol = rParam.
nCol1;
712 if ( nQueryCol > rParam.
nCol2 )
713 nQueryCol = rParam.
nCol2;
714 SCCOL nSourceField = nQueryCol - rParam.
nCol1;
732 double nCellVal = pCellData->
GetValue();
737 bOk = ::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
740 bOk = (nCellVal < rItem.
mfVal) && !::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
743 bOk = (nCellVal > rItem.
mfVal) && !::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
746 bOk = (nCellVal < rItem.
mfVal) || ::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
749 bOk = (nCellVal > rItem.
mfVal) || ::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
752 bOk = !::rtl::math::approxEqual(nCellVal, rItem.
mfVal);
764 OUString aCellStr = pCellData->
GetString();
768 if (bRealWildOrRegExp)
770 sal_Int32 nStart = 0;
771 sal_Int32 nEnd = aCellStr.getLength();
776 if (bMatch && bMatchWholeCell
777 && (nStart != 0 || nEnd != aCellStr.getLength()))
791 bool bHasStar =
false;
795 if (bHasStar && (
nIndex>0))
797 for (sal_Int32 j=0;(j<
nIndex) && (j< aCellStr.getLength()) ; j++)
799 if (aCellStr[j] ==
aStr[j])
814 css::uno::Sequence< sal_Int32 > xOff;
817 aCellStr, nLang, 0, aCellStr.getLength(), &xOff);
819 aQueryStr, nLang, 0, aQueryStr.getLength(), &xOff);
820 bOk = (aCell.indexOf( aQuer ) != -1);
832 bOk = (nCompare < 0);
835 bOk = (nCompare > 0);
838 bOk = (nCompare <= 0);
841 bOk = (nCompare >= 0);
844 OSL_FAIL(
"SC_NOT_EQUAL");
866 aPassed[
nPos] = aPassed[
nPos] && bOk;
877 aPassed[0] = aPassed[0] || aPassed[j];
879 bool bRet = aPassed[0];
906 if (nDim < nSourceCount)
907 return maFields[nDim]->mpGroup.get();
909 nDim -= nSourceCount;
918 OSL_ENSURE(nDim <
maLabelNames.size()-1 ,
"ScDPTableDataCache::GetDimensionName");
931 OSL_ENSURE(!
maFields.empty(),
"Cache not initialized!");
935 OSL_ENSURE(it !=
maEmptyRows.rend(),
"corrupt flat_segment_tree instance!");
938 OSL_ENSURE(it !=
maEmptyRows.rend(),
"buggy version of flat_segment_tree is used.");
941 SCROW nLastNonEmpty = it->first - 1;
960 OSL_ENSURE(nDim <
mnColumnCount,
"ScDPTableDataCache::GetItemDataId ");
967 nRow = rField.
maData.size()-1;
971 return rField.
maItems.size()-1;
974 else if (bRepeatIfEmpty)
976 while (nRow > 0 && rField.
maItems[rField.
maData[nRow]].IsEmpty())
980 return rField.
maData[nRow];
985 if (nDim < 0 ||
nId < 0)
988 size_t nSourceCount =
maFields.size();
989 size_t nDimPos =
static_cast<size_t>(nDim);
990 size_t nItemId =
static_cast<size_t>(
nId);
991 if (nDimPos < nSourceCount)
995 if (nItemId < rField.
maItems.size())
996 return &rField.
maItems[nItemId];
1001 nItemId -= rField.
maItems.size();
1003 if (nItemId >= rGI.size())
1006 return &rGI[nItemId];
1010 nDimPos -= nSourceCount;
1015 if (nItemId >= rGI.size())
1018 return &rGI[nItemId];
1052 OSL_ENSURE( nDim>=0 && nDim <
mnColumnCount ,
" nDim < mnColumnCount ");
1063 return maFields[nDim]->mnNumFormat;
1076 return (
eType == SvNumFormatType::DATE) || (
eType == SvNumFormatType::DATETIME);
1081 OSL_ENSURE( nDim>=0 && nDim <
mnColumnCount ,
" ScDPTableDataCache::GetDimMemberCount : out of bound ");
1082 return maFields[nDim]->maItems.size();
1090 return static_cast<SCCOL>(
i-1);
1131 for (
size_t i = 0,
n = rItems.size();
i <
n; ++
i)
1133 if (rItems[
i] == rItem)
1142 for (
size_t i = 0,
n = rGI.size();
i <
n; ++
i)
1144 if (rGI[
i] == rItem)
1145 return rItems.size() +
i;
1155 for (
size_t i = 0,
n = rGI.size();
i <
n; ++
i)
1157 if (rGI[
i] == rItem)
1172 switch (rFormatter.
GetType( nNumFormat))
1174 case SvNumFormatType::DATE:
1176 case SvNumFormatType::TIME:
1178 case SvNumFormatType::DATETIME:
1188 return rtl::math::doubleToUString( fValue, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
'.',
true);
1200 const Color* pColor =
nullptr;
1218 if (bLocaleIndependent)
1222 const Color* pColor =
nullptr;
1234 double fStart = 0.0, fEnd = 0.0;
1238 fStart =
p->maInfo.mfStart;
1239 fEnd =
p->maInfo.mfEnd;
1276 if (nDim < nSourceCount)
1282 nDim -= nSourceCount;
1298 if (nDim < nSourceCount)
1306 nDim -= nSourceCount;
1310 rItems.push_back(rData);
1311 return rItems.size()-1;
1323 if (nDim < nSourceCount)
1328 size_t nOffset =
maFields[nDim]->maItems.size();
1330 for (
size_t i = 0,
n = rGI.size();
i <
n; ++
i)
1331 rIds.push_back(
static_cast<SCROW>(
i + nOffset));
1336 nDim -= nSourceCount;
1340 for (
size_t i = 0,
n = rGI.size();
i <
n; ++
i)
1341 rIds.push_back(
static_cast<SCROW>(
i));
1347struct ClearGroupItems
1349 void operator() (
const std::unique_ptr<ScDPCache::Field>& r)
const
1374 if (nDim < nSourceCount)
1379 return &
maFields[nDim]->mpGroup->maInfo;
1382 nDim -= nSourceCount;
1395 if (nDim < nSourceCount)
1400 return maFields[nDim]->mpGroup->mnGroupType;
1403 nDim -= nSourceCount;
1416 for (
size_t i = 0;
i < rItems.size(); ++
i)
1422 for (
const auto& rIndex : rArray)
1426const char* getGroupTypeName(sal_Int32
nType)
1428 static const char* pNames[] = {
1429 "",
"years",
"quarters",
"months",
"days",
"hours",
"minutes",
"seconds"
1434 case sheet::DataPilotFieldGroupBy::YEARS:
return pNames[1];
1435 case sheet::DataPilotFieldGroupBy::QUARTERS:
return pNames[2];
1436 case sheet::DataPilotFieldGroupBy::MONTHS:
return pNames[3];
1437 case sheet::DataPilotFieldGroupBy::DAYS:
return pNames[4];
1438 case sheet::DataPilotFieldGroupBy::HOURS:
return pNames[5];
1439 case sheet::DataPilotFieldGroupBy::MINUTES:
return pNames[6];
1440 case sheet::DataPilotFieldGroupBy::SECONDS:
return pNames[7];
1453 bool bDumpItems =
false;
1454 bool bDumpSourceData =
false;
1456 cout <<
"--- pivot cache dump" <<
endl;
1459 for (
const auto& rxField :
maFields)
1461 const Field& fld = *rxField;
1463 cout <<
" item count: " << fld.maItems.size() <<
endl;
1465 dumpItems(*
this, i, fld.maItems, 0);
1468 cout <<
" group item count: " << fld.mpGroup->maItems.size() <<
endl;
1469 cout <<
" group type: " << getGroupTypeName(fld.mpGroup->mnGroupType) <<
endl;
1471 dumpItems(*
this, i, fld.mpGroup->maItems, fld.maItems.size());
1474 if (bDumpSourceData)
1476 cout <<
" source data (re-constructed):" <<
endl;
1477 dumpSourceData(*
this, i, fld.maItems, fld.maData);
1488 const GroupItems& gi = *rxGroupField;
1489 cout <<
"* group dimension: (unnamed) (ID = " <<
i <<
")" <<
endl;
1490 cout <<
" item count: " << gi.maItems.size() <<
endl;
1491 cout <<
" group type: " << getGroupTypeName(gi.mnGroupType) <<
endl;
1493 dumpItems(*
this, i, gi.maItems, 0);
1500 cout <<
"* empty rows: " <<
endl;
1501 mdds::flat_segment_tree<SCROW, bool>::const_iterator it =
maEmptyRows.begin(), itEnd =
maEmptyRows.end();
1504 aRange.start = it->first;
1505 aRange.empty = it->second;
1507 for (++it; it != itEnd; ++it)
1509 aRange.end = it->first-1;
1510 cout <<
" rows " << aRange.start <<
"-" << aRange.end <<
": " << (aRange.empty ?
"empty" :
"not-empty") << endl;
1511 aRange.start = it->first;
1512 aRange.empty = it->second;
1517 cout <<
"---" <<
endl;
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
bool ValidRow(SCROW nRow, SCROW nMaxRow)
FILE * init(int, char **)
OUString lowercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
const OUString & getNumDecimalSep() const
Interface for connecting to database source.
virtual OUString getColumnLabel(tools::Long nCol) const =0
virtual tools::Long getColumnCount() const =0
virtual void getValue(tools::Long nCol, ScDPItemData &rData, SvNumFormatType &rNumType) const =0
This class represents the cached data part of the datapilot cache table implementation.
sal_Int32 GetGroupType(tools::Long nDim) const
Return a group type identifier.
SCROW GetDataSize() const
Data size is the number of records without any trailing empty rows for sheet source data.
GroupFieldsType maGroupFields
const ScDPItemData * GetItemDataById(tools::Long nDim, SCROW nId) const
tools::Long GetDimMemberCount(tools::Long nDim) const
SCROW GetIdByItemData(tools::Long nDim, const ScDPItemData &rItem) const
bool IsDateDimension(tools::Long nDim) const
std::vector< OUString > maLabelNames
rtl_uString * InternString(size_t nDim, const OUString &rStr)
ScDPCache(const ScDPCache &)=delete
std::unordered_set< OUString > StringSetType
std::vector< SCROW > IndexArrayType
SCROW GetRowCount() const
Row count is the number of records plus any trailing empty rows in case the source data is sheet and ...
void AddReference(ScDPObject *pObj) const
std::vector< StringSetType > maStringPools
void GetGroupDimMemberIds(tools::Long nDim, std::vector< SCROW > &rIds) const
mdds::flat_segment_tree< SCROW, bool > EmptyRowsType
static OUString GetLocaleIndependentFormattedString(double fValue, SvNumberFormatter &rFormatter, sal_uInt32 nNumFormat)
SvNumberFormatter * GetNumberFormatter() const
bool ValidQuery(SCROW nRow, const ScQueryParam &rQueryParam) const
void ResetGroupItems(tools::Long nDim, const ScDPNumGroupInfo &rNumInfo, sal_Int32 nGroupType)
ScDocument & GetDoc() const
SCROW SetGroupItem(tools::Long nDim, const ScDPItemData &rData)
OUString GetFormattedString(tools::Long nDim, const ScDPItemData &rItem, bool bLocaleIndependent) const
void InitFromDoc(ScDocument &rDoc, const ScRange &rRange)
EmptyRowsType maEmptyRows
const ScDPNumGroupInfo * GetNumGroupInfo(tools::Long nDim) const
const GroupItems * GetGroupItems(tools::Long nDim) const
void RemoveReference(ScDPObject *pObj) const
const ScDPObjectSet & GetAllReferences() const
static sal_uInt32 GetLocaleIndependentFormat(SvNumberFormatter &rFormatter, sal_uInt32 nNumFormat)
size_t GetGroupFieldCount() const
ScDPObjectSet maRefObjects
All pivot table objects that references this cache.
SCROW GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty) const
size_t GetFieldCount() const
bool IsRowEmpty(SCROW nRow) const
tools::Long AppendGroupField()
OUString GetDimensionName(std::vector< OUString >::size_type nDim) const
const ScDPItemDataVec & GetDimMemberValues(SCCOL nDim) const
std::vector< ScDPItemData > ScDPItemDataVec
sal_uInt32 GetNumberFormat(tools::Long nDim) const
const IndexArrayType * GetFieldIndexArray(size_t nDim) const
bool InitFromDataBase(DBConnector &rDB)
SCCOL GetDimensionIndex(std::u16string_view sName) const
tools::Long GetColumnCount() const
static OUString GetLocaleIndependentFormattedNumberString(double fValue)
void RemoveCache(const ScDPCache *pCache)
Only to be called from ScDPCache::RemoveReference().
When assigning a string value, you can also assign an interned string whose life-cycle is managed by ...
void SetStringInterned(rtl_uString *pS)
void SetErrorStringInterned(rtl_uString *pS)
void SetValue(double fVal)
OUString GetString() const
bool HasStringData() const
bool IsCaseInsEqual(const ScDPItemData &r) const
GroupValueAttr GetGroupValue() const
static SC_DLLPUBLIC OUString getDateGroupName(sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter *pFormatter, double fStart, double fEnd)
static OUString getNumGroupName(double fValue, const ScDPNumGroupInfo &rInfo, sal_Unicode cDecSep, SvNumberFormatter *pFormatter)
bool IsMatchWholeCell() const
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
SC_DLLPUBLIC bool EnsureFormulaCellResults(const ScRange &rRange, bool bSkipRunning=false)
Make sure all of the formula cells in the specified range have been fully calculated.
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
std::optional< sc::ColumnIterator > GetColumnIterator(SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2) const
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
static SC_DLLPUBLIC CollatorWrapper & GetCollator()
case-insensitive collator
static SC_DLLPUBLIC ::utl::TransliterationWrapper & GetTransliteration()
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
static std::optional< SvtSysLocale > oSysLocale
static SC_DLLPUBLIC const CharClass & getCharClass()
const_iterator begin() const
size_type erase(const Value &x)
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
const OUString & getString() const
bool SearchForward(const OUString &rStr, sal_Int32 *pStart, sal_Int32 *pEnd, css::util::SearchResult *pRes=nullptr)
OUString transliterate(const OUString &rStr, sal_Int32 nStart, sal_Int32 nLen) const
bool isEqual(const OUString &rStr1, const OUString &rStr2) const
#define LANGUAGE_ENGLISH_US
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
constexpr OUStringLiteral aData
void parallelSort(const RandItr aBegin, const RandItr aEnd, Compare aComp=Compare())
std::shared_ptr< osl::Mutex > const & lock()
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
OUString ScResId(TranslateId aId)
TOOLS_DLLPUBLIC SvStream & endl(SvStream &rStr)
IndexArrayType maData
Original source data represented as indices to the unique value list.
ScDPItemDataVec maItems
Unique values in the field, stored in ascending order.
std::unique_ptr< GroupItems > mpGroup
Optional items for grouped field.
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
bool IsQueryByNonEmpty() const
const Item & GetQueryItem() const
bool IsQueryByEmpty() const
utl::TextSearch * GetSearchTextPtr(utl::SearchParam::SearchType eSearchType, bool bCaseSens, bool bWildMatchSel) const
creates pSearchParam and pSearchText if necessary
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
utl::SearchParam::SearchType eSearchType
SC_DLLPUBLIC SCSIZE GetEntryCount() const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
double getRawValue() const
Retrieve a numeric value without modifying the states of any objects in the referenced document store...
OUString getRawString(const ScDocument &rDoc) const
Retrieve a string value without modifying the states of any objects in the referenced document store.
#define SV_COUNTRY_LANGUAGE_OFFSET
NF_DATETIME_ISO_YYYYMMDD_HHMMSS