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

matteocam matteo.campanelli at gmail.com
Tue Aug 12 09:29:13 PDT 2014


 editeng/source/editeng/impedit3.cxx |    7 ++++---
 svx/source/svdraw/svdotxed.cxx      |   10 +++++++---
 2 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 0c2c384c82ff36da734f5ec1165560a9e3d99104
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Aug 12 18:25:47 2014 +0200

    Hard-coding of text box height. Using that for Overflowing Paragraphs
    
    Change-Id: I96a9eb8337744b8c76bd735faca89085e6698490

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a9b7483..5e0c19b 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -548,10 +548,11 @@ void ImpEditEngine::CheckAutoPageSize()
                         ? "YES Overflow!\n"  : "NO Overflow!\n" ); */
     fprintf( stderr, "aPaperSize.Height = %d\n", aPaperSize.Height() );
     // setting overflow status
-    if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) {
+    sal_uInt32 nHeight = 1783; // XXX: hard coded for testing
+    //if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) {
+    if (GetTextHeight() > 1783) // XXX: CalcTextHeight here??
         // which paragraph is the first to cause higher size of the box?
-        UpdateOverflowingParaNum( aPrevPaperSize.Height() ); // XXX: currently only for horizontal text
-
+        UpdateOverflowingParaNum( 1783 /*aPrevPaperSize.Height()*/ ); // XXX: currently only for horizontal text
         aStatus.SetPageOverflow(true);
     }
 
commit 7b832c475e8386307f9473abf098279ff1ec7065
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Aug 12 18:17:19 2014 +0200

    Chained mode for BegTextEdit
    
    Change-Id: I21a52ca01cbacce8d2f5e8ff735f895e9fd7c6a4

diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 2cbf851..5ca8a05 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -63,9 +63,13 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
     }
 
     // FIXME(matteocam)
-    sal_uIntPtr nStat1=rOutl.GetControlWord();
-    nStat1 &=~EE_CNTRL_AUTOPAGESIZE;
-    rOutl.SetControlWord(nStat1);
+    bool bIsChained = true; // XXX: get it from a method
+    // disable AUTOPAGESIZE
+    if ( bIsChained ) {
+        sal_uIntPtr nStat1=rOutl.GetControlWord();
+        nStat1 &=~EE_CNTRL_AUTOPAGESIZE;
+        rOutl.SetControlWord(nStat1);
+    }
 
     OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject();
     if(pOutlinerParaObject!=NULL)


More information about the Libreoffice-commits mailing list