28#include <com/sun/star/i18n/Calendar2.hpp>
64 [&rSubStr](
const SubStr& item) { return item.maReal == rSubStr; });
76 [&aUpStr](
const SubStr& item) { return item.maUpper == aUpStr; });
95 sal_uInt16 nIndex1, nIndex2;
97 bool bFound1 =
GetSubIndex(rSubStr1, nIndex1, bMatchCase);
98 bool bFound2 =
GetSubIndex(rSubStr2, nIndex2, bMatchCase);
103 if (nIndex1 < nIndex2)
105 else if (nIndex1 > nIndex2)
121 sal_uInt16 nIndex1, nIndex2;
123 bool bFound1 =
GetSubIndex(rSubStr1, nIndex1, bMatchCase);
124 bool bFound2 =
GetSubIndex(rSubStr2, nIndex2, bMatchCase);
129 if (nIndex1 < nIndex2)
131 else if (nIndex1 > nIndex2)
156 if (
const auto& xCal = rCalendar.Days; xCal.hasElements())
158 OUStringBuffer aDayShortBuf(32), aDayLongBuf(64);
160 sal_Int32 nLen = xCal.getLength();
161 sal_Int16 nStart = sal::static_int_cast<sal_Int16>(nLen);
164 if (xCal[--nStart].
ID == rCalendar.StartOfWeek)
167 sal_Int16 nLast = sal::static_int_cast<sal_Int16>( (nStart + nLen - 1) % nLen );
168 for (
i = nStart;
i != nLast;
i = (
i+1) % nLen)
170 aDayShortBuf.append(xCal[
i].AbbrevName);
175 aDayShortBuf.append(xCal[
i].AbbrevName);
178 OUString aDayShort = aDayShortBuf.makeStringAndClear();
179 OUString aDayLong = aDayLongBuf.makeStringAndClear();
187 if (
const auto& xCal = rCalendar.Months; xCal.hasElements())
189 OUStringBuffer aMonthShortBuf(128), aMonthLongBuf(128);
191 sal_Int32 nLen = xCal.getLength() - 1;
192 for (
i = 0;
i < nLen;
i++)
194 aMonthShortBuf.append(xCal[
i].AbbrevName);
199 aMonthShortBuf.append(xCal[
i].AbbrevName);
202 OUString aMonthShort = aMonthShortBuf.makeStringAndClear();
203 OUString aMonthLong = aMonthLongBuf.makeStringAndClear();
217 bool bMatchCase =
false;
219 for (
const auto& rxItem :
maData)
221 if (rxItem.GetSubIndex(rSubStr,
nIndex, bMatchCase))
225 if (!pFirstCaseInsensitive)
226 pFirstCaseInsensitive = &rxItem;
230 return pFirstCaseInsensitive;
237 return lhs.GetString() == rhs.GetString();
245 { return pData.GetString() == rStr; } );
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
static constexpr sal_Unicode cListDelimiter
::utl::TransliterationWrapper & GetCaseTransliteration()
static SC_DLLPUBLIC ::utl::TransliterationWrapper & GetTransliteration()
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
static SC_DLLPUBLIC const CharClass & getCharClass()
Stores individual user-defined sort list.
OUString GetSubStr(sal_uInt16 nIndex) const
sal_Int32 Compare(const OUString &rSubStr1, const OUString &rSubStr2) const
sal_Int32 ICompare(const OUString &rSubStr1, const OUString &rSubStr2) const
SAL_DLLPRIVATE void InitTokens()
std::vector< SubStr > maSubStrings
void SetString(const OUString &rStr)
bool GetSubIndex(const OUString &rSubStr, sal_uInt16 &rIndex, bool &bMatchCase) const
ScUserListData(OUString aStr)
Collection of user-defined sort lists.
ScUserList(bool initDefault=true)
void emplace_back(Args &&... args)
bool HasEntry(std::u16string_view rStr) const
If the list in rStr is already inserted.
bool operator==(const ScUserList &r) const
const ScUserListData * GetData(const OUString &rSubStr) const
sal_Int32 compareString(const OUString &rStr1, const OUString &rStr2) const
std::unique_ptr< sal_Int32[]> pData
PyRef getCharClass(const Runtime &)
const sal_Unicode cDelimiter