editeng/source/editeng/impedit3.cxx | 9 +++++---- svx/source/svdraw/svdotext.cxx | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit eb8d180f4fabbf57e0babba0f3b0dca402c65172 Author: matteocam <matteo.campane...@gmail.com> Date: Thu Aug 14 23:30:05 2014 +0200 Generalizing chaining to more than 2 objects Change-Id: If3dec97d383abbb42c3fa4310025ed3b353108e0 diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index e299061..db962b5 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -612,12 +612,13 @@ void ImpEditEngine::CheckPageOverflow() /* fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize) ? "YES Overflow!\n" : "NO Overflow!\n" ); */ // setting overflow status - sal_uInt32 nBoxHeight = 1783; // XXX: hard coded for testing - //if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) { - if (CalcTextHeight(NULL) > nBoxHeight) // XXX: CalcTextHeight here?? + + sal_uInt32 nBoxHeight = GetMaxAutoPaperSize().Height(); + + if (CalcTextHeight(NULL) > nBoxHeight) { // which paragraph is the first to cause higher size of the box? - UpdateOverflowingParaNum( nBoxHeight /*aPrevPaperSize.Height()*/ ); // XXX: currently only for horizontal text + UpdateOverflowingParaNum( nBoxHeight); // XXX: currently only for horizontal text aStatus.SetPageOverflow(true); } else { diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a93d7bc..d15d67c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -2017,9 +2017,9 @@ SdrTextObj* SdrTextObj::GetNextLinkInChain() const SdrTextObj *pNextTextObj = NULL; if ( pPage && pPage->GetObjCount() > 1) { - pNextTextObj = dynamic_cast< SdrTextObj * >( pPage->GetObj(1) ); - if ( pNextTextObj == NULL) - return NULL; + int nextIndex = (GetOrdNum()+1) % pPage->GetObjCount(); + pNextTextObj = dynamic_cast< SdrTextObj * >( pPage->GetObj( nextIndex ) ); + return pNextTextObj; } else { fprintf(stderr, "Make New Object please\n"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits