From cc2f103744fc5e36a2e583442e41bc6b9d0d0b90 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Apr 2016 15:37:46 +0200 Subject: loplugin:passstuffbyref in sdext Change-Id: I954510b953dab133bcf7b37cf598757b7d8e5fca --- sdext/source/presenter/PresenterBitmapContainer.cxx | 2 +- sdext/source/presenter/PresenterBitmapContainer.hxx | 2 +- sdext/source/presenter/PresenterController.cxx | 20 ++++++++++---------- sdext/source/presenter/PresenterController.hxx | 20 ++++++++++---------- sdext/source/presenter/PresenterNotesView.cxx | 2 +- sdext/source/presenter/PresenterNotesView.hxx | 2 +- sdext/source/presenter/PresenterPaneBase.cxx | 8 ++++---- sdext/source/presenter/PresenterPaneBase.hxx | 8 ++++---- sdext/source/presenter/PresenterSpritePane.cxx | 2 +- sdext/source/presenter/PresenterSpritePane.hxx | 2 +- sdext/source/presenter/PresenterTextView.cxx | 6 +++--- sdext/source/presenter/PresenterTextView.hxx | 6 +++--- sdext/source/presenter/PresenterToolBar.cxx | 14 +++++++------- sdext/source/presenter/PresenterToolBar.hxx | 6 +++--- 14 files changed, 50 insertions(+), 50 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index 8c8759d5036f..b062f5e11a10 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -334,7 +334,7 @@ PresenterBitmapContainer::BitmapDescriptor::BitmapDescriptor ( } } -css::uno::Reference +const css::uno::Reference& PresenterBitmapContainer::BitmapDescriptor::GetNormalBitmap() const { return mxNormalBitmap; diff --git a/sdext/source/presenter/PresenterBitmapContainer.hxx b/sdext/source/presenter/PresenterBitmapContainer.hxx index 78c83d8ef21a..f0877339dc44 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.hxx +++ b/sdext/source/presenter/PresenterBitmapContainer.hxx @@ -51,7 +51,7 @@ public: explicit BitmapDescriptor (const std::shared_ptr& rpDefault); enum Mode {Normal, MouseOver, ButtonDown, Disabled, Mask}; - css::uno::Reference GetNormalBitmap() const; + const css::uno::Reference& GetNormalBitmap() const; css::uno::Reference GetBitmap(const Mode eMode) const; void SetBitmap ( const Mode eMode, diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 79e4d020c31a..95880baaed40 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -450,43 +450,43 @@ PresenterTheme::SharedFontDescriptor return PresenterTheme::SharedFontDescriptor(); } -std::shared_ptr PresenterController::GetTheme() const +const std::shared_ptr& PresenterController::GetTheme() const { return mpTheme; } -::rtl::Reference PresenterController::GetWindowManager() const +const ::rtl::Reference& PresenterController::GetWindowManager() const { return mpWindowManager; } -Reference +const Reference& PresenterController::GetSlideShowController() const { return mxSlideShowController; } -rtl::Reference PresenterController::GetPaneContainer() const +const rtl::Reference& PresenterController::GetPaneContainer() const { return mpPaneContainer; } -::rtl::Reference PresenterController::GetPaneBorderPainter() const +const ::rtl::Reference& PresenterController::GetPaneBorderPainter() const { return mpPaneBorderPainter; } -std::shared_ptr PresenterController::GetCanvasHelper() const +const std::shared_ptr& PresenterController::GetCanvasHelper() const { return mpCanvasHelper; } -Reference PresenterController::GetPresenterHelper() const +const Reference& PresenterController::GetPresenterHelper() const { return mxPresenterHelper; } -std::shared_ptr PresenterController::GetPaintManager() const +const std::shared_ptr& PresenterController::GetPaintManager() const { return mpPaintManager; } @@ -568,13 +568,13 @@ util::URL PresenterController::CreateURLFromString (const OUString& rsURL) const return aURL; } -Reference +const Reference& PresenterController::GetConfigurationController() const { return mxConfigurationController; } -Reference PresenterController::GetCurrentSlide() const +const Reference& PresenterController::GetCurrentSlide() const { return mxCurrentSlide; } diff --git a/sdext/source/presenter/PresenterController.hxx b/sdext/source/presenter/PresenterController.hxx index 0b910f497c25..0bb013fa92ce 100644 --- a/sdext/source/presenter/PresenterController.hxx +++ b/sdext/source/presenter/PresenterController.hxx @@ -105,15 +105,15 @@ public: GetViewBackground (const OUString& rsViewURL) const; PresenterTheme::SharedFontDescriptor GetViewFont (const OUString& rsViewURL) const; - std::shared_ptr GetTheme() const; - ::rtl::Reference GetWindowManager() const; - css::uno::Reference + const std::shared_ptr& GetTheme() const; + const ::rtl::Reference& GetWindowManager() const; + const css::uno::Reference& GetSlideShowController() const; - rtl::Reference GetPaneContainer() const; - ::rtl::Reference GetPaneBorderPainter() const; - std::shared_ptr GetCanvasHelper() const; - css::uno::Reference GetPresenterHelper() const; - std::shared_ptr GetPaintManager() const; + const rtl::Reference& GetPaneContainer() const; + const ::rtl::Reference& GetPaneBorderPainter() const; + const std::shared_ptr& GetCanvasHelper() const; + const css::uno::Reference& GetPresenterHelper() const; + const std::shared_ptr& GetPaintManager() const; double GetSlideAspectRatio() const; void ShowView (const OUString& rsViewURL); void HideView (const OUString& rsViewURL); @@ -122,9 +122,9 @@ public: css::uno::Reference GetDispatch ( const css::util::URL& rURL) const; css::util::URL CreateURLFromString (const OUString& rsURL) const; - css::uno::Reference + const css::uno::Reference& GetConfigurationController() const; - css::uno::Reference GetCurrentSlide() const; + const css::uno::Reference& GetCurrentSlide() const; static bool HasTransition (css::uno::Reference& rxPage); static bool HasCustomAnimation (css::uno::Reference& rxPage); void SetAccessibilityActiveState (const bool bIsActive); diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index 914b356b2538..b8ea26637545 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -673,7 +673,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange) } } -std::shared_ptr PresenterNotesView::GetTextView() const +const std::shared_ptr& PresenterNotesView::GetTextView() const { return mpTextView; } diff --git a/sdext/source/presenter/PresenterNotesView.hxx b/sdext/source/presenter/PresenterNotesView.hxx index 418087d2777b..653cd2d8af2f 100644 --- a/sdext/source/presenter/PresenterNotesView.hxx +++ b/sdext/source/presenter/PresenterNotesView.hxx @@ -85,7 +85,7 @@ public: void ChangeFontSize (const sal_Int32 nSizeChange); - std::shared_ptr GetTextView() const; + const std::shared_ptr& GetTextView() const; // lang::XEventListener diff --git a/sdext/source/presenter/PresenterPaneBase.cxx b/sdext/source/presenter/PresenterPaneBase.cxx index 7ca117265f01..d05e841d50dd 100644 --- a/sdext/source/presenter/PresenterPaneBase.cxx +++ b/sdext/source/presenter/PresenterPaneBase.cxx @@ -116,12 +116,12 @@ void PresenterPaneBase::SetTitle (const OUString& rsTitle) mpPresenterController->GetPaintManager()->Invalidate(mxBorderWindow); } -OUString PresenterPaneBase::GetTitle() const +const OUString& PresenterPaneBase::GetTitle() const { return msTitle; } -Reference +const Reference& PresenterPaneBase::GetPaneBorderPainter() const { return mxBorderPainter; @@ -156,7 +156,7 @@ void PresenterPaneBase::SetCalloutAnchor (const css::awt::Point& rCalloutAnchor) mpPresenterController->GetPaintManager()->Invalidate(mxBorderWindow); } -awt::Point PresenterPaneBase::GetCalloutAnchor() const +const awt::Point& PresenterPaneBase::GetCalloutAnchor() const { return maCalloutAnchor; } @@ -337,7 +337,7 @@ void PresenterPaneBase::CreateWindows ( } } -Reference PresenterPaneBase::GetBorderWindow() const +const Reference& PresenterPaneBase::GetBorderWindow() const { return mxBorderWindow; } diff --git a/sdext/source/presenter/PresenterPaneBase.hxx b/sdext/source/presenter/PresenterPaneBase.hxx index 0defffeab978..a1301e23d1a0 100644 --- a/sdext/source/presenter/PresenterPaneBase.hxx +++ b/sdext/source/presenter/PresenterPaneBase.hxx @@ -71,13 +71,13 @@ public: virtual void SAL_CALL disposing() override; - css::uno::Reference GetBorderWindow() const; + const css::uno::Reference& GetBorderWindow() const; void SetBackground (const SharedBitmapDescriptor& rpBackground); void SetTitle (const OUString& rsTitle); - OUString GetTitle() const; - css::uno::Reference GetPaneBorderPainter() const; + const OUString& GetTitle() const; + const css::uno::Reference& GetPaneBorderPainter() const; void SetCalloutAnchor (const css::awt::Point& rAnchorPosition); - css::awt::Point GetCalloutAnchor() const; + const css::awt::Point& GetCalloutAnchor() const; // XInitialization diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx index 9c4161ccc2a0..36c3ad4af3a1 100644 --- a/sdext/source/presenter/PresenterSpritePane.cxx +++ b/sdext/source/presenter/PresenterSpritePane.cxx @@ -147,7 +147,7 @@ void SAL_CALL PresenterSpritePane::windowPaint (const awt::PaintEvent& rEvent) } -std::shared_ptr PresenterSpritePane::GetSprite() +const std::shared_ptr& PresenterSpritePane::GetSprite() { return mpSprite; } diff --git a/sdext/source/presenter/PresenterSpritePane.hxx b/sdext/source/presenter/PresenterSpritePane.hxx index a4b79bd88e02..f2a110d7e23a 100644 --- a/sdext/source/presenter/PresenterSpritePane.hxx +++ b/sdext/source/presenter/PresenterSpritePane.hxx @@ -57,7 +57,7 @@ public: using PresenterPaneBase::disposing; - std::shared_ptr GetSprite(); + const std::shared_ptr& GetSprite(); // XPane diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 5a8a8aaa0768..dd3132d2fb6e 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -394,7 +394,7 @@ void PresenterTextView::Paint ( } } -SharedPresenterTextCaret PresenterTextView::GetCaret() const +const SharedPresenterTextCaret& PresenterTextView::GetCaret() const { return mpCaret; } @@ -792,7 +792,7 @@ sal_Unicode PresenterTextParagraph::GetCharacter ( } } -OUString PresenterTextParagraph::GetText() const +const OUString& PresenterTextParagraph::GetText() const { return msParagraphText; } @@ -1166,7 +1166,7 @@ void PresenterTextCaret::SetCaretMotionBroadcaster ( maBroadcaster = rBroadcaster; } -css::awt::Rectangle PresenterTextCaret::GetBounds() const +const css::awt::Rectangle& PresenterTextCaret::GetBounds() const { return maCaretBounds; } diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx index 955f9728da6f..9a1da809b400 100644 --- a/sdext/source/presenter/PresenterTextView.hxx +++ b/sdext/source/presenter/PresenterTextView.hxx @@ -66,7 +66,7 @@ public: void SetCaretMotionBroadcaster ( const ::std::function& rBroadcaster); - css::awt::Rectangle GetBounds() const; + const css::awt::Rectangle& GetBounds() const; private: sal_Int32 mnParagraphIndex; @@ -109,7 +109,7 @@ public: void SetCharacterOffset (const sal_Int32 nCharacterOffset); sal_Int32 GetCharacterCount() const; sal_Unicode GetCharacter (const sal_Int32 nGlobalCharacterIndex) const; - OUString GetText() const; + const OUString& GetText() const; css::accessibility::TextSegment GetTextSegment ( const sal_Int32 nOffset, const sal_Int32 nGlobalCharacterIndex, @@ -247,7 +247,7 @@ public: void Paint (const css::awt::Rectangle& rUpdateBox); - SharedPresenterTextCaret GetCaret() const; + const SharedPresenterTextCaret& GetCaret() const; sal_Int32 GetParagraphCount() const; SharedPresenterTextParagraph GetParagraph (const sal_Int32 nParagraphIndex) const; diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index 220300793c11..203f76ffa5bf 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -72,8 +72,8 @@ namespace { const PresenterTheme::SharedFontDescriptor& rpFont); void SetText (const OUString& rsText); - OUString GetText() const; - PresenterTheme::SharedFontDescriptor GetFont() const; + const OUString& GetText() const; + const PresenterTheme::SharedFontDescriptor& GetFont() const; void Paint ( const Reference& rxCanvas, @@ -489,12 +489,12 @@ geometry::RealSize2D PresenterToolBar::GetMinimalSize() return maMinimalSize; } -::rtl::Reference PresenterToolBar::GetPresenterController() const +const ::rtl::Reference& PresenterToolBar::GetPresenterController() const { return mpPresenterController; } -Reference PresenterToolBar::GetComponentContext() const +const Reference& PresenterToolBar::GetComponentContext() const { return mxComponentContext; } @@ -1143,7 +1143,7 @@ void SAL_CALL PresenterToolBarView::disposing() } -::rtl::Reference PresenterToolBarView::GetPresenterToolBar() const +const ::rtl::Reference& PresenterToolBarView::GetPresenterToolBar() const { return mpToolBar; } @@ -1720,12 +1720,12 @@ void Text::SetText (const OUString& rsText) msText = rsText; } -OUString Text::GetText() const +const OUString& Text::GetText() const { return msText; } -PresenterTheme::SharedFontDescriptor Text::GetFont() const +const PresenterTheme::SharedFontDescriptor& Text::GetFont() const { return mpFont; } diff --git a/sdext/source/presenter/PresenterToolBar.hxx b/sdext/source/presenter/PresenterToolBar.hxx index 3348a8d1b36e..f4201a1f6939 100644 --- a/sdext/source/presenter/PresenterToolBar.hxx +++ b/sdext/source/presenter/PresenterToolBar.hxx @@ -99,8 +99,8 @@ public: void RequestLayout(); css::geometry::RealSize2D GetMinimalSize(); - ::rtl::Reference GetPresenterController() const; - css::uno::Reference GetComponentContext() const; + const ::rtl::Reference& GetPresenterController() const; + const css::uno::Reference& GetComponentContext() const; // lang::XEventListener @@ -234,7 +234,7 @@ public: virtual void SAL_CALL disposing() override; - ::rtl::Reference GetPresenterToolBar() const; + const ::rtl::Reference& GetPresenterToolBar() const; // XPaintListener -- cgit