diff options
author | Eike Rathke <erack@redhat.com> | 2013-03-15 17:57:11 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-15 19:34:05 +0100 |
commit | 6c6c70df543dd34229c8ac98f39073ca3c3bcf4d (patch) | |
tree | 242bb7233f25aea6402074a77326561a8dc5f712 /svl | |
parent | 7c66e99f1d1f2e640157b079088aba35b33e0fc0 (diff) |
rename methods to something meaningful
Change-Id: I92f5b3cb637b7cc6152d118505b69e762047f78b
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zformat.hxx | 5 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx index d4bbef714e9b..ba56235c9825 100644 --- a/svl/inc/svl/zformat.hxx +++ b/svl/inc/svl/zformat.hxx @@ -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) || diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index a6a3f20f1a3e..2ce50974321a 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -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 ) diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 1ded02f8e59f..889f394b5fb0 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -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 ) |