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

matteocam matteo.campanelli at gmail.com
Wed Jul 16 07:59:08 PDT 2014


 editeng/source/editeng/impedit3.cxx         |   11 +++++++++++
 svx/source/svdraw/svdotextdecomposition.cxx |   14 +++++++-------
 2 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit b77c335b73c0928c95e4b829b7462ff1303503d6
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 16 16:58:06 2014 +0200

    Overflow Check with oldSize < curSize AND FLAG check
    
    Change-Id: I798b12355f78b75696de8bdcc24c69c43d7ac6ac

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index e220750..ad3d2ab 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -353,6 +353,17 @@ void ImpEditEngine::FormatFullDoc()
     FormatDoc();
 }
 
+bool IsPageOverflow(const sal_uInt32 aStatus, bool isVertical,
+                    const Size aPrevPaperSize, const Size aPaperSize)
+{
+    const bool bGrowX=(aStatus & EE_STAT_TEXTWIDTHCHANGED) !=0;
+    const bool bGrowY=(aStatus & EE_STAT_TEXTHEIGHTCHANGED) !=0;
+
+    return ( bGrowY && isVertical && aPaperSize.Height() > aPrevPaperSize.Height() ) ||
+           ( bGrowX && !isVertical && aPaperSize.Width() > aPrevPaperSize.Width() );
+
+}
+
 void ImpEditEngine::FormatDoc()
 {
     if (!GetUpdateMode() || IsFormatting())
commit 88a34ae0d5243523d202b8b6fa1f7c7ba19dd47e
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 16 16:57:54 2014 +0200

    Removed debugging barrier for copying text experiment
    
    Change-Id: I8cd3897606b2abab3ef791d858d132f9f9cda9da

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 09bb8e3..59f5acc 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -812,12 +812,6 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
     /* 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.
 
@@ -832,7 +826,13 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
         return;
     }
 
-    impCopyTextInTextObj(pNextTextObj);
+    // for debugging purposes:
+    // carry out experiments only when setting b=false from gdb
+    //bool b = true;
+    //if (!b) {
+    impCopyTextInTextObj(pNextTextObj); // just do it
+    //    return;
+    //}
 
     /* END Experiments */
 


More information about the Libreoffice-commits mailing list