[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - xmloff/source
Laurent Balland-Poirier
laurent.balland-poirier at laposte.net
Thu Jun 16 08:15:33 UTC 2016
xmloff/source/style/xmlnumfi.cxx | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
New commits:
commit 0330e8cd0ce65c62e61d4b5af5dc1aab3b0db697
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Sat Jun 4 17:03:32 2016 +0200
tdf#97837 Detect delimiter only for date, time, currency
Other formats do not require delimiter
Except for minus sign
Change-Id: Ica5a62c175345062383247760fe5e2a061aeebe8
Reviewed-on: https://gerrit.libreoffice.org/24902
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit bd4ef2734b60d2188874178f173c9163ced09ce7)
Reviewed-on: https://gerrit.libreoffice.org/26350
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index ddd925c..9ea4e74 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -760,14 +760,18 @@ static bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rPare
}
// see ImpSvNumberformatScan::Next_Symbol
- if ( cChar == ' ' ||
- cChar == '-' ||
- cChar == '/' ||
- cChar == '.' ||
- cChar == ',' ||
- cChar == ':' ||
- cChar == '\'' )
- return true; // for all format types
+ if ( cChar == '-' )
+ return true; // all format types may content minus sign or delimiter
+ if ( ( cChar == ' ' ||
+ cChar == '/' ||
+ cChar == '.' ||
+ cChar == ',' ||
+ cChar == ':' ||
+ cChar == '\'' ) &&
+ ( nFormatType == XML_TOK_STYLES_CURRENCY_STYLE ||
+ nFormatType == XML_TOK_STYLES_DATE_STYLE ||
+ nFormatType == XML_TOK_STYLES_TIME_STYLE ) ) // other formats do not require delimiter tdf#97837
+ return true;
// percent sign must be used without quotes for percentage styles only
if ( nFormatType == XML_TOK_STYLES_PERCENTAGE_STYLE && cChar == '%' )
More information about the Libreoffice-commits
mailing list