Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
cfa6f852
Kaydet (Commit)
cfa6f852
authored
Eyl 04, 2012
tarafından
Takeshi Abe
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool to bool
Change-Id: Iebed1c159606ab695b049032da5a3509e468fb91
üst
1146b889
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
30 deletions
+30
-30
sbxvar.hxx
basic/inc/basic/sbxvar.hxx
+2
-2
methods1.cxx
basic/source/runtime/methods1.cxx
+1
-1
sbxconv.hxx
basic/source/sbx/sbxconv.hxx
+4
-4
sbxdbl.cxx
basic/source/sbx/sbxdbl.cxx
+1
-1
sbxscan.cxx
basic/source/sbx/sbxscan.cxx
+16
-16
sbxstr.cxx
basic/source/sbx/sbxstr.cxx
+2
-2
sbxvalue.cxx
basic/source/sbx/sbxvalue.cxx
+4
-4
No files found.
basic/inc/basic/sbxvar.hxx
Dosyayı görüntüle @
cfa6f852
...
@@ -134,7 +134,7 @@ public:
...
@@ -134,7 +134,7 @@ public:
sal_Bool
IspChar
()
const
{
return
sal_Bool
(
GetType
()
==
SbxLPSTR
);
}
sal_Bool
IspChar
()
const
{
return
sal_Bool
(
GetType
()
==
SbxLPSTR
);
}
sal_Bool
IsNumeric
()
const
;
sal_Bool
IsNumeric
()
const
;
sal_Bool
IsNumericRTL
()
const
;
// #41692 Interface for Basic
sal_Bool
IsNumericRTL
()
const
;
// #41692 Interface for Basic
sal_Bool
ImpIsNumeric
(
sal_B
ool
bOnlyIntntl
)
const
;
// Implementation
sal_Bool
ImpIsNumeric
(
b
ool
bOnlyIntntl
)
const
;
// Implementation
virtual
SbxClassType
GetClass
()
const
;
virtual
SbxClassType
GetClass
()
const
;
virtual
SbxDataType
GetType
()
const
;
virtual
SbxDataType
GetType
()
const
;
...
@@ -194,7 +194,7 @@ public:
...
@@ -194,7 +194,7 @@ public:
sal_Bool
fillAutomationDecimal
(
com
::
sun
::
star
::
bridge
::
oleautomation
::
Decimal
&
rAutomationDec
);
sal_Bool
fillAutomationDecimal
(
com
::
sun
::
star
::
bridge
::
oleautomation
::
Decimal
&
rAutomationDec
);
sal_Bool
PutCurrency
(
const
sal_Int64
&
);
sal_Bool
PutCurrency
(
const
sal_Int64
&
);
// Interface for CDbl in Basic
// Interface for CDbl in Basic
static
SbxError
ScanNumIntnl
(
const
String
&
rSrc
,
double
&
nVal
,
sal_Bool
bSingle
=
sal_F
alse
);
static
SbxError
ScanNumIntnl
(
const
String
&
rSrc
,
double
&
nVal
,
bool
bSingle
=
f
alse
);
sal_Bool
PutObject
(
SbxBase
*
);
sal_Bool
PutObject
(
SbxBase
*
);
...
...
basic/source/runtime/methods1.cxx
Dosyayı görüntüle @
cfa6f852
...
@@ -384,7 +384,7 @@ RTLFUNC(CSng) // JSM
...
@@ -384,7 +384,7 @@ RTLFUNC(CSng) // JSM
// #41690
// #41690
double
dVal
=
0.0
;
double
dVal
=
0.0
;
String
aScanStr
=
pSbxVariable
->
GetString
();
String
aScanStr
=
pSbxVariable
->
GetString
();
SbError
Error
=
SbxValue
::
ScanNumIntnl
(
aScanStr
,
dVal
,
/*bSingle=*/
sal_T
rue
);
SbError
Error
=
SbxValue
::
ScanNumIntnl
(
aScanStr
,
dVal
,
/*bSingle=*/
t
rue
);
if
(
SbxBase
::
GetError
()
==
SbxERR_OK
&&
Error
!=
SbxERR_OK
)
if
(
SbxBase
::
GetError
()
==
SbxERR_OK
&&
Error
!=
SbxERR_OK
)
StarBASIC
::
Error
(
Error
);
StarBASIC
::
Error
(
Error
);
nVal
=
(
float
)
dVal
;
nVal
=
(
float
)
dVal
;
...
...
basic/source/sbx/sbxconv.hxx
Dosyayı görüntüle @
cfa6f852
...
@@ -25,13 +25,13 @@
...
@@ -25,13 +25,13 @@
class
SbxArray
;
class
SbxArray
;
// SBXSCAN.CXX
// SBXSCAN.CXX
extern
void
ImpCvtNum
(
double
nNum
,
short
nPrec
,
::
rtl
::
OUString
&
rRes
,
sal_Bool
bCoreString
=
sal_F
alse
);
extern
void
ImpCvtNum
(
double
nNum
,
short
nPrec
,
::
rtl
::
OUString
&
rRes
,
bool
bCoreString
=
f
alse
);
extern
SbxError
ImpScan
extern
SbxError
ImpScan
(
const
::
rtl
::
OUString
&
rSrc
,
double
&
nVal
,
SbxDataType
&
rType
,
sal_uInt16
*
pLen
,
(
const
::
rtl
::
OUString
&
rSrc
,
double
&
nVal
,
SbxDataType
&
rType
,
sal_uInt16
*
pLen
,
sal_Bool
bAllowIntntl
=
sal_False
,
sal_Bool
bOnlyIntntl
=
sal_F
alse
);
bool
bAllowIntntl
=
false
,
bool
bOnlyIntntl
=
f
alse
);
// with advanced evaluation (International, "TRUE"/"FALSE")
// with advanced evaluation (International, "TRUE"/"FALSE")
extern
sal_B
ool
ImpConvStringExt
(
::
rtl
::
OUString
&
rSrc
,
SbxDataType
eTargetType
);
extern
b
ool
ImpConvStringExt
(
::
rtl
::
OUString
&
rSrc
,
SbxDataType
eTargetType
);
void
ImpGetIntntlSep
(
sal_Unicode
&
rcDecimalSep
,
sal_Unicode
&
rcThousandSep
);
void
ImpGetIntntlSep
(
sal_Unicode
&
rcDecimalSep
,
sal_Unicode
&
rcThousandSep
);
...
@@ -64,7 +64,7 @@ void ImpPutSingle( SbxValues*, float );
...
@@ -64,7 +64,7 @@ void ImpPutSingle( SbxValues*, float );
// SBXDBL.CXX
// SBXDBL.CXX
double
ImpGetDouble
(
const
SbxValues
*
);
double
ImpGetDouble
(
const
SbxValues
*
);
void
ImpPutDouble
(
SbxValues
*
,
double
,
sal_Bool
bCoreString
=
sal_F
alse
);
void
ImpPutDouble
(
SbxValues
*
,
double
,
bool
bCoreString
=
f
alse
);
// SBXCURR.CXX
// SBXCURR.CXX
...
...
basic/source/sbx/sbxdbl.cxx
Dosyayı görüntüle @
cfa6f852
...
@@ -134,7 +134,7 @@ double ImpGetDouble( const SbxValues* p )
...
@@ -134,7 +134,7 @@ double ImpGetDouble( const SbxValues* p )
return
nRes
;
return
nRes
;
}
}
void
ImpPutDouble
(
SbxValues
*
p
,
double
n
,
sal_B
ool
bCoreString
)
void
ImpPutDouble
(
SbxValues
*
p
,
double
n
,
b
ool
bCoreString
)
{
{
SbxValues
aTmp
;
SbxValues
aTmp
;
start:
start:
...
...
basic/source/sbx/sbxscan.cxx
Dosyayı görüntüle @
cfa6f852
...
@@ -59,7 +59,7 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep )
...
@@ -59,7 +59,7 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep )
// conversion error if data type is fixed and it doesn't fit
// conversion error if data type is fixed and it doesn't fit
SbxError
ImpScan
(
const
::
rtl
::
OUString
&
rWSrc
,
double
&
nVal
,
SbxDataType
&
rType
,
SbxError
ImpScan
(
const
::
rtl
::
OUString
&
rWSrc
,
double
&
nVal
,
SbxDataType
&
rType
,
sal_uInt16
*
pLen
,
sal_Bool
bAllowIntntl
,
sal_B
ool
bOnlyIntntl
)
sal_uInt16
*
pLen
,
bool
bAllowIntntl
,
b
ool
bOnlyIntntl
)
{
{
::
rtl
::
OString
aBStr
(
::
rtl
::
OUStringToOString
(
rWSrc
,
RTL_TEXTENCODING_ASCII_US
)
);
::
rtl
::
OString
aBStr
(
::
rtl
::
OUStringToOString
(
rWSrc
,
RTL_TEXTENCODING_ASCII_US
)
);
...
@@ -228,12 +228,12 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
...
@@ -228,12 +228,12 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType
}
}
// port for CDbl in the Basic
// port for CDbl in the Basic
SbxError
SbxValue
::
ScanNumIntnl
(
const
String
&
rSrc
,
double
&
nVal
,
sal_B
ool
bSingle
)
SbxError
SbxValue
::
ScanNumIntnl
(
const
String
&
rSrc
,
double
&
nVal
,
b
ool
bSingle
)
{
{
SbxDataType
t
;
SbxDataType
t
;
sal_uInt16
nLen
=
0
;
sal_uInt16
nLen
=
0
;
SbxError
nRetError
=
ImpScan
(
rSrc
,
nVal
,
t
,
&
nLen
,
SbxError
nRetError
=
ImpScan
(
rSrc
,
nVal
,
t
,
&
nLen
,
/*bAllowIntntl*/
sal_False
,
/*bOnlyIntntl*/
sal_T
rue
);
/*bAllowIntntl*/
false
,
/*bOnlyIntntl*/
t
rue
);
// read completely?
// read completely?
if
(
nRetError
==
SbxERR_OK
&&
nLen
!=
rSrc
.
Len
()
)
if
(
nRetError
==
SbxERR_OK
&&
nLen
!=
rSrc
.
Len
()
)
nRetError
=
SbxERR_CONVERSION
;
nRetError
=
SbxERR_CONVERSION
;
...
@@ -373,7 +373,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
...
@@ -373,7 +373,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth,
#pragma warning(disable: 4748) // "... because optimizations are disabled ..."
#pragma warning(disable: 4748) // "... because optimizations are disabled ..."
#endif
#endif
void
ImpCvtNum
(
double
nNum
,
short
nPrec
,
::
rtl
::
OUString
&
rRes
,
sal_B
ool
bCoreString
)
void
ImpCvtNum
(
double
nNum
,
short
nPrec
,
::
rtl
::
OUString
&
rRes
,
b
ool
bCoreString
)
{
{
char
*
q
;
char
*
q
;
char
cBuf
[
40
],
*
p
=
cBuf
;
char
cBuf
[
40
],
*
p
=
cBuf
;
...
@@ -404,9 +404,9 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreS
...
@@ -404,9 +404,9 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreS
#pragma optimize( "", on )
#pragma optimize( "", on )
#endif
#endif
sal_B
ool
ImpConvStringExt
(
::
rtl
::
OUString
&
rSrc
,
SbxDataType
eTargetType
)
b
ool
ImpConvStringExt
(
::
rtl
::
OUString
&
rSrc
,
SbxDataType
eTargetType
)
{
{
sal_Bool
bChanged
=
sal_F
alse
;
bool
bChanged
=
f
alse
;
::
rtl
::
OUString
aNewString
;
::
rtl
::
OUString
aNewString
;
// only special cases are handled, nothing on default
// only special cases are handled, nothing on default
...
@@ -430,7 +430,7 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType )
...
@@ -430,7 +430,7 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType )
{
{
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
aNewString
.
getStr
();
sal_Unicode
*
pStr
=
(
sal_Unicode
*
)
aNewString
.
getStr
();
pStr
[
nPos
]
=
(
sal_Unicode
)
'.'
;
pStr
[
nPos
]
=
(
sal_Unicode
)
'.'
;
bChanged
=
sal_T
rue
;
bChanged
=
t
rue
;
}
}
}
}
break
;
break
;
...
@@ -442,13 +442,13 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType )
...
@@ -442,13 +442,13 @@ sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType )
if
(
rSrc
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"true"
))
)
if
(
rSrc
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"true"
))
)
{
{
aNewString
=
::
rtl
::
OUString
::
valueOf
(
(
sal_Int32
)
SbxTRUE
);
aNewString
=
::
rtl
::
OUString
::
valueOf
(
(
sal_Int32
)
SbxTRUE
);
bChanged
=
sal_T
rue
;
bChanged
=
t
rue
;
}
}
else
else
if
(
rSrc
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"false"
))
)
if
(
rSrc
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"false"
))
)
{
{
aNewString
=
::
rtl
::
OUString
::
valueOf
(
(
sal_Int32
)
SbxFALSE
);
aNewString
=
::
rtl
::
OUString
::
valueOf
(
(
sal_Int32
)
SbxFALSE
);
bChanged
=
sal_T
rue
;
bChanged
=
t
rue
;
}
}
break
;
break
;
}
}
...
@@ -478,9 +478,9 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
...
@@ -478,9 +478,9 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
short
nWidth
=
0
;
// number range completely
short
nWidth
=
0
;
// number range completely
short
nLen
;
// length of converted number
short
nLen
;
// length of converted number
bool
bPoint
=
false
;
// true: with 1000 seperators
bool
bPoint
=
false
;
// true: with 1000 seperators
sal_Bool
bTrail
=
sal_False
;
// sal_T
rue, if following minus
bool
bTrail
=
false
;
// t
rue, if following minus
sal_Bool
bSign
=
sal_False
;
// sal_T
rue: always with leading sign
bool
bSign
=
false
;
// t
rue: always with leading sign
sal_Bool
bNeg
=
sal_False
;
// sal_T
rue: number is negative
bool
bNeg
=
false
;
// t
rue: number is negative
char
cBuf
[
1024
];
// number buffer
char
cBuf
[
1024
];
// number buffer
char
*
p
;
char
*
p
;
const
char
*
pFmt
=
rFmt
;
const
char
*
pFmt
=
rFmt
;
...
@@ -496,7 +496,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
...
@@ -496,7 +496,7 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
case
0
:
case
0
:
break
;
break
;
case
'+'
:
case
'+'
:
bSign
=
sal_T
rue
;
nWidth
++
;
break
;
bSign
=
t
rue
;
nWidth
++
;
break
;
case
'*'
:
case
'*'
:
nWidth
++
;
cFill
=
'*'
;
nWidth
++
;
cFill
=
'*'
;
if
(
*
pFmt
==
'$'
)
nWidth
++
,
pFmt
++
,
cPre
=
'$'
;
if
(
*
pFmt
==
'$'
)
nWidth
++
,
pFmt
++
,
cPre
=
'$'
;
...
@@ -529,11 +529,11 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
...
@@ -529,11 +529,11 @@ static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rW
pFmt
++
,
nExpDig
++
,
nWidth
++
;
pFmt
++
,
nExpDig
++
,
nWidth
++
;
// following minus
// following minus
if
(
!
bSign
&&
*
pFmt
==
'-'
)
if
(
!
bSign
&&
*
pFmt
==
'-'
)
pFmt
++
,
bTrail
=
sal_T
rue
;
pFmt
++
,
bTrail
=
t
rue
;
// convert number
// convert number
if
(
nPrec
>
15
)
nPrec
=
15
;
if
(
nPrec
>
15
)
nPrec
=
15
;
if
(
nNum
<
0.0
)
nNum
=
-
nNum
,
bNeg
=
sal_T
rue
;
if
(
nNum
<
0.0
)
nNum
=
-
nNum
,
bNeg
=
t
rue
;
p
=
cBuf
;
p
=
cBuf
;
if
(
bSign
)
*
p
++
=
bNeg
?
'-'
:
'+'
;
if
(
bSign
)
*
p
++
=
bNeg
?
'-'
:
'+'
;
myftoa
(
nNum
,
p
,
nPrec
,
nExpDig
,
bPoint
,
false
);
myftoa
(
nNum
,
p
,
nPrec
,
nExpDig
,
bPoint
,
false
);
...
@@ -922,7 +922,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
...
@@ -922,7 +922,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
// #45355 converting if numeric
// #45355 converting if numeric
if
(
IsNumericRTL
()
)
if
(
IsNumericRTL
()
)
{
{
ScanNumIntnl
(
GetString
(),
d
,
/*bSingle*/
sal_F
alse
);
ScanNumIntnl
(
GetString
(),
d
,
/*bSingle*/
f
alse
);
goto
cvt2
;
goto
cvt2
;
}
}
else
else
...
...
basic/source/sbx/sbxstr.cxx
Dosyayı görüntüle @
cfa6f852
...
@@ -138,9 +138,9 @@
...
@@ -138,9 +138,9 @@
aTmp
.
eType
=
SbxSTRING
;
aTmp
.
eType
=
SbxSTRING
;
aTmp
.
pOUString
=
&
aRes
;
aTmp
.
pOUString
=
&
aRes
;
if
(
p
->
eType
==
SbxDOUBLE
)
if
(
p
->
eType
==
SbxDOUBLE
)
ImpPutDouble
(
&
aTmp
,
p
->
nDouble
,
sal_T
rue
);
// true = bCoreString
ImpPutDouble
(
&
aTmp
,
p
->
nDouble
,
t
rue
);
// true = bCoreString
else
else
ImpPutDouble
(
&
aTmp
,
*
p
->
pDouble
,
sal_T
rue
);
// true = bCoreString
ImpPutDouble
(
&
aTmp
,
*
p
->
pDouble
,
t
rue
);
// true = bCoreString
return
aRes
;
return
aRes
;
}
}
else
else
...
...
basic/source/sbx/sbxvalue.cxx
Dosyayı görüntüle @
cfa6f852
...
@@ -724,15 +724,15 @@ sal_Bool SbxValue::IsFixed() const
...
@@ -724,15 +724,15 @@ sal_Bool SbxValue::IsFixed() const
// #41692, implement it for RTL and Basic-Core seperably
// #41692, implement it for RTL and Basic-Core seperably
sal_Bool
SbxValue
::
IsNumeric
()
const
sal_Bool
SbxValue
::
IsNumeric
()
const
{
{
return
ImpIsNumeric
(
/*bOnlyIntntl*/
sal_F
alse
);
return
ImpIsNumeric
(
/*bOnlyIntntl*/
f
alse
);
}
}
sal_Bool
SbxValue
::
IsNumericRTL
()
const
sal_Bool
SbxValue
::
IsNumericRTL
()
const
{
{
return
ImpIsNumeric
(
/*bOnlyIntntl*/
sal_T
rue
);
return
ImpIsNumeric
(
/*bOnlyIntntl*/
t
rue
);
}
}
sal_Bool
SbxValue
::
ImpIsNumeric
(
sal_B
ool
bOnlyIntntl
)
const
sal_Bool
SbxValue
::
ImpIsNumeric
(
b
ool
bOnlyIntntl
)
const
{
{
if
(
!
CanRead
()
)
if
(
!
CanRead
()
)
...
@@ -751,7 +751,7 @@ sal_Bool SbxValue::ImpIsNumeric( sal_Bool bOnlyIntntl ) const
...
@@ -751,7 +751,7 @@ sal_Bool SbxValue::ImpIsNumeric( sal_Bool bOnlyIntntl ) const
double
n
;
double
n
;
SbxDataType
t2
;
SbxDataType
t2
;
sal_uInt16
nLen
=
0
;
sal_uInt16
nLen
=
0
;
if
(
ImpScan
(
s
,
n
,
t2
,
&
nLen
,
/*bAllowIntntl*/
sal_F
alse
,
bOnlyIntntl
)
==
SbxERR_OK
)
if
(
ImpScan
(
s
,
n
,
t2
,
&
nLen
,
/*bAllowIntntl*/
f
alse
,
bOnlyIntntl
)
==
SbxERR_OK
)
return
sal_Bool
(
nLen
==
s
.
getLength
()
);
return
sal_Bool
(
nLen
==
s
.
getLength
()
);
}
}
return
sal_False
;
return
sal_False
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment