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
f28aaca9
Kaydet (Commit)
f28aaca9
authored
Ara 01, 2013
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use SAL_MAX_INT64 for max value in NumericFormatter & code format
Change-Id: I30ecb70c7d46ab575c2ffa0f3c9439805cd4f41b
üst
3e2a03a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
field.cxx
vcl/source/control/field.cxx
+10
-10
No files found.
vcl/source/control/field.cxx
Dosyayı görüntüle @
f28aaca9
...
@@ -477,7 +477,7 @@ void NumericFormatter::ImplInit()
...
@@ -477,7 +477,7 @@ void NumericFormatter::ImplInit()
mnFieldValue
=
0
;
mnFieldValue
=
0
;
mnLastValue
=
0
;
mnLastValue
=
0
;
mnMin
=
0
;
mnMin
=
0
;
mnMax
=
0x7FFFFFFFFFFFFFFFLL
;
mnMax
=
SAL_MAX_INT64
;
mnCorrectedValue
=
0
;
mnCorrectedValue
=
0
;
mnDecimalDigits
=
2
;
mnDecimalDigits
=
2
;
mnType
=
FORMAT_NUMERIC
;
mnType
=
FORMAT_NUMERIC
;
...
@@ -562,9 +562,9 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax )
...
@@ -562,9 +562,9 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
NumericFormatter
::
SetUseThousandSep
(
sal_Bool
b
)
void
NumericFormatter
::
SetUseThousandSep
(
sal_Bool
b
Value
)
{
{
mbThousandSep
=
b
;
mbThousandSep
=
b
Value
;
ReformatAll
();
ReformatAll
();
}
}
...
@@ -686,13 +686,13 @@ sal_Int64 NumericFormatter::Denormalize( sal_Int64 nValue ) const
...
@@ -686,13 +686,13 @@ sal_Int64 NumericFormatter::Denormalize( sal_Int64 nValue ) const
if
(
nValue
<
0
)
if
(
nValue
<
0
)
{
{
sal_Int64
nHalf
=
nFactor
/
2
;
sal_Int64
nHalf
=
nFactor
/
2
;
return
((
nValue
-
nHalf
)
/
nFactor
);
return
((
nValue
-
nHalf
)
/
nFactor
);
}
}
else
else
{
{
sal_Int64
nHalf
=
nFactor
/
2
;
sal_Int64
nHalf
=
nFactor
/
2
;
return
((
nValue
+
nHalf
)
/
nFactor
);
return
((
nValue
+
nHalf
)
/
nFactor
);
}
}
}
}
...
@@ -1458,15 +1458,15 @@ double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
...
@@ -1458,15 +1458,15 @@ double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
static
bool
ImplMetricGetValue
(
const
OUString
&
rStr
,
double
&
rValue
,
sal_Int64
nBaseValue
,
static
bool
ImplMetricGetValue
(
const
OUString
&
rStr
,
double
&
rValue
,
sal_Int64
nBaseValue
,
sal_uInt16
nDecDigits
,
const
LocaleDataWrapper
&
rLocaleDataWrapper
,
FieldUnit
eUnit
)
sal_uInt16
nDecDigits
,
const
LocaleDataWrapper
&
rLocaleDataWrapper
,
FieldUnit
eUnit
)
{
{
//
Zahlenwert holen
//
Get value
sal_Int64
nValue
;
sal_Int64
nValue
;
if
(
!
ImplNumericGetValue
(
rStr
,
nValue
,
nDecDigits
,
rLocaleDataWrapper
)
)
if
(
!
ImplNumericGetValue
(
rStr
,
nValue
,
nDecDigits
,
rLocaleDataWrapper
)
)
return
false
;
return
false
;
//
Einheit rausfinden
//
Determine unit
FieldUnit
eEntryUnit
=
ImplMetricGetUnit
(
rStr
);
FieldUnit
eEntryUnit
=
ImplMetricGetUnit
(
rStr
);
//
Einheiten umrechnen
//
Recalculate unit
// caution: conversion to double loses precision
// caution: conversion to double loses precision
rValue
=
MetricField
::
ConvertDoubleValue
(
(
double
)
nValue
,
nBaseValue
,
nDecDigits
,
eEntryUnit
,
eUnit
);
rValue
=
MetricField
::
ConvertDoubleValue
(
(
double
)
nValue
,
nBaseValue
,
nDecDigits
,
eEntryUnit
,
eUnit
);
...
...
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