svtools/source/control/ctrlbox.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 82b0450450d62328e7aede5ac23ba30055219728 Author: Miklos Vajna <vmik...@suse.cz> Date: Mon May 14 17:03:45 2012 +0200 n#760294 svtools: allow border gap < 1pt Change-Id: I3ac70ea343edde406e78845a112aabcbd8ff65b1 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index cd528ec..a4a6e47 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -61,6 +61,7 @@ #define EXTRAFONTSIZE 5 #define GAPTOEXTRAPREVIEW 10 #define MAXPREVIEWWIDTH 120 +#define MINGAPWIDTH 2 #define FONTNAMEBOXMRUENTRIESFILE "/user/config/fontnameboxmruentries" @@ -338,9 +339,9 @@ long BorderWidthImpl::GetGap( long nWidth ) const if ( ( m_nFlags & CHANGE_DIST ) > 0 ) result = static_cast<long>(m_nRateGap * nWidth); - // Avoid having too small distances (less than 1pt) - if ( result < 20 && m_nRate1 > 0 && m_nRate2 > 0 ) - result = 20; + // Avoid having too small distances (less than 0.1pt) + if ( result < MINGAPWIDTH && m_nRate1 > 0 && m_nRate2 > 0 ) + result = MINGAPWIDTH; return result; } @@ -380,7 +381,7 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap ) bool bGapChange = ( m_nFlags & CHANGE_DIST ) > 0; double nWidthGap = lcl_getGuessedWidth( nGap, m_nRateGap, bGapChange ); - if ( bGapChange && nGap > 20 ) + if ( bGapChange && nGap > MINGAPWIDTH ) aToCompare.push_back( nWidthGap ); else if ( !bGapChange && nWidthGap < 0 ) bInvalid = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits