[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - svx/source

matteocam matteo.campanelli at gmail.com
Mon Jul 14 01:03:13 PDT 2014


 svx/source/svdraw/svdotextdecomposition.cxx |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 28ef5f3f2d70d1ffd32a7fc7dd2bdd653edf8c95
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jul 14 10:02:04 2014 +0200

    Moved code to impHandleTruncatedPortion
    
    Change-Id: Ib6a8367f6e350856fc19f72a9316bfb510b2f614

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 510652a..0c53ea3 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -523,8 +523,8 @@ namespace
 
         bool bTruncateText = rInfo.mbEndOfParagraph; // arbitrary property
 
-        // truncate text
-        if ( bTruncateText )
+
+        if ( bTruncateText ) // truncate text
             impHandleTruncatedPortion(rInfo)
         else // no chaining or truncating
             impCreateTextPortionPrimitive(rInfo);
@@ -542,11 +542,19 @@ namespace
 
     void impTextBreakupHandler::impHandleTruncatedPortion(const DrawPortionInfo& rInfo)
     {
-        // truncate it at 4
+        // truncate portion at 4
         int nTruncationPoint = 4;
-        DrawPortionInfo rInfoNonConst = rInfo;
-        rInfoNonConst.mnTextLen = std::min( rInfo.mnTextLen, nTruncationPoint );
-        impCreateTextPortionPrimitive(rInfoNonConst);
+
+        // make truncated DrawPortionInfo
+        DrawPortionInfo rTruncatedPortionInfo = rInfo;
+        rTruncatedPortionInfo.mnTextLen =
+            std::min( rInfo.mnTextLen, nTruncationPoint );
+
+        // make text portion primitive with the first part of the portion
+        impCreateTextPortionPrimitive(rTruncatedPortionInfo);
+
+        // if text is left in original portion send it back to editeng
+        // FIXME(matteocam)
     }
 
     void impTextBreakupHandler::impHandleDrawBulletInfo(const DrawBulletInfo& rInfo)


More information about the Libreoffice-commits mailing list