mirror of
https://github.com/apache/poi.git
synced 2025-02-07 10:38:12 +00:00
forgot another contains call ...
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735349 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee4b65394f
commit
fc83bdaf9e
@ -641,14 +641,14 @@ public class CellNumberFormatter extends CellFormatter {
|
||||
// New we check to see if we should remove the integer part
|
||||
boolean numNoZero = !hasChar('0', numeratorSpecials);
|
||||
boolean intNoZero = !hasChar('0', integerSpecials);
|
||||
boolean intOnlyHash = integerSpecials.isEmpty() || (integerSpecials.size() == 1 && integerSpecials.contains('#'));
|
||||
boolean intOnlyHash = integerSpecials.isEmpty() || (integerSpecials.size() == 1 && hasChar('#', integerSpecials));
|
||||
|
||||
boolean removeBecauseZero = fractional == 0 && (intOnlyHash || numNoZero);
|
||||
boolean removeBecauseFraction = fractional != 0 && intNoZero;
|
||||
|
||||
if (value == 0 && (removeBecauseZero || removeBecauseFraction)) {
|
||||
Special start = lastSpecial(integerSpecials);
|
||||
boolean hasPlaceHolder = integerSpecials.contains('?') || numeratorSpecials.contains('?');
|
||||
boolean hasPlaceHolder = hasChar('?', integerSpecials, numeratorSpecials);
|
||||
CellNumberStringMod sm = hasPlaceHolder
|
||||
? replaceMod(start, true, numerator, false, ' ')
|
||||
: deleteMod(start, true, numerator, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user