[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Tue Jul 29 11:08:59 PDT 2014
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 19 ++++++++++++-------
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 2 +-
2 files changed, 13 insertions(+), 8 deletions(-)
New commits:
commit d350289075bc618c0680562b1826201c88215536
Author: matteocam <matteo.campanelli at gmail.com>
Date: Tue Jul 29 21:08:14 2014 +0300
Status is reset only if not in Edit mode
Change-Id: Ic982e9ad7af585baa97f5709268f6291b076a893
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 48fcd71..68b44e0 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -523,13 +523,8 @@ namespace drawinglayer
// FIXME(matteocam)
bool bToBeChained = rTextObj.IsToBeChained();
- // for resetting status
- // XXX: may not work
- // XXX: this should happen only whether the chaining has occurred though.
- if ( rTextObj.IsToBeChained() )
- { // XXX: hack
- //const_cast<SdrTextObj*>(&rTextObj)->SetToBeChained( false );
- }
+
+
if(rText.GetOutlinerParaObject() && rText.GetModel())
{
@@ -545,6 +540,16 @@ namespace drawinglayer
bInEditMode = rTextObj.IsInEditMode();
}
+ // for resetting status
+ // FIXME(matteocam)
+ // XXX: may not work
+ // XXX: this should happen only whether the chaining has occurred though.
+ // XXX: violates SPOT rule (the following condition is also in sdrdecompositiontools.cxx)
+ if ( !bInEditMode && rTextObj.IsToBeChained() )
+ { // XXX: hack
+ const_cast<SdrTextObj*>(&rTextObj)->SetToBeChained( false );
+ }
+
OutlinerParaObject aOutlinerParaObject(*rText.GetOutlinerParaObject());
if(bInEditMode)
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index cc5c4a4..b0d879c 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -305,7 +305,7 @@ namespace drawinglayer
// isotrophically scaled text in range
pNew = new SdrAutoFitTextPrimitive2D(&rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap);
}
- else if( rText.isToBeChained() && !isInEditMode() ) // FIXME(matteocam)
+ else if( rText.isToBeChained() && !rText.isInEditMode() ) // FIXME(matteocam)
{
//bool b = true; // XXX: Chained Text by default!
//if (b)
More information about the Libreoffice-commits
mailing list