diff options
author | Noel Grandin <noel@peralex.com> | 2012-04-25 11:55:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-25 12:35:32 +0200 |
commit | 7cd899bc6cdf885837f77e7250c21a0995a75aab (patch) | |
tree | b9fe262b081060e7d233e0c51619783a67861d87 /sw | |
parent | 40bd5dab1d8c35a722f4ce2337e6ae1fae3cddc1 (diff) |
Remove data structures there dead i.e. not doing any actual work
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/swtable.hxx | 5 | ||||
-rw-r--r-- | sw/inc/tblsel.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/docchart.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 27 |
4 files changed, 5 insertions, 38 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 24fb1990b99f..f6de56e9d5c8 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -53,8 +53,6 @@ class SwTabCols; class SwDoc; class SwSelBoxes; class SwTblCalcPara; -class SwChartBoxes; -class SwChartLines; struct SwPosition; class SwNodeIndex; class SwNode; @@ -285,8 +283,7 @@ public: sal_Bool IsTblComplex() const; // Returns sal_True if table or selection is balanced. - sal_Bool IsTblComplexForChart( const String& rSel, - SwChartLines* pGetCLines = 0 ) const; + sal_Bool IsTblComplexForChart( const String& rSel ) const; // Search all content-bearing boxes of the base line on which this box stands. // rBoxes as a return value for immediate use. diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx index e177d1a5a6ab..6621d556d59f 100644 --- a/sw/inc/tblsel.hxx +++ b/sw/inc/tblsel.hxx @@ -130,11 +130,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ); // Check if selection is balanced. -class SwChartBoxes : public std::vector<SwTableBoxPtr> {}; -class SwChartLines : public boost::ptr_vector<SwChartBoxes> {}; - -sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, - SwChartLines* pGetCLines = 0 ); +sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd); // Check if cell is part of SSelection. // (Became a function, in order to make sure that GetTblSel() and MakeTblCrsr() diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 22ed3f8dcac3..92df35686130 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -64,8 +64,7 @@ void SwTable::UpdateCharts() const GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() ); } -sal_Bool SwTable::IsTblComplexForChart( const String& rSelection, - SwChartLines* pGetCLines ) const +sal_Bool SwTable::IsTblComplexForChart( const String& rSelection ) const { const SwTableBox* pSttBox, *pEndBox; if( 2 < rSelection.Len() ) @@ -101,7 +100,7 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection, } return !pSttBox || !pEndBox || !::ChkChartSel( *pSttBox->GetSttNd(), - *pEndBox->GetSttNd(), pGetCLines ); + *pEndBox->GetSttNd() ); } void SwDoc::DoUpdateAllCharts() diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 72c9cd6f5d48..6e7cce20eecc 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -437,8 +437,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, -sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, - SwChartLines* pGetCLines ) +sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) { const SwTableNode* pTNd = rSttNd.FindTableNode(); if( !pTNd ) @@ -645,25 +644,6 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, else if( nRowCells != nCellCnt ) bValidChartSel = sal_False; } - - if( bValidChartSel && pGetCLines ) - { - nYPos = LONG_MAX; - SwChartBoxes* pBoxes = 0; - for( n = 0; n < aCellFrms.size(); ++n ) - { - const _Sort_CellFrm& rCF = aCellFrms[ n ]; - if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) - { - pBoxes = new SwChartBoxes(); - pBoxes->reserve( 255 < nRowCells ? 255 : (sal_uInt8)nRowCells); - pGetCLines->push_back( pBoxes ); - nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)(); - } - SwTableBoxPtr pBox = (SwTableBox*)rCF.pFrm->GetTabBox(); - pBoxes->push_back( pBox ); - } - } } if( bTblIsValid ) @@ -682,15 +662,10 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, break; } --nLoopMax; - if( pGetCLines ) - pGetCLines->clear(); } while( sal_True ); OSL_ENSURE( nLoopMax, "table layout is still invalid!" ); - if( !bValidChartSel && pGetCLines ) - pGetCLines->clear(); - return bValidChartSel; } |