Kaydet (Commit) 4782d959 authored tarafından Eike Rathke's avatar Eike Rathke Kaydeden (comit) Andras Timar

Resolves: tdf#91420 "Jan1, 2015" is a valid date

Regression introduced with 43624d93 that
fixed tdf#34724

Change-Id: I44b5eac6e4ce5a38855148efecea5f2a987ed213
(cherry picked from commit fe2c7b25)
üst 1c740e83
...@@ -2102,7 +2102,9 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString, ...@@ -2102,7 +2102,9 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
short nTempMonth = GetMonth(rString, nPos); short nTempMonth = GetMonth(rString, nPos);
if ( nTempMonth ) // month (Jan 1)? if ( nTempMonth ) // month (Jan 1)?
{ {
if (nPos < rString.getLength()) // Jan1 without separator is not a date // Jan1 without separator is not a date, unless it is followed by a
// separator and a (year) number.
if (nPos < rString.getLength() || (nAnzStrings >= 4 && nAnzNums >= 2))
{ {
eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date !!! eScannedType = css::util::NumberFormat::DATE; // !!! it IS a date !!!
nMonth = nTempMonth; nMonth = nTempMonth;
...@@ -2145,7 +2147,9 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString, ...@@ -2145,7 +2147,9 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
nTempMonth = GetMonth(rString, nPos); nTempMonth = GetMonth(rString, nPos);
if ( nTempMonth ) // month (Jan 1)? if ( nTempMonth ) // month (Jan 1)?
{ {
if (nPos < rString.getLength()) // Jan1 without separator is not a date // Jan1 without separator is not a date, unless it is followed by a
// separator and a (year) number.
if (nPos < rString.getLength() || (nAnzStrings >= 4 && nAnzNums >= 2))
{ {
nMonth = nTempMonth; nMonth = nTempMonth;
nMonthPos = 1; // month a the beginning nMonthPos = 1; // month a the beginning
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment