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

matteocam matteo.campanelli at gmail.com
Tue Aug 12 09:44:02 PDT 2014


 editeng/source/editeng/impedit3.cxx |   12 ++++++++----
 include/editeng/editstat.hxx        |    2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit a9a2911235bc50c7a601f4cfee7f037fc414d504
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Aug 12 18:42:24 2014 +0200

    aStatus.isPageOverflow cleared only explicitly
    
    Change-Id: Ibee0dd287cd99b01bd8e18857bd4a069bee7b78a

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 5e0c19b..736e594 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -546,14 +546,18 @@ void ImpEditEngine::CheckAutoPageSize()
     // FIXME(matteocam)
     /* fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize)
                         ? "YES Overflow!\n"  : "NO Overflow!\n" ); */
-    fprintf( stderr, "aPaperSize.Height = %d\n", aPaperSize.Height() );
     // setting overflow status
-    sal_uInt32 nHeight = 1783; // XXX: hard coded for testing
+    sal_uInt32 nBoxHeight = 1783; // XXX: hard coded for testing
     //if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) {
-    if (GetTextHeight() > 1783) // XXX: CalcTextHeight here??
+    if (GetTextHeight() > nBoxHeight) // XXX: CalcTextHeight here??
+    {
         // which paragraph is the first to cause higher size of the box?
-        UpdateOverflowingParaNum( 1783 /*aPrevPaperSize.Height()*/ ); // XXX: currently only for horizontal text
+        UpdateOverflowingParaNum( nBoxHeight /*aPrevPaperSize.Height()*/ ); // XXX: currently only for horizontal text
         aStatus.SetPageOverflow(true);
+    } else
+    {
+        // No overflow if withing box boundaries
+        aStatus.SetPageOverflow(false);
     }
 
     if ( aPaperSize != aPrevPaperSize )
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index 3ab90bc..0aadd3d 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -98,7 +98,7 @@ public:
             EditStatus()                { nStatusBits = 0; nControlBits = 0;
                                           nPrevPara = -1; bIsPageOverflow = false; }
 
-    void    Clear()                     { nStatusBits = 0; bIsPageOverflow = false; }
+    void    Clear()                     { nStatusBits = 0; /*bIsPageOverflow = false;*/ }
     void    SetControlBits( sal_uLong nMask, bool bOn )
                 { SetFlags( nControlBits, nMask, bOn ); }
 


More information about the Libreoffice-commits mailing list