svx/source/sdr/primitive2d/sdrattributecreator.cxx | 6 +++--- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 14 +++++++++----- svx/source/svdraw/svdotext.cxx | 12 ++++-------- 3 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit e5535665a3bbd7bd876eb62d8d4517d0bf16fad9 Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jul 29 03:16:52 2014 +0300 Chained primitive is created only if there is chaining need Change-Id: Ib8da3f48b8c7327769a7a35dc7af7deb984aa36a diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index f75354d..db79a85 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -305,13 +305,17 @@ namespace drawinglayer // isotrophically scaled text in range pNew = new SdrAutoFitTextPrimitive2D(&rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap); } + else if( rText.isToBeChained() ) // FIXME(matteocam) + { + //bool b = true; // XXX: Chained Text by default! + //if (b) + pNew = new SdrChainedTextPrimitive2D( + &rText.getSdrText(), + rText.getOutlinerParaObject() ); + //else // end FIXME + } else // text in range { - // FIXME(matteocam) - bool b = true; // XXX: Chained Text by default! - if (b) - pNew = new SdrChainedTextPrimitive2D( &rText.getSdrText(), rText.getOutlinerParaObject() ); - else // end FIXME // build new primitive pNew = new SdrBlockTextPrimitive2D( &rText.getSdrText(), commit 13977e0e6163e348d8d65468a8788dd9a8a7abd0 Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jul 29 03:13:42 2014 +0300 Sets need for chaining in SdrTextObj when page overflow occurs Change-Id: I2e4a1adbacf7cae8feebaa392957e98c717699c2 diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 2d135bc..fc22e83 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -524,10 +524,10 @@ namespace drawinglayer // FIXME(matteocam) bool bToBeChained = rTextObj.IsToBeChained(); // for resetting status - // XXX + // XXX: may not work if ( rTextObj.IsToBeChained() ) - { - rTextObj.SetToBeChained( false ); + { // XXX: hack + const_cast<SdrTextObj*>(&rTextObj)->SetToBeChained( false ); } if(rText.GetOutlinerParaObject() && rText.GetModel()) diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 09b8b8e..0b5e690 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1947,16 +1947,12 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) } else if (/* TODO: IsChained() && */ pEditStatus->IsPageOverflow()) { + // FIXME(matteocam): should include check that the TextBox has a next chain link + + // set the need for chaining + SetToBeChained( true ); //impDecomposeChainedTextPrimitive(); - /* - * XXX: Do nothing for now, later here we'll set the need for chaining - * How do you do such a thing? - * TODO: Look at where text primitive creation methods are called. - * Then what? - * Store the state in SdrTextObj with something like needsChaingin? - * - */ } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits