diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-09 15:57:25 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-11 07:09:11 +0100 |
commit | b143e7642f93e83f4f3c4df56c3e1e8e64e36ce0 (patch) | |
tree | cb2c90dfc8dd0d1dff5103a8c12a1d926058a129 /xmloff | |
parent | 2ded5f80b43f91fc1bcd8fbc17bafb0758de3f70 (diff) |
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: Ib9ad5b874a210ef3862c668158fcc5d18eeab363
Reviewed-on: https://gerrit.libreoffice.org/67579
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/XMLNumberStyles.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 191bf5f75270..45a161a81421 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -395,7 +395,7 @@ void SdXMLNumberStylesExporter::exportDateStyle( SdXMLExport& rExport, sal_Int32 if( nDateStyle > 1 ) nDateStyle -= 2; - SAL_WARN_IF( (nDateStyle < 0) || (nDateStyle >= SdXMLDateFormatCount), "xmloff", "unknown date style!" ); + SAL_WARN_IF(nDateStyle >= SdXMLDateFormatCount, "xmloff", "unknown date style!"); int nTimeStyle = (nStyle >> 4) & 0x0f; bool bHasTime = nTimeStyle != 0; @@ -403,9 +403,9 @@ void SdXMLNumberStylesExporter::exportDateStyle( SdXMLExport& rExport, sal_Int32 if( nTimeStyle > 1 ) nTimeStyle -= 2; - SAL_WARN_IF( (nTimeStyle < 0) || (nTimeStyle >= SdXMLTimeFormatCount), "xmloff", "Unknown time style!" ); + SAL_WARN_IF(nTimeStyle >= SdXMLTimeFormatCount, "xmloff", "Unknown time style!"); - if( (nDateStyle >= 0) && (nDateStyle < SdXMLDateFormatCount) && (nTimeStyle >= 0) && (nTimeStyle < SdXMLTimeFormatCount) ) + if ((nDateStyle < SdXMLDateFormatCount) && (nTimeStyle < SdXMLTimeFormatCount)) { if( bHasDate ) { |