[Libreoffice-commits] .: sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Aug 26 09:24:58 PDT 2011


 sc/inc/table.hxx               |   33 ++++++++++++++++-----------------
 sc/source/core/data/table1.cxx |   28 ++++++++++++++--------------
 2 files changed, 30 insertions(+), 31 deletions(-)

New commits:
commit 588329f5d2e4f7515380fc8b15d55a1d5c0cb16f
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Fri Aug 26 12:11:18 2011 -0400

    bool cleanup.

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index dc8706c..07562dd 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -107,9 +107,6 @@ private:
     String          aName;
     String          aCodeName;
     String          aComment;
-    bool            bScenario;
-    bool            bLayoutRTL;
-    bool            bLoadingRTL;
 
     String          aLinkDoc;
     String          aLinkFlt;
@@ -120,7 +117,6 @@ private:
 
     // page style template
     String          aPageStyle;
-    bool            bPageSizeValid;
     Size            aPageSizeTwips;                 // size of the print-page
     SCCOL           nRepeatStartX;                  // repeating rows/columns
     SCCOL           nRepeatEndX;                    // REPEAT_NONE, if not used
@@ -148,15 +144,8 @@ private:
 
     ScSheetEvents*  pSheetEvents;
 
-    SCCOL           nTableAreaX;
-    SCROW           nTableAreaY;
-    bool            bTableAreaValid;
-
-                                            //  internal management
-    bool            bVisible;
-    bool            bStreamValid;
-    bool            bPendingRowHeights;
-    bool            bCalcNotification;
+    mutable SCCOL nTableAreaX;
+    mutable SCROW nTableAreaY;
 
     SCTAB           nTab;
     sal_uInt16          nRecalcLvl;             // recursion level Size-Recalc
@@ -170,10 +159,8 @@ private:
     // sort parameter to minimize stack size of quicksort
     ScSortParam     aSortParam;
     CollatorWrapper*    pSortCollator;
-    bool            bGlobalKeepQuery;
 
     ScRangeVec      aPrintRanges;
-    bool            bPrintEntireSheet;
 
     ScRange*        pRepeatColRange;
     ScRange*        pRepeatRowRange;
@@ -184,10 +171,22 @@ private:
     Color           aScenarioColor;
     Color           aTabBgColor;
     sal_uInt16          nScenarioFlags;
-    bool            bActiveScenario;
     ScDBData*       pDBDataNoName;
     mutable ScRangeName* mpRangeName;
-    bool            mbPageBreaksValid;
+
+    bool            bScenario:1;
+    bool            bLayoutRTL:1;
+    bool            bLoadingRTL:1;
+    bool            bPageSizeValid:1;
+    mutable bool    bTableAreaValid:1;
+    bool            bVisible:1;
+    bool            bStreamValid:1;
+    bool            bPendingRowHeights:1;
+    bool            bCalcNotification:1;
+    bool            bGlobalKeepQuery:1;
+    bool            bPrintEntireSheet:1;
+    bool            bActiveScenario:1;
+    bool            mbPageBreaksValid:1;
 
 friend class ScDocument;                    // for FillInfo
 friend class ScDocumentIterator;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2abaf37..240d1d9 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -233,12 +233,8 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
                     bool bColInfo, bool bRowInfo ) :
     aName( rNewName ),
     aCodeName( rNewName ),
-    bScenario( false ),
-    bLayoutRTL( false ),
-    bLoadingRTL( false ),
     nLinkMode( 0 ),
     aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ),
-    bPageSizeValid( false ),
     nRepeatStartX( SCCOL_REPEAT_NONE ),
     nRepeatStartY( SCROW_REPEAT_NONE ),
     pTabProtection( NULL ),
@@ -252,17 +248,11 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
     mpFilteredRows(new ScFlatBoolRowSegments),
     pOutlineTable( NULL ),
     pSheetEvents( NULL ),
-    bTableAreaValid( false ),
-    bVisible( true ),
-    bStreamValid( false ),
-    bPendingRowHeights( false ),
-    bCalcNotification( false ),
     nTab( nNewTab ),
     nRecalcLvl( 0 ),
     pDocument( pDoc ),
     pSearchText ( NULL ),
     pSortCollator( NULL ),
-    bPrintEntireSheet(true),
     pRepeatColRange( NULL ),
     pRepeatRowRange( NULL ),
     nLockCount( 0 ),
@@ -270,9 +260,20 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
     aScenarioColor( COL_LIGHTGRAY ),
     aTabBgColor( COL_AUTO ),
     nScenarioFlags( 0 ),
-    bActiveScenario( false ),
     pDBDataNoName(NULL),
     mpRangeName(NULL),
+    bScenario(false),
+    bLayoutRTL(false),
+    bLoadingRTL(false),
+    bPageSizeValid(false),
+    bTableAreaValid(false),
+    bVisible(true),
+    bStreamValid(false),
+    bPendingRowHeights(false),
+    bCalcNotification(false),
+    bGlobalKeepQuery(false),
+    bPrintEntireSheet(true),
+    bActiveScenario(false),
     mbPageBreaksValid(false)
 {
 
@@ -540,9 +541,8 @@ bool ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
     bool bRet = true;               //! merken?
     if (!bTableAreaValid)
     {
-        bRet = GetPrintArea( ((ScTable*)this)->nTableAreaX,
-                                ((ScTable*)this)->nTableAreaY, true );
-        ((ScTable*)this)->bTableAreaValid = true;
+        bRet = GetPrintArea(nTableAreaX, nTableAreaY, true);
+        bTableAreaValid = true;
     }
     rEndCol = nTableAreaX;
     rEndRow = nTableAreaY;


More information about the Libreoffice-commits mailing list