summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-07-25 16:38:22 +0200
committerEike Rathke <erack@redhat.com>2016-07-25 16:39:44 +0200
commitbcf84049c84fe62762efb3794167915b8b39ba33 (patch)
tree6ebe7fd5d7f6708d7b6a8df89accca89c599dc4f
parentc27d56b2a9ae4fb2f0a69d919339af0bbccae5a6 (diff)
Revert "tdf#101096 Improve minute/month disambiguation"
This reverts commit cb94d2fbd9596aca45d915a599caa671a261c2a2. There's an easier solution not leaving unhandled corner cases.
-rw-r--r--svl/source/numbers/zforscan.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 0fecb5403d49..bc436431a820 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1150,15 +1150,15 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
nIndexPre = PreviousKeyword(i);
nIndexNex = NextKeyword(i);
cChar = PreviousChar(i);
- if ( nIndexPre == NF_KEY_H || nIndexPre == NF_KEY_HH // H | HH before M
- || nIndexNex == NF_KEY_S || nIndexNex == NF_KEY_SS // S | SS after M
- || ( (nIndexPre == NF_KEY_S || nIndexPre == NF_KEY_SS) // S | SS before M tdf#95339
- && nIndexNex != NF_KEY_D && nIndexNex != NF_KEY_DD && nIndexNex != NF_KEY_DDD && nIndexNex != NF_KEY_DDDD
- && nIndexNex != NF_KEY_YY && nIndexNex != NF_KEY_YYYY ) // except if day or year after M tdf#101096
- || ( (nIndexNex == NF_KEY_H || nIndexNex == NF_KEY_HH ) // H | HH after M tdf#95339
- && nIndexPre != NF_KEY_D && nIndexPre != NF_KEY_DD && nIndexPre != NF_KEY_DDD && nIndexPre != NF_KEY_DDDD
- && nIndexPre != NF_KEY_YY && nIndexPre != NF_KEY_YYYY ) // except if day or year before M tdf#101096
- || cChar == '[' ) // [M
+ if (nIndexPre == NF_KEY_H || // H
+ nIndexPre == NF_KEY_HH || // HH
+ nIndexPre == NF_KEY_S || // S before M tdf#95339
+ nIndexPre == NF_KEY_SS || // SS
+ nIndexNex == NF_KEY_H || // H after M tdf#95339
+ nIndexNex == NF_KEY_HH || // HH
+ nIndexNex == NF_KEY_S || // S
+ nIndexNex == NF_KEY_SS || // SS
+ cChar == '[' ) // [M
{
eNewType = css::util::NumberFormat::TIME;
nTypeArray[i] -= 2; // 6 -> 4, 7 -> 5