summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-07-01 17:38:08 +0200
committerMichael Stahl <mst@openoffice.org>2010-07-01 17:38:08 +0200
commitf9efce57cfb684fae83b8f2ffa1d61434b20e20d (patch)
tree9e274cec48a2f2d053592c1aa71a9056550d0896 /sw
parent86209cb3324b4b30bc773a81b1ac03829bba253f (diff)
sw33bf06: #i112516#: NewTabPortion(): apply patch by cmc: fix SIGFPE
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/txttab.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 0fd88876532b..a86589b64851 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -194,6 +194,10 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
SwTwips nCount = nSearchPos;
+ //Minimum tab stop width is 1
+ if (nDefTabDist <= 0)
+ nDefTabDist = 1;
+
nCount /= nDefTabDist;
nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: