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
43624d93
Kaydet (Commit)
43624d93
authored
May 20, 2014
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
resolved fdo#34724 Jan1 or 1Jan without separating character is not date
Change-Id: I2cf02a26b81fa634c842df455de669f1c60241bc
üst
d2a19aad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
26 deletions
+59
-26
zforfind.cxx
svl/source/numbers/zforfind.cxx
+59
-26
No files found.
svl/source/numbers/zforfind.cxx
Dosyayı görüntüle @
43624d93
...
...
@@ -2054,16 +2054,25 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
}
else
{
nMonth
=
GetMonth
(
rString
,
nPos
);
if
(
nMonth
)
// month (Jan 1)?
const
sal_Int32
nMonthStart
=
nPos
;
short
nTempMonth
=
GetMonth
(
rString
,
nPos
);
if
(
nTempMonth
)
// month (Jan 1)?
{
eScannedType
=
NUMBERFORMAT_DATE
;
// !!! it IS a date !!!
nMonthPos
=
1
;
// month at the beginning
if
(
nMonth
<
0
)
if
(
nPos
<
rString
.
getLength
())
// Jan1 without separator is not a date
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
eScannedType
=
NUMBERFORMAT_DATE
;
// !!! it IS a date !!!
nMonth
=
nTempMonth
;
nMonthPos
=
1
;
// month at the beginning
if
(
nMonth
<
0
)
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
}
SkipBlanks
(
rString
,
nPos
);
}
else
{
nPos
=
nMonthStart
;
// rewind month
}
SkipBlanks
(
rString
,
nPos
);
}
else
{
...
...
@@ -2089,15 +2098,23 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
SkipString
(
pFormatter
->
GetLocaleData
()
->
getLongDateDayOfWeekSep
(),
rString
,
nPos
);
}
SkipBlanks
(
rString
,
nPos
);
nMonth
=
GetMonth
(
rString
,
nPos
);
if
(
nMonth
)
// month (Jan 1)?
n
Temp
Month
=
GetMonth
(
rString
,
nPos
);
if
(
n
Temp
Month
)
// month (Jan 1)?
{
nMonthPos
=
1
;
// month a the beginning
if
(
nMonth
<
0
)
if
(
nPos
<
rString
.
getLength
())
// Jan1 without separator is not a date
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
nMonth
=
nTempMonth
;
nMonthPos
=
1
;
// month a the beginning
if
(
nMonth
<
0
)
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
}
SkipBlanks
(
rString
,
nPos
);
}
else
{
nPos
=
nMonthStart
;
// rewind month
}
SkipBlanks
(
rString
,
nPos
);
}
}
if
(
!
nMonth
)
...
...
@@ -2282,6 +2299,7 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
}
}
const
sal_Int32
nMonthStart
=
nPos
;
short
nTempMonth
=
GetMonth
(
rString
,
nPos
);
// month in the middle (10 Jan 94)
if
(
nTempMonth
)
{
...
...
@@ -2294,15 +2312,22 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
{
return
MatchedReturn
();
}
eScannedType
=
NUMBERFORMAT_DATE
;
// !!! it IS a date
nMonth
=
nTempMonth
;
nMonthPos
=
2
;
// month in the middle
if
(
nMonth
<
0
)
if
(
nMonthStart
>
0
&&
nPos
<
rString
.
getLength
())
// 10Jan or Jan94 without separator are not dates
{
eScannedType
=
NUMBERFORMAT_DATE
;
// !!! it IS a date
nMonth
=
nTempMonth
;
nMonthPos
=
2
;
// month in the middle
if
(
nMonth
<
0
)
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
}
SkipString
(
pLoc
->
getLongDateMonthSep
(),
rString
,
nPos
);
SkipBlanks
(
rString
,
nPos
);
}
else
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
nPos
=
nMonthStart
;
// rewind month
}
SkipString
(
pLoc
->
getLongDateMonthSep
(),
rString
,
nPos
);
SkipBlanks
(
rString
,
nPos
);
}
if
(
SkipChar
(
'E'
,
rString
,
nPos
)
||
// 10E, 10e, 10,Ee
...
...
@@ -2630,6 +2655,7 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
}
}
const
sal_Int32
nMonthStart
=
nPos
;
short
nTempMonth
=
GetMonth
(
rString
,
nPos
);
// 10 Jan
if
(
nTempMonth
)
{
...
...
@@ -2642,14 +2668,21 @@ bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
{
return
MatchedReturn
();
}
eScannedType
=
NUMBERFORMAT_DATE
;
nMonth
=
nTempMonth
;
nMonthPos
=
3
;
// month at end
if
(
nMonth
<
0
)
if
(
nMonthStart
>
0
)
// 10Jan without separator is not a date
{
eScannedType
=
NUMBERFORMAT_DATE
;
nMonth
=
nTempMonth
;
nMonthPos
=
3
;
// month at end
if
(
nMonth
<
0
)
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
}
SkipBlanks
(
rString
,
nPos
);
}
else
{
SkipChar
(
'.'
,
rString
,
nPos
);
// abbreviated
nPos
=
nMonthStart
;
// rewind month
}
SkipBlanks
(
rString
,
nPos
);
}
sal_Int32
nOrigPos
=
nPos
;
...
...
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