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/miscdlgs/datafdlg.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/miscdlgs/datafdlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index a4d8207e24f0..433d1946a306 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -39,13 +39,13 @@ ScDataFormDlg::ScDataFormDlg(Window* pParent, ScTabViewShell* pTabViewShellOri) //read header form current document, and add new controls OSL_ENSURE( pTabViewShell, "pTabViewShell is NULL! :-/" ); - ScViewData* pViewData = pTabViewShell->GetViewData(); + ScViewData& rViewData = pTabViewShell->GetViewData(); - pDoc = pViewData->GetDocument(); + pDoc = rViewData.GetDocument(); if (pDoc) { ScRange aRange; - pViewData->GetSimpleArea( aRange ); + rViewData.GetSimpleArea( aRange ); ScAddress aStart = aRange.aStart; ScAddress aEnd = aRange.aEnd; @@ -54,7 +54,7 @@ ScDataFormDlg::ScDataFormDlg(Window* pParent, ScTabViewShell* pTabViewShellOri) nStartRow = aStart.Row(); nEndRow = aEnd.Row(); - nTab = pViewData->GetTabNo(); + nTab = rViewData.GetTabNo(); //if there is no selection if ((nStartCol == nEndCol) && (nStartRow == nEndRow)) bNoSelection = true; @@ -241,8 +241,8 @@ IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit) IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl) { - ScViewData* pViewData = pTabViewShell->GetViewData(); - ScDocShell* pDocSh = pViewData->GetDocShell(); + ScViewData& rViewData = pTabViewShell->GetViewData(); + ScDocShell* pDocSh = rViewData.GetDocShell(); if ( pDoc ) { bool bHasData = false; @@ -310,8 +310,8 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_RestoreHdl) IMPL_LINK_NOARG(ScDataFormDlg, Impl_DeleteHdl) { - ScViewData* pViewData = pTabViewShell->GetViewData(); - ScDocShell* pDocSh = pViewData->GetDocShell(); + ScViewData& rViewData = pTabViewShell->GetViewData(); + ScDocShell* pDocSh = rViewData.GetDocShell(); if (pDoc) { ScRange aRange(nStartCol, nCurrentRow, nTab, nEndCol, nCurrentRow, nTab); |