editeng/source/editeng/impedit3.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
New commits: commit 88db808fb7c825914eb9fb4f7586b93bba40db4b Author: matteocam <matteo.campane...@gmail.com> Date: Fri Aug 8 16:18:38 2014 +0200 Using page size instead of current text size for overflowing para Change-Id: I3f90cb372c3a20900b7f04618bcb4dcc0241e326 diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 98744b6..a29e3ad 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -467,10 +467,6 @@ void ImpEditEngine::FormatDoc() aInvalidRect.Left() = 0; aInvalidRect.Right() = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height(); } - } else if ( nNewHeight > nCurTextHeight ) // possible page overflow // FIXME(matteocam) - { - // which paragraph is the first to cause higher size of the box? - UpdateOverflowingParaNum(); } nCurTextHeight = nNewHeight; @@ -551,8 +547,12 @@ void ImpEditEngine::CheckAutoPageSize() /* fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize) ? "YES Overflow!\n" : "NO Overflow!\n" ); */ // setting overflow status - if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) + if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) { + // which paragraph is the first to cause higher size of the box? + UpdateOverflowingParaNum( aPrevPaperSize.Height() ); // XXX: currently only for horizontal text + aStatus.SetPageOverflow(true); + } if ( aPaperSize != aPrevPaperSize ) { @@ -4610,14 +4610,13 @@ void ImpEditEngine::UpdateOverflowingParaNum() ParaPortion* pPara = GetParaPortions()[nPara]; nPH = pPara->GetHeight(); nY += nPH; - if ( nY > nCurTextHeight ) // found first paragraph overflowing + if ( nY > aPaperSize.Height() /*nCurTextHeight*/ ) // found first paragraph overflowing { SetOverflowingParaNum( nPara ); fprintf(stderr, "[CHAINING] Setting first overflowing para: %d\n", nPara); return; } } - fprintf(stderr, "[CHAINING] Warning: Overflowing paragraph not found\n"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits