|
LibreOffice Module basic (master) 1
|
#include <sbxform.hxx>
Public Member Functions | |
| SbxBasicFormater (sal_Unicode _cDecPoint, sal_Unicode _cThousandSep, OUString _sOnStrg, OUString _sOffStrg, OUString _sYesStrg, OUString _sNoStrg, OUString _sTrueStrg, OUString _sFalseStrg, OUString _sCurrencyStrg, OUString _sCurrencyFormatStrg) | |
| OUString | BasicFormat (double dNumber, const OUString &sFormatStrg) |
Static Public Member Functions | |
| static OUString | BasicFormatNull (std::u16string_view sFormatStrg) |
| static bool | isBasicFormat (std::u16string_view sFormatStrg) |
Private Member Functions | |
| void | LeftShiftDecimalPoint (OUStringBuffer &sStrg) |
| void | StrRoundDigit (OUStringBuffer &sStrg, short nPos, bool &bOverflow) |
| void | StrRoundDigit (OUStringBuffer &sStrg, short nPos) |
| void | InitScan (double _dNum) |
| void | InitExp (double _dNewExp) |
| short | GetDigitAtPosScan (short nPos, bool &bFoundFirstDigit) |
| short | GetDigitAtPosExpScan (double dNewExponent, short nPos, bool &bFoundFirstDigit) |
| short | GetDigitAtPosExpScan (short nPos, bool &bFoundFirstDigit) |
| void | ScanFormatString (double dNumber, std::u16string_view sFormatStrg, OUString &sReturnStrg, bool bCreateSign) |
Static Private Member Functions | |
| static void | ShiftString (OUStringBuffer &sStrg, sal_uInt16 nStartPos) |
| static void | AppendDigit (OUStringBuffer &sStrg, short nDigit) |
| static void | ParseBack (OUStringBuffer &sStrg, std::u16string_view sFormatStrg, short nFormatPos) |
| static OUString | GetPosFormatString (std::u16string_view sFormatStrg, bool &bFound) |
| static OUString | GetNegFormatString (std::u16string_view sFormatStrg, bool &bFound) |
| static OUString | Get0FormatString (std::u16string_view sFormatStrg, bool &bFound) |
| static OUString | GetNullFormatString (std::u16string_view sFormatStrg, bool &bFound) |
| static void | AnalyseFormatString (std::u16string_view sFormatStrg, short &nNoOfDigitsLeft, short &nNoOfDigitsRight, short &nNoOfOptionalDigitsLeft, short &nNoOfExponentDigits, short &nNoOfOptionalExponentDigits, bool &bPercent, bool &bCurrency, bool &bScientific, bool &bGenerateThousandSeparator, short &nMultipleThousandSeparators) |
Private Attributes | |
| sal_Unicode | cDecPoint |
| sal_Unicode | cThousandSep |
| OUString | sOnStrg |
| OUString | sOffStrg |
| OUString | sYesStrg |
| OUString | sNoStrg |
| OUString | sTrueStrg |
| OUString | sFalseStrg |
| OUString | sCurrencyStrg |
| OUString | sCurrencyFormatStrg |
| OUString | sSciNumStrg |
| OUString | sNumExpStrg |
| double | dNum |
| short | nNumExp |
| short | nExpExp |
Definition at line 72 of file sbxform.hxx.
| SbxBasicFormater::SbxBasicFormater | ( | sal_Unicode | _cDecPoint, |
| sal_Unicode | _cThousandSep, | ||
| OUString | _sOnStrg, | ||
| OUString | _sOffStrg, | ||
| OUString | _sYesStrg, | ||
| OUString | _sNoStrg, | ||
| OUString | _sTrueStrg, | ||
| OUString | _sFalseStrg, | ||
| OUString | _sCurrencyStrg, | ||
| OUString | _sCurrencyFormatStrg | ||
| ) |
Definition at line 97 of file sbxform.cxx.
|
staticprivate |
Definition at line 401 of file sbxform.cxx.
References ch, CREATE_1000SEP_CHAR, i, and nState.
Referenced by ScanFormatString().
|
staticprivate |
Definition at line 132 of file sbxform.cxx.
Referenced by ScanFormatString().
| OUString SbxBasicFormater::BasicFormat | ( | double | dNumber, |
| const OUString & | sFormatStrg | ||
| ) |
Definition at line 857 of file sbxform.cxx.
References BASICFORMAT_CURRENCY, BASICFORMAT_FIXED, BASICFORMAT_GENERALNUMBER, BASICFORMAT_ONOFF, BASICFORMAT_PERCENT, BASICFORMAT_SCIENTIFIC, BASICFORMAT_STANDARD, BASICFORMAT_TRUEFALSE, BASICFORMAT_YESNO, FIXED_FORMAT, GENERALNUMBER_FORMAT, Get0FormatString(), GetNegFormatString(), GetPosFormatString(), PERCENT_FORMAT, ScanFormatString(), SCIENTIFIC_FORMAT, sCurrencyFormatStrg, sFalseStrg, sNoStrg, sOffStrg, sOnStrg, STANDARD_FORMAT, sTrueStrg, and sYesStrg.
|
static |
Definition at line 845 of file sbxform.cxx.
References GetNullFormatString().
Referenced by SbxValue::Format().
|
staticprivate |
Definition at line 343 of file sbxform.cxx.
References FORMAT_SEPARATOR, and nPos.
Referenced by BasicFormat().
|
private |
Definition at line 291 of file sbxform.cxx.
References GetDigitAtPosExpScan(), InitExp(), and nPos.
Referenced by GetDigitAtPosExpScan(), and ScanFormatString().
|
private |
Definition at line 276 of file sbxform.cxx.
References nExpExp, nPos, and sNumExpStrg.
|
private |
Definition at line 253 of file sbxform.cxx.
References abs(), MAX_NO_OF_DIGITS, nNumExp, NO_DIGIT_, nPos, and sSciNumStrg.
Referenced by ScanFormatString().
|
staticprivate |
Definition at line 318 of file sbxform.cxx.
References FORMAT_SEPARATOR, and nPos.
Referenced by BasicFormat().
|
staticprivate |
Definition at line 374 of file sbxform.cxx.
References FORMAT_SEPARATOR, and nPos.
Referenced by BasicFormatNull().
|
staticprivate |
Definition at line 301 of file sbxform.cxx.
References FORMAT_SEPARATOR, and nPos.
Referenced by BasicFormat().
|
private |
Definition at line 244 of file sbxform.cxx.
References get_number_of_digits(), nExpExp, nNumExp, sNumExpStrg, and u.
Referenced by GetDigitAtPosExpScan(), and InitScan().
|
private |
Definition at line 232 of file sbxform.cxx.
References dNum, get_number_of_digits(), InitExp(), MAX_DOUBLE_BUFFER_LENGTH, o3tl::sprintf(), and sSciNumStrg.
Referenced by ScanFormatString().
|
static |
Definition at line 962 of file sbxform.cxx.
References BASICFORMAT_CURRENCY, BASICFORMAT_FIXED, BASICFORMAT_GENERALNUMBER, BASICFORMAT_ONOFF, BASICFORMAT_PERCENT, BASICFORMAT_SCIENTIFIC, BASICFORMAT_STANDARD, BASICFORMAT_TRUEFALSE, BASICFORMAT_YESNO, and o3tl::equalsIgnoreAsciiCase().
Referenced by SbxValue::Format().
|
private |
Definition at line 140 of file sbxform.cxx.
References cDecPoint, i, and nPos.
Referenced by ScanFormatString().
|
staticprivate |
|
private |
Definition at line 516 of file sbxform.cxx.
References AnalyseFormatString(), AppendDigit(), cDecPoint, CREATE_1000SEP_CHAR, cThousandSep, get_number_of_digits(), GetDigitAtPosExpScan(), GetDigitAtPosScan(), i, InitScan(), LeftShiftDecimalPoint(), NO_DIGIT_, nState, ParseBack(), sCurrencyStrg, and StrRoundDigit().
Referenced by BasicFormat().
|
inlinestaticprivate |
Definition at line 127 of file sbxform.cxx.
Referenced by StrRoundDigit().
|
private |
Definition at line 214 of file sbxform.cxx.
References nPos, and StrRoundDigit().
|
private |
Definition at line 160 of file sbxform.cxx.
References cDecPoint, cThousandSep, nPos, ShiftString(), and StrRoundDigit().
Referenced by ScanFormatString(), and StrRoundDigit().
|
private |
Definition at line 131 of file sbxform.hxx.
Referenced by LeftShiftDecimalPoint(), ScanFormatString(), and StrRoundDigit().
|
private |
Definition at line 132 of file sbxform.hxx.
Referenced by ScanFormatString(), and StrRoundDigit().
|
private |
Definition at line 149 of file sbxform.hxx.
Referenced by InitScan().
|
private |
Definition at line 151 of file sbxform.hxx.
Referenced by GetDigitAtPosExpScan(), and InitExp().
|
private |
Definition at line 150 of file sbxform.hxx.
Referenced by GetDigitAtPosScan(), and InitExp().
|
private |
Definition at line 141 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 140 of file sbxform.hxx.
Referenced by ScanFormatString().
|
private |
Definition at line 139 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 137 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 148 of file sbxform.hxx.
Referenced by GetDigitAtPosExpScan(), and InitExp().
|
private |
Definition at line 135 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 134 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 146 of file sbxform.hxx.
Referenced by GetDigitAtPosScan(), and InitScan().
|
private |
Definition at line 138 of file sbxform.hxx.
Referenced by BasicFormat().
|
private |
Definition at line 136 of file sbxform.hxx.
Referenced by BasicFormat().