diff options
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index fef69c5e2d8c..038597043f30 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -459,14 +459,28 @@ bool ImpSvNumberInputScan::StringContainsWord( const OUString& rWhat, * form? */ // Check simple ASCII first before invoking i18n or anything else. - if (rtl::isAsciiAlphanumeric( rString[nPos] )) + const sal_Unicode c = rString[nPos]; + + // Common separating ASCII characters in date context. + switch (c) + { + case ' ': + case '-': + case '.': + case '/': + return true; + default: + ; // nothing + } + + if (rtl::isAsciiAlphanumeric( c )) return false; // Alpha or numeric is not word gap. sal_Int32 nIndex = nPos; - const sal_uInt32 c = rString.iterateCodePoints( &nIndex); + const sal_uInt32 uc = rString.iterateCodePoints( &nIndex); if (nPos+1 < nIndex) return true; // Surrogate, assume these to be new words. - (void)c; + (void)uc; const sal_Int32 nType = pFormatter->GetCharClass()->getCharacterType( rString, nPos); using namespace ::com::sun::star::i18n; |