diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-26 12:11:18 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-26 12:25:24 -0400 |
commit | 588329f5d2e4f7515380fc8b15d55a1d5c0cb16f (patch) | |
tree | 254261c926babd1a8af3456870abfed892de6e38 /sc | |
parent | 74881f6a87c260fa32bd3ba5489c6ce6f5b9caf0 (diff) |
bool cleanup.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/table.hxx | 33 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 28 |
2 files changed, 30 insertions, 31 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index dc8706c5208a..07562dd3a3de 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 2abaf370537b..240d1d9025fe 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; |