Index: svl/inc/svl/zformat.hxx =================================================================== --- svl/inc/svl/zformat.hxx (revision 1343701) +++ svl/inc/svl/zformat.hxx (working copy) @@ -313,6 +313,18 @@ (eOp1 == NUMBERFORMAT_OP_GT && eOp2 == NUMBERFORMAT_OP_LT) || (eOp1 == NUMBERFORMAT_OP_NO && eOp2 == NUMBERFORMAT_OP_NO) ); } + // Whether the first subformat code is really for negative numbers + // or another limit set. + sal_Bool IsNegativeRealNegative2() const + { + return fLimit1 == 0.0 && fLimit2 == 0.0 && + ( (eOp2 == NUMBERFORMAT_OP_GT && eOp1 == NUMBERFORMAT_OP_LT) || + (eOp2 == NUMBERFORMAT_OP_EQ && eOp1 == NUMBERFORMAT_OP_LT) || + (eOp2 == NUMBERFORMAT_OP_GE && eOp1 == NUMBERFORMAT_OP_LT) || + (eOp2 == NUMBERFORMAT_OP_NO && eOp1 == NUMBERFORMAT_OP_LT) || + (eOp2 == NUMBERFORMAT_OP_NO && eOp1 == NUMBERFORMAT_OP_LE) || + (eOp2 == NUMBERFORMAT_OP_GT && eOp1 == NUMBERFORMAT_OP_LE)); + } // Whether the negative format is without a sign or not sal_Bool IsNegativeWithoutSign() const; Index: svl/source/numbers/zformat.cxx =================================================================== --- svl/source/numbers/zformat.cxx (revision 1343701) +++ svl/source/numbers/zformat.cxx (working copy) @@ -2129,9 +2129,12 @@ else nIx = 2; } - if (nIx == 1 && fNumber < 0.0 && // negatives Format - IsNegativeRealNegative() ) // ohne Vorzeichen + if (nIx == 1 && // negatives Format + IsNegativeRealNegative() && fNumber < 0.0) // ohne Vorzeichen fNumber = -fNumber; // Vorzeichen eliminieren + if(nIx == 0 && + IsNegativeRealNegative2() && fNumber < 0.0) + fNumber = -fNumber; *ppColor = NumFor[nIx].GetColor(); const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info(); const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();