diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-02 15:10:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-03 08:07:41 +0100 |
commit | acdba3c2eee18ef0c079b7c41cd4165e06c956c7 (patch) | |
tree | 18c6da7b7d46bf901b6dd4f7a5b280caa7f62280 /sd | |
parent | f4bd9029ba7b500ebf99b7fa3d774de7fa029176 (diff) |
loplugin:passstuffbyref more return improvements
slightly less restrictive check when calling functions
Change-Id: I35e268ac611797b1daa83777cda02288a635aa32
Reviewed-on: https://gerrit.libreoffice.org/47259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/RemoteDialogClientBox.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/zoomlist.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPageContainer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPageContainer.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/zoomlist.cxx | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index f3076804da93..8143e4f632cc 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -137,7 +137,7 @@ public: Size GetOptimalSize() const override; bool EventNotify( NotifyEvent& rNEvt ) override; - TClientBoxEntry GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } + TClientBoxEntry const & GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetActiveEntryIndex(); ::tools::Rectangle GetEntryRect( const long nPos ) const; long PointToPos( const Point& rPos ); diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 17587ac5be1e..494f96cf5588 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -362,7 +362,7 @@ public: */ virtual bool RelocateToParentWindow (vcl::Window* pParentWindow) override; - OUString GetSidebarContextName() const; + OUString const & GetSidebarContextName() const; bool IsInSwitchPage() { return mbIsInSwitchPage; } diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx index 115e0d36aa92..fa16473ff802 100644 --- a/sd/source/ui/inc/zoomlist.hxx +++ b/sd/source/ui/inc/zoomlist.hxx @@ -35,8 +35,8 @@ public: ZoomList(ViewShell* pViewShell); void InsertZoomRect(const ::tools::Rectangle& rRect); - ::tools::Rectangle GetNextZoomRect(); - ::tools::Rectangle GetPreviousZoomRect(); + ::tools::Rectangle const & GetNextZoomRect(); + ::tools::Rectangle const & GetPreviousZoomRect(); bool IsNextPossible() const; bool IsPreviousPossible() const; diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index 7fcecf0974a5..1e13ccf9493c 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -237,7 +237,7 @@ void MasterPageContainer::SetPreviewSize (PreviewSize eSize) NIL_TOKEN); } -Size MasterPageContainer::GetPreviewSizePixel() const +Size const & MasterPageContainer::GetPreviewSizePixel() const { return mpImpl->GetPreviewSizePixel(mePreviewSize); } diff --git a/sd/source/ui/sidebar/MasterPageContainer.hxx b/sd/source/ui/sidebar/MasterPageContainer.hxx index 732901fcabe5..1fa628473486 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.hxx +++ b/sd/source/ui/sidebar/MasterPageContainer.hxx @@ -78,7 +78,7 @@ public: /** Return the preview size in pixels. */ - Size GetPreviewSizePixel() const; + Size const & GetPreviewSizePixel() const; enum PreviewState { PS_AVAILABLE, PS_CREATABLE, PS_PREPARING, PS_NOT_AVAILABLE }; PreviewState GetPreviewState (Token aToken); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 8032e66608cc..83fb4e824975 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -751,7 +751,7 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet ) mpAnnotationManager->GetAnnotationState( rItemSet ); } -::rtl::OUString DrawViewShell::GetSidebarContextName() const +OUString const & DrawViewShell::GetSidebarContextName() const { svx::sidebar::SelectionAnalyzer::ViewType eViewType (svx::sidebar::SelectionAnalyzer::ViewType::Standard); switch (mePageKind) diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx index 06359ce495c2..f9a77e6b54d2 100644 --- a/sd/source/ui/view/zoomlist.cxx +++ b/sd/source/ui/view/zoomlist.cxx @@ -54,7 +54,7 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect) rBindings.Invalidate( SID_ZOOM_PREV ); } -::tools::Rectangle ZoomList::GetNextZoomRect() +::tools::Rectangle const & ZoomList::GetNextZoomRect() { mnCurPos++; size_t nRectCount = maRectangles.size(); @@ -69,7 +69,7 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect) return maRectangles[mnCurPos]; } -::tools::Rectangle ZoomList::GetPreviousZoomRect() +::tools::Rectangle const & ZoomList::GetPreviousZoomRect() { if (mnCurPos > 0) mnCurPos--; |