From e2080e70fe8b085f18e868e46340454720fa94ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 18 Jun 2014 12:14:29 +0200 Subject: new compilerplugin returnbyref Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7 --- sw/source/core/frmedt/tblsel.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sw/source/core/frmedt/tblsel.cxx') diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 2d94ddfbe82c..e69b80f7c9df 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -161,7 +161,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, // Row-selection: // Check for complex tables. If Yes, search selected boxes via // the layout. Otherwise via the table structure (for macros !!) - const SwCntntNode* pContentNd = rCrsr.GetNode()->GetCntntNode(); + const SwCntntNode* pContentNd = rCrsr.GetNode().GetCntntNode(); const SwTableNode* pTblNd = pContentNd ? pContentNd->FindTableNode() : 0; if( pTblNd && pTblNd->GetTable().IsNewModel() ) { @@ -182,8 +182,8 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTable& rTbl = pTblNd->GetTable(); const SwTableLines& rLines = rTbl.GetTabLines(); - const SwNode* pMarkNode = rCrsr.GetNode( false ); - const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex(); + const SwNode& rMarkNode = rCrsr.GetNode( false ); + const sal_uLong nMarkSectionStart = rMarkNode.StartOfSectionIndex(); const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart ); OSL_ENSURE( pMarkBox, "Point in table, mark outside?" ); @@ -191,7 +191,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0; sal_uInt16 nSttPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" ); - pLine = rTbl.GetTblBox( rCrsr.GetNode( true )->StartOfSectionIndex() )->GetUpper(); + pLine = rTbl.GetTblBox( rCrsr.GetNode( true ).StartOfSectionIndex() )->GetUpper(); sal_uInt16 nEndPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nEndPos, "Where is my row in the table?" ); // pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX -- cgit v1.2.3