diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
commit | 7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch) | |
tree | 623358cf25839219ef4fd90eea4f3eaa55389a1f /sw/source/core/docnode | |
parent | 0d5167915b47df7c3e450614ea50d845ba959df3 (diff) |
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC)
is used to annotate legitimately unused parameters, so that static
analysis tools can tell legitimately unused parameters from truly
unnecessary ones. To that end, some patches for external modules
are also added, that are only applied when compiling with GCC and
add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/ndcopy.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl1.cxx | 32 | ||||
-rw-r--r-- | sw/source/core/docnode/node2lay.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 6 |
5 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index e3e01083301d..07bf4a4f2024 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -232,7 +232,7 @@ struct _MapTblFrmFmt {} }; -SV_DECL_VARARR( _MapTblFrmFmts, _MapTblFrmFmt, 0, 10 ) +SV_DECL_VARARR( _MapTblFrmFmts, _MapTblFrmFmt, 0 ) SV_IMPL_VARARR( _MapTblFrmFmts, _MapTblFrmFmt ); SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const @@ -1474,7 +1474,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, //Alle kopierten (also die neu erzeugten) Rahmen in ein weiteres Array //stopfen. Dort sizten sie passend zu den Originalen, damit hinterher //die Chains entsprechend aufgebaut werden koennen. - SvPtrarr aNewArr( 10, 10 ); + SvPtrarr aNewArr( 10 ); for ( sal_uInt16 n = 0; n < aArr.Count(); ++n ) { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index ba7581fa0c9d..f759441830c1 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -471,7 +471,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, pNdTbl->SetRowsToRepeat( nRowsToRepeat ); pNdTbl->SetTableModel( bNewModel ); - SvPtrarr aBoxFmtArr( 0, 16 ); + SvPtrarr aBoxFmtArr( 0 ); SwTableBoxFmt* pBoxFmt = 0; if( !bDfltBorders && !pTAFmt ) { @@ -758,7 +758,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, if( pTAFmt || ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) ) { sal_uInt8 nBoxArrLen = pTAFmt ? 16 : 4; - SvPtrarr aBoxFmtArr( nBoxArrLen, 0 ); + SvPtrarr aBoxFmtArr( nBoxArrLen ); { for( sal_uInt8 i = 0; i < nBoxArrLen; ++i ) aBoxFmtArr.Insert( (void*)0, i ); @@ -1680,7 +1680,7 @@ sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool b if( rTbl.ISA( SwDDETable )) return sal_False; - SwTableSortBoxes aTmpLst( 0, 5 ); + SwTableSortBoxes aTmpLst( 0 ); SwUndoTblNdsChg* pUndo = 0; if (GetIDocumentUndoRedo().DoesUndo()) { @@ -1743,7 +1743,7 @@ sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool b if( rTbl.ISA( SwDDETable )) return sal_False; - SwTableSortBoxes aTmpLst( 0, 5 ); + SwTableSortBoxes aTmpLst( 0 ); SwUndoTblNdsChg* pUndo = 0; if (GetIDocumentUndoRedo().DoesUndo()) { @@ -2142,7 +2142,7 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n return sal_False; std::vector<sal_uLong> aNdsCnts; - SwTableSortBoxes aTmpLst( 0, 5 ); + SwTableSortBoxes aTmpLst( 0 ); SwUndoTblNdsChg* pUndo = 0; if (GetIDocumentUndoRedo().DoesUndo()) { @@ -3265,7 +3265,7 @@ class _SplitTable_Para public: _SplitTable_Para( SwTableNode* pNew, SwTable& rOld ) - : aSrc( 16, 16 ), aDest( 16, 16 ), pNewTblNd( pNew ), rOldTbl( rOld ) + : aSrc( 16 ), aDest( 16 ), pNewTblNd( pNew ), rOldTbl( rOld ) {} sal_uInt16 SrcFmt_GetPos( void* pFmt ) const { return aSrc.GetPos( pFmt ); } diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 817b1acdb13f..9e8ea04e1108 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -328,7 +328,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew ) SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln Lines. ::lcl_CollectLines( aRowArr, rCursor, false ); if( aRowArr.Count() ) @@ -338,7 +338,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew ) GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd)); } - SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 ); + SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ) ); for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i ) ::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew ); @@ -360,7 +360,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln der Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln der Lines. ::lcl_CollectLines( aRowArr, rCursor, false ); if( aRowArr.Count() ) @@ -388,7 +388,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ) SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln Lines. ::lcl_CollectLines( aRowArr, rCursor, true ); if( aRowArr.Count() ) @@ -398,7 +398,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ) GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd)); } - SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 ); + SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ) ); for ( sal_uInt16 i = 0; i < aRowArr.Count(); ++i ) ::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], rNew ); SwTblFmtCmp::Delete( aFmtCmp ); @@ -419,7 +419,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln der Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln der Lines. ::lcl_CollectLines( aRowArr, rCursor, true ); if( aRowArr.Count() ) @@ -444,7 +444,7 @@ sal_Bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly ) SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln der Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln der Lines. ::lcl_CollectLines( aRowArr, rCursor, true ); if( 1 < aRowArr.Count() ) @@ -472,7 +472,7 @@ sal_Bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly ) new SwUndoAttrTbl(*pTblNd)); } - SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 ); + SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ) ); for( i = 0; i < aRowArr.Count(); ++i ) ::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], aNew ); SwTblFmtCmp::Delete( aFmtCmp ); @@ -493,7 +493,7 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln Lines. ::lcl_CollectLines( aRowArr, rCursor, true ); if( aRowArr.Count() ) @@ -503,7 +503,7 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd)); } - SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 ); + SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ) ); for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i ) ::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew ); @@ -523,7 +523,7 @@ sal_Bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); if( pTblNd ) { - SvPtrarr aRowArr( 25, 50 ); //Zum sammeln Lines. + SvPtrarr aRowArr( 25 ); //Zum sammeln Lines. ::lcl_CollectLines( aRowArr, rCursor, true ); if( aRowArr.Count() ) @@ -596,7 +596,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) GetIDocumentUndoRedo().AppendUndo( new SwUndoAttrTbl(*pTblNd) ); } - SvPtrarr aFmtCmp( 255, 255 ); + SvPtrarr aFmtCmp( 255 ); const SvxBoxItem* pSetBox; const SvxBoxInfoItem *pSetBoxInfo; @@ -651,7 +651,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) const SwRect &rUnion = pUnion->GetUnion(); const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False; - SvPtrarr aCellArr( 255, 255 ); + SvPtrarr aCellArr( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); //Alle Zellenkanten, die mit dem UnionRect uebereinstimmen oder @@ -847,7 +847,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, { SwSelUnion *pUnion = aUnions[i]; SwTabFrm *pTab = pUnion->GetTable(); - SvPtrarr aCellArr( 255, 255 ); + SvPtrarr aCellArr( 255 ); ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab ); for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j ) @@ -933,7 +933,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const const sal_Bool bFirst = i == 0 ? sal_True : sal_False; const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False; - SvPtrarr aCellArr( 255, 255 ); + SvPtrarr aCellArr( 255 ); ::lcl_CollectCells( aCellArr, rUnion, (SwTabFrm*)pTab ); for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j ) @@ -1123,7 +1123,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) GetIDocumentUndoRedo().AppendUndo( new SwUndoAttrTbl(*pTblNd) ); } - SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aBoxes.size()) ), 255 ); + SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aBoxes.size()) ) ); for( SwSelBoxes::const_iterator it = aBoxes.begin(); it != aBoxes.end(); ++it ) { SwTableBox *pBox = it->second; diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index ab7c0727c0a5..08f475e10b02 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -261,7 +261,7 @@ SwFrm* SwNode2LayImpl::NextFrm() void SwNode2LayImpl::SaveUpperFrms() { - pUpperFrms = new SvPtrarr( 0, 20 ); + pUpperFrms = new SvPtrarr( 0 ); SwFrm* pFrm; while( 0 != (pFrm = NextFrm()) ) { diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index dfc0e6f0887e..518de823fd08 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -54,7 +54,7 @@ extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd, sal_Bool bChkSection ); -SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2) +SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2) // Funktion zum bestimmen des hoechsten Levels innerhalb des Bereiches @@ -472,7 +472,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, sal_uLong nInsPos = 0; // Cnt fuer das TmpArray // das Array bildet einen Stack, es werden alle StartOfSelction's gesichert - SwSttNdPtrs aSttNdStack( 1, 5 ); + SwSttNdPtrs aSttNdStack( 1 ); // setze den Start-Index SwNodeIndex aIdx( aIndex ); @@ -1102,7 +1102,7 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn SwNode * pAktNode; SwNodeIndex aTmpIdx( aStart, +1 ); // das Array bildet einen Stack, es werden alle StartOfSelction's gesichert - SwSttNdPtrs aSttNdStack( 1, 5 ); + SwSttNdPtrs aSttNdStack( 1 ); SwStartNode* pTmp = aStart.GetNode().GetStartNode(); aSttNdStack.C40_INSERT( SwStartNode, pTmp, 0 ); |