summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/tblsel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /sw/source/core/frmedt/tblsel.cxx
parentf910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff)
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
Diffstat (limited to 'sw/source/core/frmedt/tblsel.cxx')
-rw-r--r--sw/source/core/frmedt/tblsel.cxx8
1 files changed, 4 insertions, 4 deletions
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