summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-14 17:03:45 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-14 17:20:30 +0200
commit82b0450450d62328e7aede5ac23ba30055219728 (patch)
tree547cffad8941c2f51e317b5a8043f6205ceb8bf8 /svtools
parentcb235067de2bf7feef3c03eeb08492e60da0d083 (diff)
n#760294 svtools: allow border gap < 1pt
Change-Id: I3ac70ea343edde406e78845a112aabcbd8ff65b1
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index cd528ec7590c..a4a6e47154e2 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;