LibreOffice Module basic (master) 1
Functions
sbxconv.hxx File Reference
#include "sbxdec.hxx"
#include <basic/sberrors.hxx>
#include <basic/sbx.hxx>
#include <basic/sbxcore.hxx>
#include <basic/sbxdef.hxx>
#include <o3tl/float_int_conversion.hxx>
#include <rtl/math.hxx>
#include <sal/types.h>
Include dependency graph for sbxconv.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename I >
DoubleTo (double f, I min, I max)
 
auto ImpDoubleToChar (double f)
 
auto ImpDoubleToByte (double f)
 
auto ImpDoubleToUShort (double f)
 
auto ImpDoubleToInteger (double f)
 
auto ImpDoubleToULong (double f)
 
auto ImpDoubleToLong (double f)
 
auto ImpDoubleToSalUInt64 (double d)
 
auto ImpDoubleToSalInt64 (double d)
 
void ImpCvtNum (double nNum, short nPrec, OUString &rRes, bool bCoreString=false)
 
ErrCode ImpScan (const OUString &rSrc, double &nVal, SbxDataType &rType, sal_uInt16 *pLen, bool bOnlyIntntl)
 
bool ImpConvStringExt (OUString &rSrc, SbxDataType eTargetType)
 
void ImpGetIntntlSep (sal_Unicode &rcDecimalSep, sal_Unicode &rcThousandSep, sal_Unicode &rcDecimalSepAlt)
 
sal_Int16 ImpGetInteger (const SbxValues *)
 
void ImpPutInteger (SbxValues *, sal_Int16)
 
sal_Int64 ImpGetInt64 (const SbxValues *)
 
void ImpPutInt64 (SbxValues *, sal_Int64)
 
sal_uInt64 ImpGetUInt64 (const SbxValues *)
 
void ImpPutUInt64 (SbxValues *, sal_uInt64)
 
double ImpSalUInt64ToDouble (sal_uInt64 n)
 
sal_Int32 ImpGetLong (const SbxValues *)
 
void ImpPutLong (SbxValues *, sal_Int32)
 
float ImpGetSingle (const SbxValues *)
 
void ImpPutSingle (SbxValues *, float)
 
double ImpGetDouble (const SbxValues *)
 
void ImpPutDouble (SbxValues *, double, bool bCoreString=false)
 
sal_Int64 ImpGetCurrency (const SbxValues *)
 
void ImpPutCurrency (SbxValues *, const sal_Int64)
 
sal_Int64 ImpDoubleToCurrency (double d)
 
double ImpCurrencyToDouble (const sal_Int64 r)
 
SbxDecimalImpCreateDecimal (SbxValues *p)
 
SbxDecimalImpGetDecimal (const SbxValues *p)
 
void ImpPutDecimal (SbxValues *p, SbxDecimal *pDec)
 
double ImpGetDate (const SbxValues *)
 
void ImpPutDate (SbxValues *, double)
 
OUString ImpGetString (const SbxValues *)
 
OUString ImpGetCoreString (const SbxValues *)
 
void ImpPutString (SbxValues *, const OUString *)
 
sal_Unicode ImpGetChar (const SbxValues *)
 
void ImpPutChar (SbxValues *, sal_Unicode)
 
sal_uInt8 ImpGetByte (const SbxValues *)
 
void ImpPutByte (SbxValues *, sal_uInt8)
 
sal_uInt16 ImpGetUShort (const SbxValues *)
 
void ImpPutUShort (SbxValues *, sal_uInt16)
 
sal_uInt32 ImpGetULong (const SbxValues *)
 
void ImpPutULong (SbxValues *, sal_uInt32)
 
enum SbxBOOL ImpGetBool (const SbxValues *)
 
void ImpPutBool (SbxValues *, sal_Int16)
 
SbxArrayStringToByteArray (const OUString &rStr)
 
OUString ByteArrayToString (SbxArray *pArr)
 

Function Documentation

◆ ByteArrayToString()

OUString ByteArrayToString ( SbxArray pArr)

Definition at line 302 of file sbxstr.cxx.

References SbxArray::Count(), SbxArray::Get(), SbxValue::GetByte(), i, and nCount.

Referenced by ImpGetString(), and SbxValue::operator=().

◆ DoubleTo()

template<typename I >
I DoubleTo ( double  f,
min,
max 
)
inline

◆ ImpConvStringExt()

bool ImpConvStringExt ( OUString &  rSrc,
SbxDataType  eTargetType 
)

Definition at line 301 of file sbxscan.cxx.

References ImpGetIntntlSep(), nPos, SbxCURRENCY, SbxDOUBLE, SbxFALSE, SbxSINGLE, and SbxTRUE.

Referenced by SbxValue::PutStringExt().

◆ ImpCreateDecimal()

SbxDecimal * ImpCreateDecimal ( SbxValues p)

◆ ImpCurrencyToDouble()

double ImpCurrencyToDouble ( const sal_Int64  r)
inline

◆ ImpCvtNum()

void ImpCvtNum ( double  nNum,
short  nPrec,
OUString &  rRes,
bool  bCoreString = false 
)

◆ ImpDoubleToByte()

auto ImpDoubleToByte ( double  f)
inline

Definition at line 51 of file sbxconv.hxx.

References SbxMAXBYTE.

Referenced by ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToChar()

auto ImpDoubleToChar ( double  f)
inline

Definition at line 50 of file sbxconv.hxx.

References SbxMAXCHAR, and SbxMINCHAR.

Referenced by ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToCurrency()

sal_Int64 ImpDoubleToCurrency ( double  d)
inline

Definition at line 105 of file sbxconv.hxx.

References CURRENCY_FACTOR, and d.

Referenced by ImpGetCurrency(), ImpPutDate(), ImpPutDecimal(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToInteger()

auto ImpDoubleToInteger ( double  f)
inline

Definition at line 53 of file sbxconv.hxx.

References SbxMAXINT, and SbxMININT.

Referenced by ImpGetInteger(), ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToLong()

auto ImpDoubleToLong ( double  f)
inline

Definition at line 55 of file sbxconv.hxx.

References SbxMAXLNG, and SbxMINLNG.

Referenced by ImpGetLong(), ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToSalInt64()

auto ImpDoubleToSalInt64 ( double  d)
inline

Definition at line 57 of file sbxconv.hxx.

References d, SAL_MAX_INT64, and SAL_MIN_INT64.

Referenced by ImpGetInt64(), ImpPutDate(), ImpPutDecimal(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToSalUInt64()

auto ImpDoubleToSalUInt64 ( double  d)
inline

Definition at line 56 of file sbxconv.hxx.

References d, and SAL_MAX_UINT64.

Referenced by ImpGetUInt64(), ImpPutDate(), ImpPutDecimal(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToULong()

auto ImpDoubleToULong ( double  f)
inline

Definition at line 54 of file sbxconv.hxx.

References SbxMAXULNG.

Referenced by ImpGetULong(), ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpDoubleToUShort()

auto ImpDoubleToUShort ( double  f)
inline

Definition at line 52 of file sbxconv.hxx.

References SbxMAXUINT.

Referenced by ImpGetUShort(), ImpPutDate(), ImpPutDouble(), and ImpPutSingle().

◆ ImpGetBool()

enum SbxBOOL ImpGetBool ( const SbxValues p)

◆ ImpGetByte()

sal_uInt8 ImpGetByte ( const SbxValues p)

◆ ImpGetChar()

sal_Unicode ImpGetChar ( const SbxValues p)

◆ ImpGetCoreString()

OUString ImpGetCoreString ( const SbxValues p)

◆ ImpGetCurrency()

sal_Int64 ImpGetCurrency ( const SbxValues p)

◆ ImpGetDate()

double ImpGetDate ( const SbxValues p)

◆ ImpGetDecimal()

SbxDecimal * ImpGetDecimal ( const SbxValues p)

◆ ImpGetDouble()

double ImpGetDouble ( const SbxValues p)

◆ ImpGetInt64()

sal_Int64 ImpGetInt64 ( const SbxValues p)

◆ ImpGetInteger()

sal_Int16 ImpGetInteger ( const SbxValues p)

◆ ImpGetIntntlSep()

void ImpGetIntntlSep ( sal_Unicode rcDecimalSep,
sal_Unicode rcThousandSep,
sal_Unicode rcDecimalSepAlt 
)

◆ ImpGetLong()

sal_Int32 ImpGetLong ( const SbxValues p)

◆ ImpGetSingle()

float ImpGetSingle ( const SbxValues p)

◆ ImpGetString()

OUString ImpGetString ( const SbxValues p)

◆ ImpGetUInt64()

sal_uInt64 ImpGetUInt64 ( const SbxValues p)

◆ ImpGetULong()

sal_uInt32 ImpGetULong ( const SbxValues p)

◆ ImpGetUShort()

sal_uInt16 ImpGetUShort ( const SbxValues p)

◆ ImpPutBool()

void ImpPutBool ( SbxValues p,
sal_Int16  n 
)

◆ ImpPutByte()

void ImpPutByte ( SbxValues p,
sal_uInt8  n 
)

◆ ImpPutChar()

void ImpPutChar ( SbxValues p,
sal_Unicode  n 
)

◆ ImpPutCurrency()

void ImpPutCurrency ( SbxValues p,
const  sal_Int64 
)

◆ ImpPutDate()

void ImpPutDate ( SbxValues p,
double  n 
)

◆ ImpPutDecimal()

void ImpPutDecimal ( SbxValues p,
SbxDecimal pDec 
)

◆ ImpPutDouble()

void ImpPutDouble ( SbxValues p,
double  n,
bool  bCoreString = false 
)

◆ ImpPutInt64()

void ImpPutInt64 ( SbxValues p,
sal_Int64  n 
)

◆ ImpPutInteger()

void ImpPutInteger ( SbxValues p,
sal_Int16  n 
)

◆ ImpPutLong()

void ImpPutLong ( SbxValues p,
sal_Int32  n 
)

◆ ImpPutSingle()

void ImpPutSingle ( SbxValues p,
float  n 
)

◆ ImpPutString()

void ImpPutString ( SbxValues p,
const OUString *  n 
)

◆ ImpPutUInt64()

void ImpPutUInt64 ( SbxValues p,
sal_uInt64  n 
)

◆ ImpPutULong()

void ImpPutULong ( SbxValues p,
sal_uInt32  n 
)

◆ ImpPutUShort()

void ImpPutUShort ( SbxValues p,
sal_uInt16  n 
)

◆ ImpSalUInt64ToDouble()

double ImpSalUInt64ToDouble ( sal_uInt64  n)

◆ ImpScan()

ErrCode ImpScan ( const OUString &  rSrc,
double &  nVal,
SbxDataType rType,
sal_uInt16 *  pLen,
bool  bOnlyIntntl 
)

◆ StringToByteArray()

SbxArray * StringToByteArray ( const OUString &  rStr)