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
cdb214c3
Kaydet (Commit)
cdb214c3
authored
Şub 24, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove long-unnecessary cruft
Change-Id: Id770188f8c03cade5fd4f97295bb0933968dee71
üst
167569bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
19 deletions
+10
-19
zformat.cxx
svl/source/numbers/zformat.cxx
+10
-19
No files found.
svl/source/numbers/zformat.cxx
Dosyayı görüntüle @
cdb214c3
...
...
@@ -27,7 +27,6 @@
#include <osl/diagnose.h>
#include <i18nlangtag/mslangid.hxx>
#include <rtl/math.hxx>
#include <rtl/instance.hxx>
#include <unotools/charclass.hxx>
#include <unotools/calendarwrapper.hxx>
#include <unotools/nativenumberwrapper.hxx>
...
...
@@ -50,13 +49,8 @@
using
namespace
svt
;
namespace
{
struct
Gregorian
:
public
rtl
::
StaticWithInit
<
const
OUString
,
Gregorian
>
{
const
OUString
operator
()
()
{
return
OUString
(
"gregorian"
);
}
};
char
const
GREGORIAN
[]
=
"gregorian"
;
const
sal_uInt16
UPPER_PRECISION
=
300
;
// entirely arbitrary...
const
double
EXP_LOWER_BOUND
=
1.0E-4
;
// prefer scientific notation below this value.
...
...
@@ -3035,7 +3029,7 @@ sal_Int32 SvNumberformat::ImpUseMonthCase( int & io_nState, const ImpSvNumFor& r
bool
SvNumberformat
::
ImpIsOtherCalendar
(
const
ImpSvNumFor
&
rNumFor
)
const
{
if
(
GetCal
().
getUniqueID
()
!=
G
regorian
::
get
()
)
if
(
GetCal
().
getUniqueID
()
!=
G
REGORIAN
)
{
return
false
;
}
...
...
@@ -3064,8 +3058,7 @@ void SvNumberformat::SwitchToOtherCalendar( OUString& rOrgCalendar,
double
&
fOrgDateTime
)
const
{
CalendarWrapper
&
rCal
=
GetCal
();
const
OUString
&
rGregorian
=
Gregorian
::
get
();
if
(
rCal
.
getUniqueID
()
==
rGregorian
)
if
(
rCal
.
getUniqueID
()
==
GREGORIAN
)
{
using
namespace
::
com
::
sun
::
star
::
i18n
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
xCals
=
rCal
.
getAllCalendars
(
...
...
@@ -3075,7 +3068,7 @@ void SvNumberformat::SwitchToOtherCalendar( OUString& rOrgCalendar,
{
for
(
sal_Int32
j
=
0
;
j
<
nCnt
;
j
++
)
{
if
(
xCals
[
j
]
!=
rGregorian
)
if
(
xCals
[
j
]
!=
GREGORIAN
)
{
if
(
!
rOrgCalendar
.
getLength
()
)
{
...
...
@@ -3095,10 +3088,9 @@ void SvNumberformat::SwitchToGregorianCalendar( const OUString& rOrgCalendar,
double
fOrgDateTime
)
const
{
CalendarWrapper
&
rCal
=
GetCal
();
const
OUString
&
rGregorian
=
Gregorian
::
get
();
if
(
rOrgCalendar
.
getLength
()
&&
rCal
.
getUniqueID
()
!=
rGregorian
)
if
(
rOrgCalendar
.
getLength
()
&&
rCal
.
getUniqueID
()
!=
GREGORIAN
)
{
rCal
.
loadCalendar
(
rGregorian
,
rLoc
().
getLanguageTag
().
getLocale
()
);
rCal
.
loadCalendar
(
GREGORIAN
,
rLoc
().
getLanguageTag
().
getLocale
()
);
rCal
.
setDateTime
(
fOrgDateTime
);
}
}
...
...
@@ -3107,8 +3099,7 @@ bool SvNumberformat::ImpFallBackToGregorianCalendar( OUString& rOrgCalendar, dou
{
using
namespace
::
com
::
sun
::
star
::
i18n
;
CalendarWrapper
&
rCal
=
GetCal
();
const
OUString
&
rGregorian
=
Gregorian
::
get
();
if
(
rCal
.
getUniqueID
()
!=
rGregorian
)
if
(
rCal
.
getUniqueID
()
!=
GREGORIAN
)
{
sal_Int16
nVal
=
rCal
.
getValue
(
CalendarFieldIndex
::
ERA
);
if
(
nVal
==
0
&&
rCal
.
getLoadedCalendar
().
Eras
[
0
].
ID
==
"Dummy"
)
...
...
@@ -3118,11 +3109,11 @@ bool SvNumberformat::ImpFallBackToGregorianCalendar( OUString& rOrgCalendar, dou
rOrgCalendar
=
rCal
.
getUniqueID
();
fOrgDateTime
=
rCal
.
getDateTime
();
}
else
if
(
rOrgCalendar
==
rGregorian
)
else
if
(
rOrgCalendar
==
GREGORIAN
)
{
rOrgCalendar
.
clear
();
}
rCal
.
loadCalendar
(
rGregorian
,
rLoc
().
getLanguageTag
().
getLocale
()
);
rCal
.
loadCalendar
(
GREGORIAN
,
rLoc
().
getLanguageTag
().
getLocale
()
);
rCal
.
setDateTime
(
fOrgDateTime
);
return
true
;
}
...
...
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