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

matteocam matteo.campanelli at gmail.com
Wed Jul 16 07:30:22 PDT 2014


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

New commits:
commit 10dbfb98c428e916d2d042d070e175d0987585a8
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 16 16:23:31 2014 +0200

    Moved text copying experiments in AutoFit decomposition method
    
    Change-Id: Iae4c950a8a7cae868bde995384935c87dc2eaadd

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index bfe71765..09bb8e3 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -553,43 +553,6 @@ namespace
         // make text portion primitive with the first part of the portion
         impCreateTextPortionPrimitive(rTruncatedPortionInfo);
 
-        // for debugging purposes:
-        // carry out experiments only when setting b=false from gdb
-        bool b = true;
-        if (b)
-            return;
-
-        /* Some Experiments */
-
-        const SdrTextObj *pCurTextObj = mrOutliner.GetTextObj();
-        SdrPage *pPage = NULL;
-
-        // page for list of objects
-        if ( pCurTextObj ) {
-            pPage = pCurTextObj->GetPage();
-        } else {
-            fprintf(stderr, "Some errors\n" );
-            return;
-        }
-
-        // we use (text) object 0 and 1 for these experiments
-        // we can try to set text of obj 0 to obj 1 or something
-
-        SdrTextObj *pNextTextObj;
-        if ( pPage && pPage->GetObjCount() > 1) {
-            pNextTextObj =  dynamic_cast< SdrTextObj * >(
-                                                pPage->GetObj(1) );
-            if ( pNextTextObj == NULL)
-                return;
-        } else {
-            fprintf(stderr, "Make New Object please\n");
-            return;
-        }
-
-        pCurTextObj->impCopyTextInTextObj(pNextTextObj);
-
-        /* End Experiments */
-
         // if text is left in original portion, send it back to editeng
         // TODO(matteocam)
     }
@@ -846,6 +809,33 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
     const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
     const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
 {
+    /* BEGIN Experiments */
+    // FIXME(matteocam)
+
+     // for debugging purposes:
+    // carry out experiments only when setting b=false from gdb
+    bool b = true;
+    if (b)
+        return;
+
+    // we use (text) object 0 and 1 for these experiments:
+    // copying text from one to the other.
+
+    SdrTextObj *pNextTextObj;
+    if ( pPage && pPage->GetObjCount() > 1) {
+        pNextTextObj =  dynamic_cast< SdrTextObj * >(
+                                            pPage->GetObj(1) );
+        if ( pNextTextObj == NULL)
+            return;
+    } else {
+        fprintf(stderr, "Make New Object please\n");
+        return;
+    }
+
+    impCopyTextInTextObj(pNextTextObj);
+
+    /* END Experiments */
+
     // decompose matrix to have position and size of text
     basegfx::B2DVector aScale, aTranslate;
     double fRotate, fShearX;


More information about the Libreoffice-commits mailing list