xmloff/source/style/xmlnumfi.cxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
New commits: commit bd4ef2734b60d2188874178f173c9163ced09ce7 Author: Laurent Balland-Poirier <[email protected]> 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 <[email protected]> Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index b85bb13..42ef1d4 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -767,14 +767,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 == '%' ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
