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
cc94996d
Kaydet (Commit)
cc94996d
authored
Nis 14, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
autofill increment needs a bit more tolerance, fdo#37424
üst
bc16be3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
math.hxx
sal/inc/rtl/math.hxx
+13
-0
table4.cxx
sc/source/core/data/table4.cxx
+2
-2
No files found.
sal/inc/rtl/math.hxx
Dosyayı görüntüle @
cc94996d
...
@@ -263,6 +263,19 @@ inline bool approxEqual(double a, double b)
...
@@ -263,6 +263,19 @@ inline bool approxEqual(double a, double b)
<
((
a
<
0.0
?
-
a
:
a
)
*
(
1.0
/
(
16777216.0
*
16777216.0
)));
<
((
a
<
0.0
?
-
a
:
a
)
*
(
1.0
/
(
16777216.0
*
16777216.0
)));
}
}
/** Test equality of two values with an accuracy defined by nPrec
@attention
approxEqual( value!=0.0, 0.0 ) _never_ yields true.
*/
inline
bool
approxEqual
(
double
a
,
double
b
,
sal_Int16
nPrec
)
{
if
(
a
==
b
)
return
true
;
double
x
=
a
-
b
;
return
(
x
<
0.0
?
-
x
:
x
)
<
((
a
<
0.0
?
-
a
:
a
)
*
(
1.0
/
(
pow
(
2
,
nPrec
))));
}
/** Add two values.
/** Add two values.
If signs differ and the absolute values are equal according to approxEqual()
If signs differ and the absolute values are equal according to approxEqual()
...
...
sc/source/core/data/table4.cxx
Dosyayı görüntüle @
cc94996d
...
@@ -324,7 +324,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -324,7 +324,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
{
nVal2
=
((
ScValueCell
*
)
pCell
)
->
GetValue
();
nVal2
=
((
ScValueCell
*
)
pCell
)
->
GetValue
();
double
nDiff
=
nVal2
-
nVal1
;
double
nDiff
=
nVal2
-
nVal1
;
if
(
!::
rtl
::
math
::
approxEqual
(
nDiff
,
rInc
)
)
if
(
!::
rtl
::
math
::
approxEqual
(
nDiff
,
rInc
,
13
)
)
bVal
=
false
;
bVal
=
false
;
nVal1
=
nVal2
;
nVal1
=
nVal2
;
}
}
...
@@ -395,7 +395,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -395,7 +395,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if
(
nFlag1
==
nFlag2
)
if
(
nFlag1
==
nFlag2
)
{
{
double
nDiff
=
(
double
)
nVal2
-
(
double
)
nVal1
;
double
nDiff
=
(
double
)
nVal2
-
(
double
)
nVal1
;
if
(
!::
rtl
::
math
::
approxEqual
(
nDiff
,
rInc
)
)
if
(
!::
rtl
::
math
::
approxEqual
(
nDiff
,
rInc
,
13
)
)
bVal
=
false
;
bVal
=
false
;
nVal1
=
nVal2
;
nVal1
=
nVal2
;
}
}
...
...
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