[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source svx/source
matteocam
matteo.campanelli at gmail.com
Fri Jul 11 08:13:56 PDT 2014
editeng/source/outliner/outliner.cxx | 3 +--
svx/source/svdraw/svdotextdecomposition.cxx | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
New commits:
commit 5625b440f15564f8e12d37119a1b7f9198815d45
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Jul 11 16:38:46 2014 +0200
Truncation in impHandleDrawPortionInfo
Change-Id: Ief79063be0ef742148c24a3eb2d4d2cb7530987e
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 34962f4..08f0b79 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1756,8 +1756,7 @@ void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_I
if(aDrawPortionHdl.IsSet())
{
- // FIXME(matteocam)
- DrawPortionInfo aInfo( rStartPos, rText, nTextStart, std::min(nTextLen,2), rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
+ DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, false, 0, bEndOfLine, bEndOfParagraph, bEndOfBullet);
aDrawPortionHdl.Call( &aInfo );
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 2f7c4e1..e044d39 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -510,6 +510,28 @@ namespace
void impTextBreakupHandler::impHandleDrawPortionInfo(const DrawPortionInfo& rInfo)
{
+ // FIXME(matteocam)
+
+ /*
+ * We want to break the text at the 10th character if we are at
+ * the end of the paragraph.
+ * XXX: How to send it back to editengine?
+ * [AutoFit uses SetGlobalStretch... from Outliner]
+ * XXX: how to pass on to the rest of the text "This should be
+ * drawn somewhere else"?
+ */
+
+ bool bTruncateText = rInfo.mbEndOfParagraph; // arbitrary property
+
+ if ( bTruncateText )
+ {
+ // truncate it at 4
+ int nTruncationPoint = 4;
+ rInfo.mnTextLen = std::min( rInfo.mnTextLen, nTruncationPoint );
+ }
+
+ // END FIXME
+
impCreateTextPortionPrimitive(rInfo);
if(rInfo.mbEndOfLine || rInfo.mbEndOfParagraph)
More information about the Libreoffice-commits
mailing list