[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Thu May 28 14:40:05 PDT 2015
svx/source/svdraw/svdotext.cxx | 7 ++++---
svx/source/svdraw/svdotextdecomposition.cxx | 19 ++++---------------
2 files changed, 8 insertions(+), 18 deletions(-)
New commits:
commit 544517d54588e11d7e07853188ffb10277d7cd8a
Author: matteocam <matteo.campanelli at gmail.com>
Date: Thu May 28 17:39:09 2015 -0400
Minor refactoring
Change-Id: I5914e5b5d229404093c8bc46cde10b8687bc4cac
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index e197a24..e6b4156 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1956,13 +1956,14 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
else if ( GetNextLinkInChain() != NULL ) // is this a chainable object?
{
// set whether there is need for chaining
+ // (used in EndTextEdit to crop the overflowing part)
+ // XXX: might be removed later when we remove text in real time
SetToBeChained( pEditStatus->IsPageOverflow() );
fprintf(stderr, "[CHAINING] Need for Chaining is %s\n",
pEditStatus->IsPageOverflow() ? "TRUE" : "FALSE");
- // Trying to copy stuff right away
- if (pEditStatus->IsPageOverflow()) {
- mpOverflowingText = pEdtOutl->GetOverflowingParaObject();
+ // Pushes text in next link on the fly
+ if ( pEditStatus->IsPageOverflow() ) {
SdrTextObj *pNextTextObj = GetNextLinkInChain();
impCopyTextInTextObj(pNextTextObj);
}
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 3540146..d0d72dc 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -734,30 +734,19 @@ void SdrTextObj::embedText() const
void SdrTextObj::impCopyTextInTextObj(SdrTextObj *pNextTextObj) const
{
- // Code inspired from SdrTextObj::FitFrameToTextSize
-
- // avoid copying text in same box
+ // prevent copying text in same box
if ( this == pNextTextObj )
return;
- // trying to copy text in obj 1
- //SdrText* pText = getActiveText();
+ //rOutliner.SetStatusEventHdl1(LINK(this,SdrTextObj,ImpDecomposeChainedText));
- //SdrOutliner& rOutliner = pNextTextObj->ImpGetDrawOutliner();
- //rOutliner.SetUpdateMode(true);
- //rOutliner.SetStatusEventHdl1(LINK(this,SdrTextObj,ImpDecomposeChainedText));
- // XXX: experimental code 27/5/15
- //OutlinerParaObject *someText = rOutliner.CreateParaObject(0,1); // only first para
- //pNextTextObj->SetOutlinerParaObject(*someText);
- //pNextTextObj->SetText("Bukowski, were are thou?");
+ // Push text through the chain if there's any
+ mpOverflowingText = pEdtOutl->GetOverflowingParaObject();
if (mpOverflowingText) {
pNextTextObj->NbcSetOutlinerParaObject(mpOverflowingText);
}
- //rOutliner.Insert("Bukowski, were are thou?");
- //rOutliner.Clear();
//rOutliner.SetStatusEventHdl1(Link());
-
}
void SdrTextObj::impDecomposeAutoFitTextPrimitive(
More information about the Libreoffice-commits
mailing list