summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/laycache.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 2d6e23c6fe49..a70de2657c86 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -598,7 +598,9 @@ sal_uLong SwLayHelper::CalcPageCount()
if ( nNdCount > 100 ) // no estimation below this value
{
if ( nPgCount > 0 )
- mnMaxParaPerPage = nNdCount / nPgCount;
+ { // tdf#129529 avoid 0...
+ mnMaxParaPerPage = std::max<sal_uLong>(3, nNdCount / nPgCount);
+ }
else
{
mnMaxParaPerPage = std::max( sal_uLong(20),