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/unoobj/eventuno.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/unoobj/eventuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/eventuno.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx index e72d8062324b..14a7af9eaf8e 100644 --- a/sc/source/ui/unoobj/eventuno.cxx +++ b/sc/source/ui/unoobj/eventuno.cxx @@ -33,13 +33,13 @@ ScSheetEventsObj::ScSheetEventsObj(ScDocShell* pDocSh, SCTAB nT) : mpDocShell( pDocSh ), mnTab( nT ) { - mpDocShell->GetDocument()->AddUnoObject(*this); + mpDocShell->GetDocument().AddUnoObject(*this); } ScSheetEventsObj::~ScSheetEventsObj() { if (mpDocShell) - mpDocShell->GetDocument()->RemoveUnoObject(*this); + mpDocShell->GetDocument().RemoveUnoObject(*this); } void ScSheetEventsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -76,7 +76,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno: throw container::NoSuchElementException(); ScSheetEvents aNewEvents; - const ScSheetEvents* pOldEvents = mpDocShell->GetDocument()->GetSheetEvents(mnTab); + const ScSheetEvents* pOldEvents = mpDocShell->GetDocument().GetSheetEvents(mnTab); if (pOldEvents) aNewEvents = *pOldEvents; @@ -110,7 +110,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno: else aNewEvents.SetScript( nEvent, NULL ); // reset - mpDocShell->GetDocument()->SetSheetEvents( mnTab, &aNewEvents ); + mpDocShell->GetDocument().SetSheetEvents( mnTab, &aNewEvents ); mpDocShell->SetDocumentModified(); } @@ -127,7 +127,7 @@ uno::Any SAL_CALL ScSheetEventsObj::getByName( const OUString& aName ) const OUString* pScript = NULL; if (mpDocShell) { - const ScSheetEvents* pEvents = mpDocShell->GetDocument()->GetSheetEvents(mnTab); + const ScSheetEvents* pEvents = mpDocShell->GetDocument().GetSheetEvents(mnTab); if (pEvents) pScript = pEvents->GetScript(nEvent); } |