Kaydet (Commit) 6c6c70df authored tarafından Eike Rathke's avatar Eike Rathke

rename methods to something meaningful

Change-Id: I92f5b3cb637b7cc6152d118505b69e762047f78b
üst 7c66e99f
......@@ -315,16 +315,17 @@ public:
// Whether the second subformat code is really for negative numbers
// or another limit set.
bool IsNegativeRealNegative() const
bool IsSecondSubformatRealNegative() const
{
return fLimit1 == 0.0 && fLimit2 == 0.0 &&
( (eOp1 == NUMBERFORMAT_OP_GE && eOp2 == NUMBERFORMAT_OP_NO) ||
(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
bool IsFirstSubformatRealNegative() const
{
return fLimit1 == 0.0 && fLimit2 == 0.0 &&
( (eOp2 == NUMBERFORMAT_OP_GT && eOp1 == NUMBERFORMAT_OP_LT) ||
......
......@@ -2826,7 +2826,7 @@ bool ImpSvNumberInputScan::ScanStringNumFor( const OUString& rString, /
if ( !bFound )
{
if ( !bDontDetectNegation && (nString == 0) &&
!bFirst && (nSign < 0) && pFormat->IsNegativeRealNegative() )
!bFirst && (nSign < 0) && pFormat->IsSecondSubformatRealNegative() )
{
// simply negated twice? --1
aString = comphelper::string::remove(aString, ' ');
......@@ -2843,7 +2843,7 @@ bool ImpSvNumberInputScan::ScanStringNumFor( const OUString& rString, /
}
}
else if ( !bDontDetectNegation && (nSub == 1) &&
pFormat->IsNegativeRealNegative() )
pFormat->IsSecondSubformatRealNegative() )
{
// negative
if ( nStringScanSign < 0 )
......
......@@ -2522,8 +2522,8 @@ bool SvNumberformat::GetOutputString(double fNumber,
}
}
if (fNumber < 0.0 &&
((nIx == 0 && IsNegativeRealNegative2()) || // 1st, usually positive subformat
(nIx == 1 && IsNegativeRealNegative()))) // 2nd, usually negative subformat
((nIx == 0 && IsFirstSubformatRealNegative()) || // 1st, usually positive subformat
(nIx == 1 && IsSecondSubformatRealNegative()))) // 2nd, usually negative subformat
{
fNumber = -fNumber; // eliminate sign
}
......@@ -4874,7 +4874,7 @@ short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos,
bool SvNumberformat::IsNegativeWithoutSign() const
{
if ( IsNegativeRealNegative() )
if ( IsSecondSubformatRealNegative() )
{
const OUString* pStr = GetNumForString( 1, 0, true );
if ( pStr )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment