Kaydet (Commit) 7cd899bc authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Remove data structures there dead i.e. not doing any actual work

üst 40bd5dab
...@@ -53,8 +53,6 @@ class SwTabCols; ...@@ -53,8 +53,6 @@ class SwTabCols;
class SwDoc; class SwDoc;
class SwSelBoxes; class SwSelBoxes;
class SwTblCalcPara; class SwTblCalcPara;
class SwChartBoxes;
class SwChartLines;
struct SwPosition; struct SwPosition;
class SwNodeIndex; class SwNodeIndex;
class SwNode; class SwNode;
...@@ -285,8 +283,7 @@ public: ...@@ -285,8 +283,7 @@ public:
sal_Bool IsTblComplex() const; sal_Bool IsTblComplex() const;
// Returns sal_True if table or selection is balanced. // Returns sal_True if table or selection is balanced.
sal_Bool IsTblComplexForChart( const String& rSel, sal_Bool IsTblComplexForChart( const String& rSel ) const;
SwChartLines* pGetCLines = 0 ) const;
// Search all content-bearing boxes of the base line on which this box stands. // Search all content-bearing boxes of the base line on which this box stands.
// rBoxes as a return value for immediate use. // rBoxes as a return value for immediate use.
......
...@@ -130,11 +130,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); ...@@ -130,11 +130,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ); sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
// Check if selection is balanced. // Check if selection is balanced.
class SwChartBoxes : public std::vector<SwTableBoxPtr> {}; sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd);
class SwChartLines : public boost::ptr_vector<SwChartBoxes> {};
sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
SwChartLines* pGetCLines = 0 );
// Check if cell is part of SSelection. // Check if cell is part of SSelection.
// (Became a function, in order to make sure that GetTblSel() and MakeTblCrsr() // (Became a function, in order to make sure that GetTblSel() and MakeTblCrsr()
......
...@@ -64,8 +64,7 @@ void SwTable::UpdateCharts() const ...@@ -64,8 +64,7 @@ void SwTable::UpdateCharts() const
GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() ); GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() );
} }
sal_Bool SwTable::IsTblComplexForChart( const String& rSelection, sal_Bool SwTable::IsTblComplexForChart( const String& rSelection ) const
SwChartLines* pGetCLines ) const
{ {
const SwTableBox* pSttBox, *pEndBox; const SwTableBox* pSttBox, *pEndBox;
if( 2 < rSelection.Len() ) if( 2 < rSelection.Len() )
...@@ -101,7 +100,7 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection, ...@@ -101,7 +100,7 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
} }
return !pSttBox || !pEndBox || !::ChkChartSel( *pSttBox->GetSttNd(), return !pSttBox || !pEndBox || !::ChkChartSel( *pSttBox->GetSttNd(),
*pEndBox->GetSttNd(), pGetCLines ); *pEndBox->GetSttNd() );
} }
void SwDoc::DoUpdateAllCharts() void SwDoc::DoUpdateAllCharts()
......
...@@ -437,8 +437,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, ...@@ -437,8 +437,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
SwChartLines* pGetCLines )
{ {
const SwTableNode* pTNd = rSttNd.FindTableNode(); const SwTableNode* pTNd = rSttNd.FindTableNode();
if( !pTNd ) if( !pTNd )
...@@ -645,25 +644,6 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, ...@@ -645,25 +644,6 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
else if( nRowCells != nCellCnt ) else if( nRowCells != nCellCnt )
bValidChartSel = sal_False; 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 ) if( bTblIsValid )
...@@ -682,15 +662,10 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, ...@@ -682,15 +662,10 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
break; break;
} }
--nLoopMax; --nLoopMax;
if( pGetCLines )
pGetCLines->clear();
} while( sal_True ); } while( sal_True );
OSL_ENSURE( nLoopMax, "table layout is still invalid!" ); OSL_ENSURE( nLoopMax, "table layout is still invalid!" );
if( !bValidChartSel && pGetCLines )
pGetCLines->clear();
return bValidChartSel; return bValidChartSel;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment