29#include <rtl/math.hxx>
34template <
typename I>
inline I DoubleTo(
double f, I min, I max)
36 f = rtl::math::round(f);
63extern void ImpCvtNum(
double nNum,
short nPrec, OUString& rRes,
bool bCoreString=
false );
65 (
const OUString& rSrc,
double& nVal,
SbxDataType& rType, sal_uInt16* pLen,
static void SetError(ErrCode)
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, bool > convertsToAtLeast(F value, I min)
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, bool > convertsToAtMost(F value, I max)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
#define ERRCODE_BASIC_MATH_OVERFLOW
void ImpPutDecimal(SbxValues *p, SbxDecimal *pDec)
void ImpPutLong(SbxValues *, sal_Int32)
void ImpPutInt64(SbxValues *, sal_Int64)
sal_Int16 ImpGetInteger(const SbxValues *)
void ImpPutUInt64(SbxValues *, sal_uInt64)
void ImpPutCurrency(SbxValues *, const sal_Int64)
sal_Int64 ImpGetInt64(const SbxValues *)
double ImpGetDouble(const SbxValues *)
double ImpCurrencyToDouble(const sal_Int64 r)
sal_uInt32 ImpGetULong(const SbxValues *)
void ImpPutSingle(SbxValues *, float)
void ImpPutDouble(SbxValues *, double, bool bCoreString=false)
sal_uInt64 ImpGetUInt64(const SbxValues *)
auto ImpDoubleToChar(double f)
auto ImpDoubleToInteger(double f)
void ImpPutChar(SbxValues *, sal_Unicode)
void ImpPutInteger(SbxValues *, sal_Int16)
void ImpPutULong(SbxValues *, sal_uInt32)
sal_Unicode ImpGetChar(const SbxValues *)
SbxArray * StringToByteArray(const OUString &rStr)
sal_uInt16 ImpGetUShort(const SbxValues *)
double ImpGetDate(const SbxValues *)
void ImpPutBool(SbxValues *, sal_Int16)
auto ImpDoubleToSalUInt64(double d)
sal_Int32 ImpGetLong(const SbxValues *)
auto ImpDoubleToLong(double f)
I DoubleTo(double f, I min, I max)
OUString ImpGetString(const SbxValues *)
auto ImpDoubleToUShort(double f)
void ImpPutString(SbxValues *, const OUString *)
float ImpGetSingle(const SbxValues *)
OUString ImpGetCoreString(const SbxValues *)
auto ImpDoubleToULong(double f)
sal_uInt8 ImpGetByte(const SbxValues *)
OUString ByteArrayToString(SbxArray *pArr)
double ImpSalUInt64ToDouble(sal_uInt64 n)
sal_Int64 ImpGetCurrency(const SbxValues *)
bool ImpConvStringExt(OUString &rSrc, SbxDataType eTargetType)
void ImpPutDate(SbxValues *, double)
ErrCode ImpScan(const OUString &rSrc, double &nVal, SbxDataType &rType, sal_uInt16 *pLen, bool bOnlyIntntl)
sal_Int64 ImpDoubleToCurrency(double d)
void ImpPutUShort(SbxValues *, sal_uInt16)
enum SbxBOOL ImpGetBool(const SbxValues *)
void ImpPutByte(SbxValues *, sal_uInt8)
void ImpGetIntntlSep(sal_Unicode &rcDecimalSep, sal_Unicode &rcThousandSep, sal_Unicode &rcDecimalSepAlt)
auto ImpDoubleToSalInt64(double d)
SbxDecimal * ImpCreateDecimal(SbxValues *p)
SbxDecimal * ImpGetDecimal(const SbxValues *p)
auto ImpDoubleToByte(double f)
void ImpCvtNum(double nNum, short nPrec, OUString &rRes, bool bCoreString=false)
constexpr sal_uInt32 SbxMAXULNG
constexpr sal_Int32 SbxMINLNG
constexpr auto SbxMAXCHAR
constexpr sal_uInt16 SbxMAXUINT
constexpr auto SbxMINCHAR
constexpr auto CURRENCY_FACTOR
constexpr auto SbxMAXBYTE