LibreOffice Module sc (master) 1
|
Functions | |
static bool | SplitString (const OUString &sWhole, OUString &sPrefix, OUString &sSuffix, double &fNum) |
Splits a given string into three parts: the prefix, number string, and the suffix. More... | |
static short | Compare (const OUString &sInput1, const OUString &sInput2, const bool bCaseSens, const ScUserListData *pData, const CollatorWrapper *pCW) |
Naturally compares two given strings. More... | |
|
static |
Naturally compares two given strings.
This is the main function that should be called externally. It returns either 1, 0, or -1 depending on the comparison result of given two strings.
sInput1 | Input string 1 |
sInput2 | Input string 2 |
bCaseSens | Boolean value for case sensitivity |
pData | Pointer to user defined sort list |
pCW | Pointer to collator wrapper for normal string comparison |
Definition at line 162 of file table3.cxx.
References CollatorWrapper::compareString(), pData, and SplitString().
Referenced by ScTable::CompareCell(), and ScTable::IsSorted().
|
static |
Splits a given string into three parts: the prefix, number string, and the suffix.
sWhole | Original string to be split into pieces |
sPrefix | Prefix string that consists of the part before the first number token. If no number was found, sPrefix is unchanged. |
sSuffix | String after the last number token. This may still contain number strings. If no number was found, sSuffix is unchanged. |
fNum | Number converted from the middle number string If no number was found, fNum is unchanged. |
Definition at line 102 of file table3.cxx.
References CharClass::getCharacterType(), ScGlobal::getCharClass(), ScGlobal::getLocaleData(), LocaleDataWrapper::getNumDecimalSep(), nPos, nType, CharClass::parsePredefinedToken(), SAL_WARN, sPrefix, and sSuffix.
Referenced by Compare().