summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-06-06 13:31:03 +0200
committerDavid Tardon <dtardon@redhat.com>2014-06-09 16:53:35 +0000
commit9920c72a200f2a27aa52fa249784e60425972de5 (patch)
treee08a9b8d0634745c95d2234d696fa5d78006482c
parent9e49e49709935d594fa49cbccc4ffbcb4e90400f (diff)
resolved fdo#79719 recognize ##-MMM-## as date even if ambiguous
Force ##-MMM-## to be ##-MMM-#### if the first number is a day value. Note that the previous implementation of (bDay1 && bDay2 && ((bYear1 && !bYear2) || (!bYear1 && bYear2))) never matched anyway as the detection of bDay1 and bDay2 were changed to only yield true if bYear1==false or bYear2==false. Change-Id: If6bb6d3e1757015552eaa81c1f58d53c0794846e (cherry picked from commit a6992cd0d7c085ba05877e6f68ac0650dd09010f) Reviewed-on: https://gerrit.libreoffice.org/9665 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r--svl/source/numbers/zforfind.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 9c8bb1cd96f4..230254026e90 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1152,14 +1152,9 @@ bool ImpSvNumberInputScan::MayBeMonthDate()
}
else if (bDay1 && bDay2)
{
- if (bYear1 && !bYear2)
- {
- nMayBeMonthDate = 3; // yy-month-dd
- }
- else if (!bYear1 && bYear2)
- {
- nMayBeMonthDate = 2; // dd-month-yy
- }
+ // Ambiguous ##-MMM-## date, but some big vendor's database
+ // reports write this crap, assume this always to be
+ nMayBeMonthDate = 2; // dd-month-yy
}
}
}