diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-18 12:14:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-24 11:34:21 +0200 |
commit | e2080e70fe8b085f18e868e46340454720fa94ca (patch) | |
tree | 4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /sc/source/ui/view/hdrcont.cxx | |
parent | f910280b8704ed9c289150a4ca3c8d60e15d0d97 (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 'sc/source/ui/view/hdrcont.cxx')
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index dcf157e05ee9..44643d60062b 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -611,9 +611,9 @@ bool ScHeaderControl::IsSelectionAllowed(SCCOLROW nPos) const if (!pViewSh) return false; - ScViewData* pViewData = pViewSh->GetViewData(); - sal_uInt16 nTab = pViewData->GetTabNo(); - ScDocument* pDoc = pViewData->GetDocument(); + ScViewData& rViewData = pViewSh->GetViewData(); + sal_uInt16 nTab = rViewData.GetTabNo(); + ScDocument* pDoc = rViewData.GetDocument(); const ScTableProtection* pProtect = pDoc->GetTabProtection(nTab); bool bSelectAllowed = true; if ( pProtect && pProtect->isProtected() ) @@ -827,10 +827,10 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) if ( rCEvt.IsMouseEvent() ) { // #i18735# select the column/row under the mouse pointer - ScViewData* pViewData = pViewSh->GetViewData(); + ScViewData& rViewData = pViewSh->GetViewData(); SelectWindow(); // also deselects drawing objects, stops draw text edit - if ( pViewData->HasEditView( pViewData->GetActivePart() ) ) + if ( rViewData.HasEditView( rViewData.GetActivePart() ) ) SC_MOD()->InputEnterHandler(); // always end edit mode MouseEvent aMEvt( rCEvt.GetMousePosPixel() ); @@ -840,7 +840,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) // Selecting this cell is not allowed, neither is context menu. return; - SCTAB nTab = pViewData->GetTabNo(); + SCTAB nTab = rViewData.GetTabNo(); ScRange aNewRange; if ( bVertical ) aNewRange = ScRange( 0, sal::static_int_cast<SCROW>(nPos), nTab, @@ -851,7 +851,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) // see if any part of the range is already selected ScRangeList aRanges; - pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, false ); + rViewData.GetMarkData().FillRangeListWithMarks( &aRanges, false ); bool bSelected = aRanges.Intersects(aNewRange); // select the range if no part of it was selected |