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
a743b7ca
Kaydet (Commit)
a743b7ca
authored
Tem 04, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ASan: value nan is outside the range of representable values of type 'int'
Change-Id: Icd0a383ddec97c1129a3937fbcd8c9a9e61ff8eb
üst
66576fc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
interpr4.cxx
sc/source/core/tool/interpr4.cxx
+17
-1
No files found.
sc/source/core/tool/interpr4.cxx
Dosyayı görüntüle @
a743b7ca
...
...
@@ -22,6 +22,7 @@
#include "interpre.hxx"
#include <rangelst.hxx>
#include <rtl/math.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
...
...
@@ -2096,6 +2097,11 @@ double ScInterpreter::GetDoubleWithDefault(double nDefault)
sal_Int32
ScInterpreter
::
GetInt32
()
{
double
fVal
=
GetDouble
();
if
(
rtl
::
math
::
isNan
(
fVal
))
{
SetError
(
errIllegalArgument
);
return
SAL_MAX_INT32
;
}
if
(
fVal
>
0.0
)
{
fVal
=
rtl
::
math
::
approxFloor
(
fVal
);
...
...
@@ -2120,6 +2126,11 @@ sal_Int32 ScInterpreter::GetInt32()
sal_Int32
ScInterpreter
::
GetInt32WithDefault
(
sal_Int32
nDefault
)
{
double
fVal
=
GetDoubleWithDefault
(
nDefault
);
if
(
rtl
::
math
::
isNan
(
fVal
))
{
SetError
(
errIllegalArgument
);
return
SAL_MAX_INT32
;
}
if
(
fVal
>
0.0
)
{
fVal
=
rtl
::
math
::
approxFloor
(
fVal
);
...
...
@@ -2144,6 +2155,11 @@ sal_Int32 ScInterpreter::GetInt32WithDefault( sal_Int32 nDefault )
sal_Int16
ScInterpreter
::
GetInt16
()
{
double
fVal
=
GetDouble
();
if
(
rtl
::
math
::
isNan
(
fVal
))
{
SetError
(
errIllegalArgument
);
return
SAL_MAX_INT16
;
}
if
(
fVal
>
0.0
)
{
fVal
=
rtl
::
math
::
approxFloor
(
fVal
);
...
...
@@ -2168,7 +2184,7 @@ sal_Int16 ScInterpreter::GetInt16()
sal_uInt32
ScInterpreter
::
GetUInt32
()
{
double
fVal
=
rtl
::
math
::
approxFloor
(
GetDouble
());
if
(
fVal
<
0.0
||
fVal
>
SAL_MAX_UINT32
)
if
(
rtl
::
math
::
isNan
(
fVal
)
||
fVal
<
0.0
||
fVal
>
SAL_MAX_UINT32
)
{
SetError
(
errIllegalArgument
);
return
SAL_MAX_UINT32
;
...
...
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