[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source
matteocam
matteo.campanelli at gmail.com
Wed Jun 10 11:52:06 PDT 2015
svx/source/svdraw/svdotextdecomposition.cxx | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
New commits:
commit 8157aeab46e3bf0afd3f71c3946518826a1dd793
Author: matteocam <matteo.campanelli at gmail.com>
Date: Wed Jun 10 14:50:53 2015 -0400
Experiment: cutting paras from impDecomposeChainedText
Change-Id: Ic2d013b9f3d986b7c4bf95a5ada46db16c7e1e3d
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index fdb85f9..dfaa1d8 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1586,6 +1586,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
// prepare outliner
const SfxItemSet& rTextItemSet = rSdrChainedTextPrimitive.getSdrText()->GetItemSet();
SdrOutliner& rOutliner = ImpGetDrawOutliner();
+
SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet);
SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet);
const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord());
@@ -1601,8 +1602,27 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
// add one to rage sizes to get back to the old Rectangle and outliner measurements
const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L));
const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L));
+
+ // Text
const OutlinerParaObject* pOutlinerParaObject = rSdrChainedTextPrimitive.getSdrText()->GetOutlinerParaObject();
+
+ // FIXME
+ // Experiment: cutting all paragraphs after first (if any)
+ rOutliner.SetText(*pOutlinerParaObject);
+ pOutlinerParaObject = rOutliner.CreateParaObject(0,1);
+
+
+
+ // FIXME(matteocam)
+ // Experiment: setting only the non overflowing text
+ // Question: XXX: How do you know there is an overflow in the first place here??
+ // Question: what is the page size set at the end of these procedure. Is the "real" text size anywhere?
+
+ // Sub-experiment: removing the second paragraph if present
+
+
OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)");
+
const bool bVerticalWritintg(pOutlinerParaObject->IsVertical());
const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
More information about the Libreoffice-commits
mailing list