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/docshell/datastream.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/docshell/datastream.cxx')
-rw-r--r-- | sc/source/ui/docshell/datastream.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 5b9951c6769a..84f4db54704f 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -306,7 +306,7 @@ DataStream* DataStream::Set( sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings) { DataStream* pLink = new DataStream(pShell, rURL, rRange, nLimit, eMove, nSettings); - sc::DocumentLinkManager& rMgr = pShell->GetDocument()->GetDocLinkManager(); + sc::DocumentLinkManager& rMgr = pShell->GetDocument().GetDocLinkManager(); rMgr.setDataStream(pLink); return pLink; } @@ -314,8 +314,7 @@ DataStream* DataStream::Set( DataStream::DataStream(ScDocShell *pShell, const OUString& rURL, const ScRange& rRange, sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings) : mpDocShell(pShell), - mpDoc(mpDocShell->GetDocument()), - maDocAccess(*mpDoc), + maDocAccess(mpDocShell->GetDocument()), meOrigMove(NO_MOVE), meMove(NO_MOVE), mbRunning(false), @@ -546,7 +545,7 @@ void DataStream::Text2Doc() if (meMove == RANGE_DOWN) { ++mnCurRow; -// mpDocShell->GetViewData()->GetView()->AlignToCursor( +// mpDocShell->GetViewData().GetView()->AlignToCursor( // maStartRange.aStart.Col(), mnCurRow, SC_FOLLOW_JUMP); } |