diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-19 17:52:35 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-20 10:06:46 +0900 |
commit | 677a3f75e77b35f256b77b1de727790b468ab899 (patch) | |
tree | 0a28667f58b6361bd5cdc550d2963a26a58f8c52 /sw | |
parent | 9b24ce6da284505aed2bbaf4ad2790c161fbc232 (diff) |
sal_Bool to bool
Change-Id: Icc13eb7a8c6720ac53163e3ee7842a22c2862ab3
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 16 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/swtable.hxx | 46 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/tblcpy.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 166 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 38 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/inc/UndoTable.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/tblrwcl.hxx | 22 | ||||
-rw-r--r-- | sw/source/core/table/swnewtable.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtftbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.hxx | 2 |
17 files changed, 193 insertions, 193 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 28f06ff8832c..01276165ac52 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1622,14 +1622,14 @@ public: sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh ); /// Create columns / rows in table. - sal_Bool InsertCol( const SwCursor& rCursor, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertCol( const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( const SwCursor& rCursor, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); + bool InsertCol( const SwCursor& rCursor, + sal_uInt16 nCnt = 1, bool bBehind = true ); + bool InsertCol( const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, bool bBehind = true ); + bool InsertRow( const SwCursor& rCursor, + sal_uInt16 nCnt = 1, bool bBehind = true ); + bool InsertRow( const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, bool bBehind = true ); /// Delete Colums/Rows in table. sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 6c8faeee8475..dc4968a329c1 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -597,8 +597,8 @@ public: /// Is content of a table cell or at least a table cell completely selected? sal_Bool HasBoxSelection() const; - sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ); - sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == at the end. + bool InsertRow( sal_uInt16 nCnt, bool bBehind ); + bool InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end. sal_Bool DeleteCol(); sal_Bool DeleteRow(); diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index c1f81a6d4838..59c75045d209 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -156,15 +156,15 @@ private: SwTable & operator= (const SwTable &); // no default ctor. SwTable(); - sal_Bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* ); - sal_Bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool ); + bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* ); + bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, bool ); sal_Bool NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged, SwTableBox*, SwUndoTblMerge* ); sal_Bool NewSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool ); SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const; void InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nIdx, sal_uInt16 nCnt ); - sal_Bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, sal_Bool bBehind ); - sal_Bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool ); + bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, bool bBehind ); + bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool ); void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* ); void AdjustWidths( const long nOld, const long nNew ); void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld, @@ -233,8 +233,8 @@ public: return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) : OldMerge( pDoc, rBoxes, pMergeBox, pUndo ); } - sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1, - sal_Bool bSameHeight = sal_False ) + bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1, + bool bSameHeight = false ) { #ifdef DBG_UTIL m_bDontChangeModel = true; @@ -247,15 +247,15 @@ public: void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const; void PrepareDeleteCol( long nMin, long nMax ); - sal_Bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 ); + bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, bool bBehind = true ); + bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt = 1, bool bBehind = true ); + bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 ); void PrepareDelBoxes( const SwSelBoxes& rBoxes ); - sal_Bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, - SwUndo* pUndo, const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder ); - sal_Bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 ); + bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, + SwUndo* pUndo, const bool bDelMakeFrms, const bool bCorrBorder ); + bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 ); sal_Bool Merge( const SwSelBoxes& rBoxes, SwTableBox* pMergeBox, SwUndoTblMerge* = 0 ); @@ -282,8 +282,8 @@ public: const SwTableBox* GetTblBox( const String& rName, const bool bPerformValidCheck = false ) const; // Copy selected boxes to another document. - sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&, - sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const; + bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&, + bool bCpyNds = true, bool bCpyName = false ) const; // Copy table in this (implemented in TBLRWCL.CXX). sal_Bool InsTable( const SwTable& rCpyTbl, const SwNodeIndex&, SwUndoTblCpyTbl* pUndo = 0 ); @@ -292,7 +292,7 @@ public: sal_Bool InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&, SwUndoTblCpyTbl* pUndo ); // Copy headline of table (with content!) into an other one. - sal_Bool CopyHeadlineIntoTable( SwTableNode& rTblNd ); + bool CopyHeadlineIntoTable( SwTableNode& rTblNd ); // Get box, whose start index is set on nBoxStt. SwTableBox* GetTblBox( sal_uLong nSttIdx ); @@ -336,9 +336,9 @@ public: TblChgMode GetTblChgMode() const { return eTblChgMode; } void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; } - sal_Bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, + bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); - sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, + bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); void RegisterToFormat( SwFmt& rFmt ); #ifdef DBG_UTIL @@ -378,9 +378,9 @@ public: // Search next/previous box with content. SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; + bool bOvrTblLns=true ) const; SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; + bool bOvrTblLns=true ) const; SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const; @@ -437,9 +437,9 @@ public: // Search next/previous box with content. SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; + bool bOvrTblLns=true ) const; SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; + bool bOvrTblLns=true ) const; // Return name of this box. It is determined dynamically and // is calculated from the position in the lines/boxes/table. String GetName() const; diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 9d94145e0dba..06b10d56059b 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -818,7 +818,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet, rTbl.MakeCopy( this, aPos, *pSelBoxes ); // Don't delete a part of a table with row span!! // You could delete the content instead -> ToDo - //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, sal_True, sal_True ); + //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, true, true ); } // If the table is within the frame, then copy without the following TextNode diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 9083b127cf4d..1726c4b1ca49 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -694,7 +694,7 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox if( pUndo ) pUndo->InsertRow( *this, aBoxes, aTarget.mnAddLine ); else - InsertRow( pDoc, aBoxes, aTarget.mnAddLine, sal_True ); + InsertRow( pDoc, aBoxes, aTarget.mnAddLine, true ); aTarget.moreLines( *this ); bClear = true; @@ -780,11 +780,11 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox, // Do not create empty Sections, otherwise they will be deleted! lcl_CpyBox( rCpyTbl, pCpyBox, *this, pMyBox, bDelCntnt, pUndo ); - if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, sal_False ))) + if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, false ))) break; // no more Boxes pCpyBox = pTmp; - if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, sal_False ))) + if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, false ))) bDelCntnt = sal_False; // No space left? else pMyBox = (SwTableBox*)pTmp; @@ -907,7 +907,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes, ? !pUndo->InsertRow( *this, SelLineFromBox( pInsBox, aBoxes, sal_True ), nNewLns ) : !InsertRow( pDoc, SelLineFromBox( pInsBox, - aBoxes, sal_True ), nNewLns, sal_True ) ) + aBoxes, sal_True ), nNewLns, true ) ) return sal_False; } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 1007871b2acf..240ccac7f68a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -519,14 +519,14 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine ) return 0; } -sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) { OSL_ENSURE( !rBoxes.empty() && nCnt, "No valid Box List" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; - sal_Bool bRes = sal_True; + bool bRes = true; if( IsNewModel() ) bRes = NewInsertCol( pDoc, rBoxes, nCnt, bBehind ); else @@ -538,7 +538,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n ForEach_FndLineCopyCol( GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; SetHTMLTableLayout( 0 ); // Delete HTML Layout @@ -563,7 +563,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n CHECKBOXWIDTH; CHECKTABLELAYOUT; - bRes = sal_True; + bRes = true; } SwChartDataProvider *pPCD = pDoc->GetChartDataProvider(); @@ -574,13 +574,13 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n return bRes; } -sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt, bool bBehind ) { OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid Box List" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; // Find all Boxes/Lines _FndBox aFndBox( 0, 0 ); @@ -589,7 +589,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, ForEach_FndLineCopyCol( GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; SetHTMLTableLayout( 0 ); // Delete HTML Layout @@ -671,7 +671,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind ); pDoc->UpdateCharts( GetFrmFmt()->GetName() ); - return sal_True; + return true; } void _FndBoxAppendRowLine( SwTableLine* pLine, _FndPara* pFndPara ); @@ -706,12 +706,12 @@ void _FndBoxAppendRowLine( SwTableLine* pLine, _FndPara* pFndPara ) delete pFndLine; } -sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt ) +bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt ) { SwTableNode *const pTblNd = const_cast<SwTableNode*>( m_TabSortContentBoxes[0]->GetSttNd()->FindTableNode()); if( !pTblNd ) - return sal_False; + return false; // Find all Boxes/Lines _FndBox aFndBox( 0, 0 ); @@ -724,7 +724,7 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt ) _FndBoxAppendRowLine(pLLine, &aPara); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; SetHTMLTableLayout( 0 ); // Delete HTML Layout @@ -764,7 +764,7 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt ) CHECKBOXWIDTH; CHECKTABLELAYOUT; - return sal_True; + return true; } static void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset, @@ -1071,12 +1071,12 @@ lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox, } } -sal_Bool SwTable::DeleteSel( +bool SwTable::DeleteSel( SwDoc* pDoc , const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, SwUndo* pUndo, - const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder ) + const bool bDelMakeFrms, const bool bCorrBorder ) { OSL_ENSURE( pDoc, "No doc?" ); SwTableNode* pTblNd = 0; @@ -1084,7 +1084,7 @@ sal_Bool SwTable::DeleteSel( { pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; } SetHTMLTableLayout( 0 ); // Delete HTML Layout @@ -1143,16 +1143,16 @@ sal_Bool SwTable::DeleteSel( CHECKTABLELAYOUT; CHECK_TABLE( *this ); - return sal_True; + return true; } -sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, - sal_Bool bSameHeight ) +bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, + bool bSameHeight ) { OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; // TL_CHART2: splitting/merging of a number of cells or rows will usually make // the table too complex to be handled with chart. @@ -1286,15 +1286,15 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 CHECKBOXWIDTH CHECKTABLELAYOUT - return sal_True; + return true; } -sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) +bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) { OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; // TL_CHART2: splitting/merging of a number of cells or rows will usually make // the table too complex to be handled with chart. @@ -1396,7 +1396,7 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC CHECKBOXWIDTH CHECKTABLELAYOUT - return sal_True; + return true; } /* @@ -1733,13 +1733,13 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara) static void lcl_BoxSetHeadCondColl( const SwTableBox* pBox ); -sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, +bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, SwTableBox* pMergeBox, SwUndoTblMerge* pUndo ) { OSL_ENSURE( !rBoxes.empty() && pMergeBox, "no valid values" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; // Find all Boxes/Lines _FndBox aFndBox( 0, 0 ); @@ -1748,7 +1748,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, ForEach_FndLineCopyCol( GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; // TL_CHART2: splitting/merging of a number of cells or rows will usually make // the table too complex to be handled with chart. @@ -1837,7 +1837,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, pUndo->AddNewBox( pRightBox->GetSttIdx() ); } - DeleteSel( pDoc, rBoxes, 0, 0, sal_False, sal_False ); + DeleteSel( pDoc, rBoxes, 0, 0, false, false ); // Clean up this Line's structure once again, generally all of them GCLines(); @@ -1851,7 +1851,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, CHECKBOXWIDTH CHECKTABLELAYOUT - return sal_True; + return true; } static void lcl_CheckRowSpan( SwTable &rTbl ) @@ -2181,7 +2181,7 @@ lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara) ++pCpyPara->nLnIdx; } -sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd ) +bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd ) { // Find all Boxes/Lines SwSelBoxes aSelBoxes; @@ -2195,7 +2195,7 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd ) ForEach_FndLineCopyCol( GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; { // Convert Table formulas to their relative representation @@ -2225,12 +2225,12 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd ) } } - return sal_True; + return true; } -sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, - const SwSelBoxes& rSelBoxes, sal_Bool bCpyNds, - sal_Bool bCpyName ) const +bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, + const SwSelBoxes& rSelBoxes, bool bCpyNds, + bool bCpyName ) const { // Find all Boxes/Lines _FndBox aFndBox( 0, 0 ); @@ -2239,7 +2239,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, ForEach_FndLineCopyCol( (SwTableLines&)GetTabLines(), &aPara ); } if( aFndBox.GetLines().empty() ) - return sal_False; + return false; // First copy the PoolTemplates for the Table, so that the Tables are // actually copied and have valid values. @@ -2255,7 +2255,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, rPos, 1, 1, GetFrmFmt()->GetHoriOrient().GetHoriOrient(), 0, 0, sal_False, IsNewModel() ); if( !pNewTbl ) - return sal_False; + return false; SwNodeIndex aIdx( rPos.nNode, -1 ); SwTableNode* pTblNd = aIdx.GetNode().FindTableNode(); @@ -2373,12 +2373,12 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, CHECKTABLELAYOUT - return sal_True; + return true; } // Find the next Box with content from this Line SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl, - const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const + const SwTableBox* pSrchBox, bool bOvrTblLns ) const { const SwTableLine* pLine = this; // for M800 SwTableBox* pBox; @@ -2426,7 +2426,7 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl, // Find the previous Box from this Line SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl, - const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const + const SwTableBox* pSrchBox, bool bOvrTblLns ) const { const SwTableLine* pLine = this; // for M800 SwTableBox* pBox; @@ -2480,7 +2480,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl, // Find the next Box with content from this Line SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl, - const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const + const SwTableBox* pSrchBox, bool bOvrTblLns ) const { if( !pSrchBox && GetTabLines().empty() ) return (SwTableBox*)this; @@ -2491,7 +2491,7 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl, // Find the next Box with content from this Line SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl, - const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const + const SwTableBox* pSrchBox, bool bOvrTblLns ) const { if( !pSrchBox && GetTabLines().empty() ) return (SwTableBox*)this; @@ -2583,7 +2583,7 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i ) { rParam.nLowerDiff = 0; - lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, sal_False ); + lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, false ); if( nLowerDiff < rParam.nLowerDiff ) nLowerDiff = rParam.nLowerDiff; @@ -2684,7 +2684,7 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, { rParam.nLowerDiff = 0; lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ], rParam, - nDist, sal_False ); + nDist, false ); if( nLowerDiff < rParam.nLowerDiff ) nLowerDiff = rParam.nLowerDiff; @@ -2785,7 +2785,7 @@ static bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i ) { rParam.nLowerDiff = 0; - lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, sal_False ); + lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, false ); if( nLowerDiff < rParam.nLowerDiff ) nLowerDiff = rParam.nLowerDiff; @@ -2968,7 +2968,7 @@ static bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam, { rParam.nLowerDiff = 0; lcl_InsOtherBox( pBox->GetTabLines()[ i ], rParam, - nDist, sal_False ); + nDist, false ); if( nLowerDiff < rParam.nLowerDiff ) nLowerDiff = rParam.nLowerDiff; @@ -3558,7 +3558,7 @@ static _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo, return pFndBox; } -sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, +bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ) { SetHTMLTableLayout( 0 ); // Delete HTML Layout @@ -3568,8 +3568,8 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, _FndBox* pFndBox = 0; // for insertion/deletion SwTableSortBoxes aTmpLst; // for Undo - sal_Bool bBigger, - bRet = sal_False, + bool bBigger, + bRet = false, bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) || nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff ), bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL ); @@ -3638,7 +3638,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, ( bLeft ? rLR.GetRight() >= nAbsDiff : rLR.GetLeft() >= nAbsDiff )) { - bRet = sal_True; bLeft = !bLeft; + bRet = true; bLeft = !bLeft; } if( !bRet ) @@ -3655,13 +3655,13 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, } else { - bRet = sal_True; + bRet = true; for( n = 0; n < aLines.size(); ++n ) { aParam.LoopClear(); if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true )) { - bRet = sal_False; + bRet = false; break; } } @@ -3678,7 +3678,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { // This whole Table is to be deleted! GetFrmFmt()->GetDoc()->DeleteRowCol(aParam.m_Boxes); - return sal_False; + return false; } if( ppUndo ) @@ -3784,7 +3784,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, else if( bInsDel || ( bLeft ? nDist : Abs( rSz.GetWidth() - nDist ) > COLFUZZY ) ) { - bRet = sal_True; + bRet = true; if( bLeft && TBLFIX_CHGABS == eTblChgMode && !bInsDel ) aParam.bBigger = !bBigger; @@ -3798,14 +3798,14 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.LoopClear(); if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true )) { - bRet = sal_False; + bRet = false; break; } } } else { - if( 0 != ( bRet = bLeft ? nDist != 0 + if( ( bRet = bLeft ? nDist != 0 : ( rSz.GetWidth() - nDist ) > COLFUZZY ) ) { for( n = 0; n < aLines.size(); ++n ) @@ -3813,12 +3813,12 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.LoopClear(); if( !(*fnOtherBox)( aLines[ n ], aParam, 0, true )) { - bRet = sal_False; + bRet = false; break; } } if( bRet && !aParam.bAnyBoxFnd ) - bRet = sal_False; + bRet = false; } if( !bRet && rAktBox.GetFrmFmt()->GetFrmSize().GetWidth() @@ -3828,14 +3828,14 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, // Consume the space from the current Cell aParam.bSplittBox = true; // We also need to test this! - bRet = sal_True; + bRet = true; for( n = 0; n < aLines.size(); ++n ) { aParam.LoopClear(); if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true )) { - bRet = sal_False; + bRet = false; break; } } @@ -3849,7 +3849,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.LoopClear(); if( !(*fnOtherBox)( aLines[ n ], aParam, 0, true )) { - bRet = sal_False; + bRet = false; break; } } @@ -3861,7 +3861,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, aParam.LoopClear(); if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, true )) { - bRet = sal_False; + bRet = false; break; } } @@ -3963,7 +3963,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { bRet = (*fnOtherBox)( pLine, aParam, 0, true ); if( bRet && !aParam.bAnyBoxFnd ) - bRet = sal_False; + bRet = false; } if( !bRet && !aParam.bBigger && rAktBox.GetFrmFmt()-> @@ -3972,7 +3972,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, { // Consume the room from the current Cell aParam.bSplittBox = true; - bRet = sal_True; + bRet = true; } } else @@ -4294,7 +4294,7 @@ static bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam, return bRet; } -sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, +bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, SwTwips nAbsDiff, SwTwips nRelDiff,SwUndo** ppUndo ) { SwTableLine* pLine = rAktBox.GetUpper(); @@ -4305,8 +4305,8 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, _FndBox* pFndBox = 0; // for insertion/deletion SwTableSortBoxes aTmpLst; // for Undo - sal_Bool bBigger, - bRet = sal_False, + bool bBigger, + bRet = false, bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) || nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff ), bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL ); @@ -4352,7 +4352,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, // First test if we have room at all if( bBigger ) { - bRet = sal_True; + bRet = true; // What's up with Top, Table in a Frame or Header/Footer with fixed width?? if( !bRet ) { @@ -4388,7 +4388,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, aParam.m_Boxes.size() == m_TabSortContentBoxes.size()) { GetFrmFmt()->GetDoc()->DeleteRowCol(aParam.m_Boxes); - return sal_False; + return false; } @@ -4401,12 +4401,12 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True ); (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam, - nAbsDiff, sal_False ); + nAbsDiff, false ); } } else { - bRet = sal_True; + bRet = true; sal_uInt16 nStt, nEnd; if( bTop ) nStt = 0, nEnd = nBaseLinePos; @@ -4424,7 +4424,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, aParam.nMaxHeight += pLineFrm->Frm().Height(); } if( bBigger && aParam.nMaxSpace < nAbsDiff ) - bRet = sal_False; + bRet = false; } else { @@ -4436,7 +4436,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, nEnd = nStt + 1; } else - bRet = sal_False; + bRet = false; } if( bRet ) @@ -4448,7 +4448,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, if( !(*fnOtherLine)( (*pLines)[ n ], aParam, nAbsDiff, true )) { - bRet = sal_False; + bRet = false; break; } } @@ -4489,18 +4489,18 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, if( bTop ) { (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam, - nAbsDiff, sal_False ); + nAbsDiff, false ); for( n = nStt; n < nEnd; ++n ) (*fnOtherLine)( (*pLines)[ n ], aParam1, - nAbsDiff, sal_False ); + nAbsDiff, false ); } else { for( n = nStt; n < nEnd; ++n ) (*fnOtherLine)( (*pLines)[ n ], aParam1, - nAbsDiff, sal_False ); + nAbsDiff, false ); (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam, - nAbsDiff, sal_False ); + nAbsDiff, false ); } } else @@ -4704,7 +4704,7 @@ void SwShareBoxFmts::RemoveFormat( const SwFrmFmt& rFmt ) aShareArr.erase( aShareArr.begin() + i ); } -sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const +bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const { sal_uLong nIdx = (sal_uLong)&rFmt; sal_uInt16 nO = aShareArr.size(), nM, nU = 0; @@ -4719,7 +4719,7 @@ sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) co { if( pPos ) *pPos = nM; - return sal_True; + return true; } else if( nFmt < nIdx ) nU = nM + 1; @@ -4727,7 +4727,7 @@ sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) co { if( pPos ) *pPos = nU; - return sal_False; + return false; } else nO = nM - 1; @@ -4735,7 +4735,7 @@ sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) co } if( pPos ) *pPos = nU; - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0aff3651af6a..4d752cd4241f 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1679,31 +1679,31 @@ sal_Bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, /** * Inserting Columns/Rows */ -sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) { if( !::CheckSplitCells( rCursor, nCnt + 1, nsSwTblSearchType::TBLSEARCH_COL ) ) - return sal_False; + return false; // Find the Boxes via the Layout SwSelBoxes aBoxes; ::GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL ); - sal_Bool bRet = sal_False; + bool bRet = false; if( !aBoxes.empty() ) bRet = InsertCol( aBoxes, nCnt, bBehind ); return bRet; } -sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) { OSL_ENSURE( !rBoxes.empty(), "No valid Box list" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; SwTable& rTbl = pTblNd->GetTable(); if( rTbl.ISA( SwDDETable )) - return sal_False; + return false; SwTableSortBoxes aTmpLst; SwUndoTblNdsChg* pUndo = 0; @@ -1744,28 +1744,28 @@ sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool b return bRet; } -sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind ) { // Find the Boxes via the Layout SwSelBoxes aBoxes; GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW ); - sal_Bool bRet = sal_False; + bool bRet = false; if( !aBoxes.empty() ) bRet = InsertRow( aBoxes, nCnt, bBehind ); return bRet; } -sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ) { OSL_ENSURE( !rBoxes.empty(), "No valid Box list" ); SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode(); if( !pTblNd ) - return sal_False; + return false; SwTable& rTbl = pTblNd->GetTable(); if( rTbl.ISA( SwDDETable )) - return sal_False; + return false; SwTableSortBoxes aTmpLst; SwUndoTblNdsChg* pUndo = 0; @@ -1864,7 +1864,7 @@ sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor ) pDelBox = pLn->GetTabBoxes().back(); } SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(), - pDelBox, sal_True ); + pDelBox, true ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox ); @@ -1876,7 +1876,7 @@ sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor ) while( !pDelBox->GetSttNd() ) pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0]; pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(), - pDelBox, sal_True ); + pDelBox, true ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox ); @@ -2121,7 +2121,7 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) if (pUndo) pUndo->ReNewBoxes( aSelBoxes ); } - bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, sal_True, sal_True ); + bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, true, true ); if (bRet) { SetModified(); @@ -2968,7 +2968,7 @@ const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox ) return pRet; } -sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth ) +bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth ) { sal_uInt16 n; @@ -3001,7 +3001,7 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth return !aPosArr.empty(); } -sal_Bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara ) +bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara ) { SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara; if( pSplPara->IsGetValues() ) @@ -3012,7 +3012,7 @@ sal_Bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara ) for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin(); it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it) sw_BoxSetSplitBoxFmts(*it, pSplPara ); - return sal_True; + return true; } void sw_Box_CollectBox( const SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara ) @@ -4275,7 +4275,7 @@ sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, { ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); bRet = pSrcTblNd->GetTable().MakeCopy( this, rInsPos, rBoxes, - sal_True, bCpyName ); + true, bCpyName ); } if( pUndo ) @@ -4320,7 +4320,7 @@ sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, pCpyDoc->acquire(); SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() )); - if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, sal_True, sal_True )) + if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, true, true )) { if( pCpyDoc->release() == 0 ) delete pCpyDoc; diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index e66851fc3084..04773d6123da 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -197,18 +197,18 @@ void SwFEShell::ParkCursorInTab() #* Class : SwFEShell #* Methods : InsertRow(), InsertCol #***********************************************************************/ -sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); @@ -220,7 +220,7 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); - sal_Bool bRet = sal_False; + bool bRet = false; if ( aBoxes.size() ) bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind ); @@ -228,18 +228,18 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ) return bRet; } -sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table SwFrm *pFrm = GetCurrFrm(); if( !pFrm || !pFrm->IsInTab() ) - return sal_False; + return false; if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable )) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } SET_CURR_SHELL( this ); @@ -248,7 +248,7 @@ sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ) { ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); - return sal_False; + return false; } StartAllAction(); @@ -258,7 +258,7 @@ sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ) TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); - sal_Bool bRet = sal_False; + bool bRet = false; if( !aBoxes.empty() ) bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind ); @@ -403,7 +403,7 @@ sal_Bool SwFEShell::DeleteRow() pDelBox = pLn->GetTabBoxes().back(); } SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(), - pDelBox, sal_True ); + pDelBox, true ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox ); @@ -415,7 +415,7 @@ sal_Bool SwFEShell::DeleteRow() while( !pDelBox->GetSttNd() ) pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0]; pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(), - pDelBox, sal_True ); + pDelBox, true ); while( pNextBox && pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox ); diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 32bae4337b5c..5d105ef45e92 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -305,7 +305,7 @@ public: sal_Bool bDelCntnt ); sal_Bool IsEmpty() const; - sal_Bool InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ); + bool InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ); }; class SwUndoCpyTbl : public SwUndo diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx index a853ee913c9a..3b82d38954b1 100644 --- a/sw/source/core/inc/tblrwcl.hxx +++ b/sw/source/core/inc/tblrwcl.hxx @@ -74,14 +74,14 @@ class SwCollectTblLineBoxes std::vector<SwTableBox*> m_Boxes; SwHistory* pHst; sal_uInt16 nMode, nWidth; - sal_Bool bGetFromTop : 1; - sal_Bool bGetValues : 1; + bool bGetFromTop : 1; + bool bGetValues : 1; public: - SwCollectTblLineBoxes( sal_Bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 ) + SwCollectTblLineBoxes( bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 ) : pHst( pHist ), nMode( nMd ), nWidth( 0 ), - bGetFromTop( bTop ), bGetValues( sal_True ) + bGetFromTop( bTop ), bGetValues( true ) {} @@ -99,17 +99,17 @@ public: return *m_Boxes[ nPos ]; } - sal_Bool IsGetFromTop() const { return bGetFromTop; } - sal_Bool IsGetValues() const { return bGetValues; } + bool IsGetFromTop() const { return bGetFromTop; } + bool IsGetValues() const { return bGetValues; } sal_uInt16 GetMode() const { return nMode; } - void SetValues( sal_Bool bFlag ) { bGetValues = sal_False; nWidth = 0; + void SetValues( bool bFlag ) { bGetValues = false; nWidth = 0; bGetFromTop = bFlag; } - sal_Bool Resize( sal_uInt16 nOffset, sal_uInt16 nWidth ); + bool Resize( sal_uInt16 nOffset, sal_uInt16 nWidth ); }; void sw_Box_CollectBox( const SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara ); -sal_Bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara ); +bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara ); void sw_BoxSetSplitBoxFmts( SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara ); @@ -133,7 +133,7 @@ struct _SwGCLineBorder _SwGCLineBorder( const SwTableBox& rBox ) : pLines( &rBox.GetTabLines() ), pShareFmts(0), nLinePos( 0 ) {} - sal_Bool IsLastLine() const { return nLinePos + 1 >= (sal_uInt16)pLines->size(); } + bool IsLastLine() const { return nLinePos + 1 >= (sal_uInt16)pLines->size(); } }; class _SwGCBorder_BoxBrd @@ -181,7 +181,7 @@ typedef boost::ptr_vector<SwShareBoxFmt> _SwShareBoxFmts; class SwShareBoxFmts { _SwShareBoxFmts aShareArr; - sal_Bool Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const; + bool Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const; void ChangeFrmFmt( SwTableBox* pBox, SwTableLine* pLn, SwFrmFmt& rFmt ); diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 553e5dfcdc1e..a8b76d83dafe 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -97,7 +97,7 @@ sal_Bool SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, { if( pUndo ) pUndo->SetSelBoxes( rBoxes ); - DeleteSel( pDoc, rBoxes, &rMerged, 0, sal_True, sal_True ); + DeleteSel( pDoc, rBoxes, &rMerged, 0, true, true ); CHECK_TABLE( *this ) return sal_True; @@ -607,7 +607,7 @@ static void lcl_InvalidateCellFrm( const SwTableBox& rBox ) */ static long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos, - const SwSelBoxes& rBoxes, sal_Bool bBehind ) + const SwSelBoxes& rBoxes, bool bBehind ) { sal_Int32 nAddWidth = 0; long nCount = 0; @@ -652,11 +652,11 @@ insertion behind (true) or before (false) the selected boxes */ -sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt, bool bBehind ) { if( aLines.empty() || !nCnt ) - return sal_False; + return false; CHECK_TABLE( *this ) long nNewBoxWidth = 0; @@ -678,12 +678,12 @@ sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, nAddWidth *= nCnt; // we have to insert nCnt boxes per line sal_uInt64 nResultingWidth = nAddWidth + nTableWidth; if( !nResultingWidth ) - return sal_False; + return false; nAddWidth = (nAddWidth * nTableWidth) / nResultingWidth; nNewBoxWidth = long( nAddWidth / nCnt ); // Rounding nAddWidth = nNewBoxWidth * nCnt; // Rounding if( !nAddWidth || nAddWidth >= nTableWidth ) - return sal_False; + return false; AdjustWidths( static_cast< long >(nTableWidth), static_cast< long >(nTableWidth - nAddWidth) ); } @@ -781,7 +781,7 @@ sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, #endif CHECK_TABLE( *this ) - return sal_True; + return true; } /** SwTable::PrepareMerge(..) some preparation for the coming Merge(..) @@ -1169,7 +1169,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt aFSz.SetHeight( nNewHeight ); pFrmFmt->SetFmtAttr( aFSz ); } - _InsertRow( pDoc, aBoxes, nCnt, sal_True ); + _InsertRow( pDoc, aBoxes, nCnt, true ); sal_uInt16 nBoxCount = rLine.GetTabBoxes().size(); for( sal_uInt16 n = 0; n < nCnt; ++n ) { @@ -1482,8 +1482,8 @@ sal_Bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 boxes. */ -sal_Bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt, sal_Bool bBehind ) +bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, + sal_uInt16 nCnt, bool bBehind ) { bool bRet = false; if( IsNewModel() ) diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index ffef1ea69754..1af7fc0a3c6b 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1865,7 +1865,7 @@ void SwUndoTblNdsChg::RedoImpl(::sw::UndoRedoContext & rContext) SwTable &rTable = pTblNd->GetTable(); if( nMax > nMin && rTable.IsNewModel() ) rTable.PrepareDeleteCol( nMin, nMax ); - rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, sal_True, sal_True ); + rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, true, true ); } else { @@ -2777,7 +2777,7 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, return pUndo; } -sal_Bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, +bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt ) { SwTableNode* pTblNd = (SwTableNode*)rTbl.GetTabSortBoxes()[0]-> @@ -2787,7 +2787,7 @@ sal_Bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, 0, 0, nCnt, sal_True, sal_False ); SwTableSortBoxes aTmpLst( rTbl.GetTabSortBoxes() ); - sal_Bool bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, sal_True ); + bool bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, true ); if( bRet ) pInsRowUndo->SaveNewBoxes( *pTblNd, aTmpLst ); else @@ -2909,7 +2909,7 @@ void SwUndoSplitTbl::UndoImpl(::sw::UndoRedoContext & rContext) _FndBox aTmpBox( 0, 0 ); aTmpBox.SetTableLines( aSelBoxes, rTbl ); aTmpBox.DelFrms( rTbl ); - rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, sal_False, sal_False ); + rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, false, false ); } break; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 6d5c49c57f96..a873bad1c284 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4759,10 +4759,10 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno: String sTLName = sw_GetCellName(0, nIndex); const SwTableBox* pTLBox = pTable->GetTblBox( sTLName ); - sal_Bool bAppend = sal_False; + bool bAppend = false; if(!pTLBox) { - bAppend = sal_True; + bAppend = true; // am Ende anfuegen, dazu muss der Cursor in die letzte Zeile! SwTableLines& rLines = pTable->GetTabLines(); SwTableLine* pLine = rLines.back(); @@ -4971,10 +4971,10 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u String sTLName = sw_GetCellName(nIndex, 0); const SwTableBox* pTLBox = pTable->GetTblBox( sTLName ); - sal_Bool bAppend = sal_False; + bool bAppend = false; if(!pTLBox) { - bAppend = sal_True; + bAppend = true; // am Ende anfuegen, dazu muss der Cursor in die letzte Spalte! SwTableBoxes& rBoxes = pLine->GetTabBoxes(); pTLBox = rBoxes.back(); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 8d5172c4f71a..9bb78d66a96c 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -602,11 +602,11 @@ public: inline void CloseSection( sal_Bool bHead ); // Ende einer Spalten-Gruppe bekanntgeben - inline void CloseColGroup( sal_uInt16 nSpan, sal_uInt16 nWidth, sal_Bool bRelWidth, + inline void CloseColGroup( sal_uInt16 nSpan, sal_uInt16 nWidth, bool bRelWidth, SvxAdjust eAdjust, sal_Int16 eVertOri ); // Einfuegen einer Spalte - void InsertCol( sal_uInt16 nSpan, sal_uInt16 nWidth, sal_Bool bRelWidth, + void InsertCol( sal_uInt16 nSpan, sal_uInt16 nWidth, bool bRelWidth, SvxAdjust eAdjust, sal_Int16 eVertOri ); // Beenden einer Tab-Definition (MUSS fuer ALLE Tabs aufgerufen werden) @@ -2311,7 +2311,7 @@ void HTMLTable::CloseRow( sal_Bool bEmpty ) } inline void HTMLTable::CloseColGroup( sal_uInt16 nSpan, sal_uInt16 _nWidth, - sal_Bool bRelWidth, SvxAdjust eAdjust, + bool bRelWidth, SvxAdjust eAdjust, sal_Int16 eVertOrient ) { if( nSpan ) @@ -2322,7 +2322,7 @@ inline void HTMLTable::CloseColGroup( sal_uInt16 nSpan, sal_uInt16 _nWidth, ((*pColumns)[nCurCol-1]).SetEndOfGroup(); } -void HTMLTable::InsertCol( sal_uInt16 nSpan, sal_uInt16 nColWidth, sal_Bool bRelWidth, +void HTMLTable::InsertCol( sal_uInt16 nSpan, sal_uInt16 nColWidth, bool bRelWidth, SvxAdjust eAdjust, sal_Int16 eVertOrient ) { // #i35143# - no columns, if rows already exist. diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index 844e642494d6..1f855ce6a007 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -829,7 +829,7 @@ void SwRTFParser::NewTblLine() nInsTblRow = USHRT_MAX; // erweiter die aktuelle um eine neue Line - sal_Bool bMakeCopy = sal_False; + bool bMakeCopy = false; SwNode* pNd = pDoc->GetNodes()[ pPam->GetPoint()->nNode.GetIndex()-1 ]; if( !pNd->IsEndNode() || !(pNd = pNd->StartOfSectionNode())->IsTableNode() ) @@ -837,7 +837,7 @@ void SwRTFParser::NewTblLine() if( !pOldTblNd ) return ; - bMakeCopy = sal_True; + bMakeCopy = true; pNd = pOldTblNd; } pTableNode = (SwTableNode*)pNd; @@ -853,7 +853,7 @@ void SwRTFParser::NewTblLine() if( !bMakeCopy && 64000 < pTableNode->GetTable().GetTabSortBoxes().size() ) { - bMakeCopy = sal_True; // spaetestens jetzt eine neue anfangen! + bMakeCopy = true; // spaetestens jetzt eine neue anfangen! } if( bMakeCopy ) @@ -862,7 +862,7 @@ void SwRTFParser::NewTblLine() SwSelBoxes aBoxes; pTableNode->GetTable().SelLineFromBox( pBox, aBoxes ); pTableNode->GetTable().MakeCopy( pDoc, *pPam->GetPoint(), - aBoxes, sal_False ); + aBoxes, false ); sal_uLong nNd = pPam->GetPoint()->nNode.GetIndex()-1; pTableNode = pDoc->GetNodes()[ nNd ]->FindTableNode(); pOldTblNd = pTableNode; diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 5d76fa4d0a89..644b1e580dcc 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1694,7 +1694,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, void SwXMLTableContext::InsertRow( const OUString& rStyleName, const OUString& rDfltCellStyleName, - sal_Bool bInHead, + bool bInHead, const OUString & i_rXmlId ) { OSL_ENSURE( nCurRow < USHRT_MAX, @@ -1737,7 +1737,7 @@ void SwXMLTableContext::InsertRepRows( sal_uInt32 nCount ) while( nCount > 1 && IsInsertRowPossible() ) { InsertRow( pSrcRow->GetStyleName(), pSrcRow->GetDefaultCellStyleName(), - sal_False ); + false ); while( nCurCol < GetColumnCount() ) { if( !GetCell(nCurRow,nCurCol)->IsUsed() ) diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index 39cf993da3c6..d87d068fc4e8 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -189,7 +189,7 @@ public: sal_Bool bTextValue = sal_False ); void InsertRow( const ::rtl::OUString& rStyleName, const ::rtl::OUString& rDfltCellStyleName, - sal_Bool bInHead, + bool bInHead, const ::rtl::OUString & i_rXmlId = ::rtl::OUString() ); void FinishRow(); void InsertRepRows( sal_uInt32 nCount ); |