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

matteocam matteo.campanelli at gmail.com
Thu Jul 31 14:03:01 PDT 2014


 svx/source/svdraw/svdotextdecomposition.cxx |   39 +---------------------------
 1 file changed, 2 insertions(+), 37 deletions(-)

New commits:
commit 1d7f1e71abaaa63ea585a7a4317370c5bd16f734
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Fri Aug 1 00:01:26 2014 +0300

    No more arbitrary truncation of lines at 4
    
    Change-Id: Ibea3cd5d664052c99b10629a5a5cd45a3b56c4b0

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index fdfabdd..cf2f455 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -103,7 +103,6 @@ namespace
         void impFlushLinePrimitivesToParagraphPrimitives();
         void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo);
         void impHandleDrawBulletInfo(const DrawBulletInfo& rInfo);
-        void impHandleTruncatedPortion(const DrawPortionInfo& rInfo);
 
     public:
         impTextBreakupHandler(SdrOutliner& rOutliner)
@@ -511,23 +510,7 @@ 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 text
-            impHandleTruncatedPortion(rInfo);
-        else // no chaining or truncating
-            impCreateTextPortionPrimitive(rInfo);
+        impCreateTextPortionPrimitive(rInfo);
 
         if(rInfo.mbEndOfLine || rInfo.mbEndOfParagraph)
         {
@@ -540,24 +523,6 @@ namespace
         }
     }
 
-    void impTextBreakupHandler::impHandleTruncatedPortion(const DrawPortionInfo& rInfo)
-    {
-        // truncate portion at 4
-        int nTruncationPoint = 4;
-
-        // 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
-        // TODO(matteocam)
-    }
-
-
     void impTextBreakupHandler::impHandleDrawBulletInfo(const DrawBulletInfo& rInfo)
     {
         basegfx::B2DHomMatrix aNewTransform;
@@ -1516,7 +1481,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
     if (mpOverflowingText != NULL) {
         SdrTextObj *pNextTextObj = GetNextLinkInChain();
         assert (pNextTextObj);
-        impCopyTextInTextObj(pNextTextObj);
+        impCopyTextInTextObj(pNextTextObj); // XXX: it actually moves the overflowing text currently
 
         //pNextTextObj->SetOutlinerParaObject( mpOverflowingText );
         //SdrOutliner rOutl = pNextTextObj->ImpGetDrawOutliner();


More information about the Libreoffice-commits mailing list