diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-01-07 13:40:45 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-03-19 17:57:32 +0100 |
commit | 932d9136aa60bc09a7d1b8feac0aed0619a7c407 (patch) | |
tree | 1e8ac260c6ddb010e7c5a58578f9f9716124420e /svtools/source/control | |
parent | 81855d9ae2b13fd522e16a8ae29c337826ababb7 (diff) |
Switching the order of the SetLinesWidth arguments
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index eb3c7bdd7303..898ce820aaa9 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -338,15 +338,13 @@ long BorderWidthImpl::GetGap( long nWidth ) const double lcl_getGuessedWidth( long nTested, double nRate, bool nChanging ) { - double nWidth = 0.0; + double nWidth = -1.0; if ( nChanging ) nWidth = double( nTested ) / nRate; else { if ( double( nTested ) == nRate ) nWidth = nRate; - else - nWidth = 0.0; } return nWidth; @@ -361,21 +359,21 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap ) double nWidth1 = lcl_getGuessedWidth( nLine1, m_nRate1, bLine1Change ); if ( bLine1Change ) aToCompare.push_back( nWidth1 ); - else if ( !bLine1Change && nWidth1 == 0 ) + else if ( !bLine1Change && nWidth1 < 0 ) bInvalid = true; bool bLine2Change = ( m_nFlags & CHANGE_LINE2 ) > 0; double nWidth2 = lcl_getGuessedWidth( nLine2, m_nRate2, bLine2Change ); if ( bLine2Change ) aToCompare.push_back( nWidth2 ); - else if ( !bLine2Change && nWidth2 == 0 ) + else if ( !bLine2Change && nWidth2 < 0 ) bInvalid = true; bool bGapChange = ( m_nFlags & CHANGE_DIST ) > 0; double nWidthGap = lcl_getGuessedWidth( nGap, m_nRateGap, bGapChange ); if ( bGapChange ) aToCompare.push_back( nWidthGap ); - else if ( !bGapChange && nWidthGap == 0 ) + else if ( !bGapChange && nWidthGap < 0 ) bInvalid = true; double nWidth = 0.0; |