summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 11:33:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 13:15:33 +0100
commita0e136d2cbb3784ddfcbddcfed5d784c8e4c9a64 (patch)
treea86891188892c9525679a4a2a47ab772e7ccecbc /sd
parent4855257e52056241633c2b1d8159c3f0e71e05f3 (diff)
loplugin:passstuffbyref improved return in sd,various
Change-Id: I4b6ea89ae2072f4389a696ea3c96d8f7a5731e7a Reviewed-on: https://gerrit.libreoffice.org/47246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdpage.hxx2
-rw-r--r--sd/inc/stlsheet.hxx2
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/ui/inc/ViewShell.hxx4
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx8
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx10
-rw-r--r--sd/source/ui/sidebar/SlideBackground.hxx10
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx4
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayouter.cxx4
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/drviews2.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx4
13 files changed, 31 insertions, 31 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index f11aa7e640a2..dcef647fb59e 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -271,7 +271,7 @@ public:
bool bScaleAllObj);
const OUString& GetName() const;
- OUString GetRealName() const { return FmFormPage::GetName(); };
+ OUString const & GetRealName() const { return FmFormPage::GetName(); };
void SetPresentationLayout(const OUString& rLayoutName,
bool bReplaceStyleSheets = true,
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index d80da5e73578..314818a21b3e 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -69,7 +69,7 @@ public:
SdStyleSheet* GetPseudoStyleSheet() const;
void SetApiName( const OUString& rApiName );
- OUString GetApiName() const;
+ OUString const & GetApiName() const;
static OUString GetFamilyString( SfxStyleFamily eFamily );
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 47ee855153d2..e0aacc949efa 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -149,7 +149,7 @@ void SdStyleSheet::SetApiName( const OUString& rApiName )
msApiName = rApiName;
}
-OUString SdStyleSheet::GetApiName() const
+OUString const & SdStyleSheet::GetApiName() const
{
if( !msApiName.isEmpty() )
return msApiName;
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index d34ca8d27471..60900a642ca8 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -96,7 +96,7 @@ class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper< css::task:
nFilterError( ERRCODE_NONE )
{}
- ErrCode GetErrorCode() const { return nFilterError; };
+ ErrCode const & GetErrorCode() const { return nFilterError; };
virtual void SAL_CALL handle( const css::uno::Reference< css::task::XInteractionRequest >& ) override;
};
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index f65c5e31af60..ece5750c5c3b 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -300,8 +300,8 @@ public:
void NotifyAccUpdate();
void fireSwitchCurrentPage(sal_Int32 pageIndex);
void SetWinViewPos(const Point& rWinPos);
- Point GetWinViewPos() const;
- Point GetViewOrigin() const;
+ Point const & GetWinViewPos() const;
+ Point const & GetViewOrigin() const;
/** Return the window updater of this view shell.
@return
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 9d79c646ea63..5e760c422fef 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -81,7 +81,7 @@ public:
*/
void LateInit (const OUString& rsDefaultView);
- std::shared_ptr<ViewShellManager> GetViewShellManager() const;
+ std::shared_ptr<ViewShellManager> const & GetViewShellManager() const;
/** Return the main view shell stacked on the called ViewShellBase
object. This is usually the view shell displayed in the center
@@ -192,15 +192,15 @@ public:
events from various sources. This method must not be called before
LateInit() has terminated.
*/
- std::shared_ptr<tools::EventMultiplexer> GetEventMultiplexer();
+ std::shared_ptr<tools::EventMultiplexer> const & GetEventMultiplexer();
/** returns the complete area of the current view relative to the frame
window
*/
const ::tools::Rectangle& getClientRectangle() const;
- std::shared_ptr<ToolBarManager> GetToolBarManager() const;
- std::shared_ptr<FormShellManager> GetFormShellManager() const;
+ std::shared_ptr<ToolBarManager> const & GetToolBarManager() const;
+ std::shared_ptr<FormShellManager> const & GetFormShellManager() const;
DrawController& GetDrawController() const;
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 76da35ddd0b0..190be7ff59dd 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -676,7 +676,7 @@ void SlideBackground::ExecuteMarginULChange(const long mnPageTopMargin, const lo
GetBindings()->GetDispatcher()->ExecuteList( SID_ATTR_PAGE_ULSPACE, SfxCallMode::RECORD, { mpPageULMarginItem.get() } );
}
-Color SlideBackground::GetColorSetOrDefault()
+Color const & SlideBackground::GetColorSetOrDefault()
{
// Tango Sky Blue 1, to be consistent w/ area fill panel (b/c COL_AUTO for slides is transparent)
if ( !mpColorItem )
@@ -685,7 +685,7 @@ Color SlideBackground::GetColorSetOrDefault()
return mpColorItem->GetColorValue();
}
-XGradient SlideBackground::GetGradientSetOrDefault()
+XGradient const & SlideBackground::GetGradientSetOrDefault()
{
if( !mpGradientItem )
{
@@ -700,7 +700,7 @@ XGradient SlideBackground::GetGradientSetOrDefault()
return mpGradientItem->GetGradientValue();
}
-const OUString SlideBackground::GetHatchingSetOrDefault()
+OUString const & SlideBackground::GetHatchingSetOrDefault()
{
if( !mpHatchItem )
{
@@ -715,7 +715,7 @@ const OUString SlideBackground::GetHatchingSetOrDefault()
return mpHatchItem->GetName();
}
-const OUString SlideBackground::GetBitmapSetOrDefault()
+OUString const & SlideBackground::GetBitmapSetOrDefault()
{
if( !mpBitmapItem || mpBitmapItem->isPattern())
{
@@ -730,7 +730,7 @@ const OUString SlideBackground::GetBitmapSetOrDefault()
return mpBitmapItem->GetName();
}
-const OUString SlideBackground::GetPatternSetOrDefault()
+OUString const & SlideBackground::GetPatternSetOrDefault()
{
if( !mpBitmapItem || !(mpBitmapItem->isPattern()))
{
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index 8b7ad034b585..9dfa890edc7c 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -159,11 +159,11 @@ private:
void UpdateMarginBox();
void SetPanelTitle(const OUString& rTitle);
- Color GetColorSetOrDefault();
- XGradient GetGradientSetOrDefault();
- const OUString GetHatchingSetOrDefault();
- const OUString GetBitmapSetOrDefault();
- const OUString GetPatternSetOrDefault();
+ Color const & GetColorSetOrDefault();
+ XGradient const & GetGradientSetOrDefault();
+ OUString const & GetHatchingSetOrDefault();
+ OUString const & GetBitmapSetOrDefault();
+ OUString const & GetPatternSetOrDefault();
bool IsDraw();
bool IsImpress();
void addListener();
diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
index eab9fec453f2..529c6a7662d3 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
@@ -69,7 +69,7 @@ public:
const std::shared_ptr<Theme>& rpTheme);
~Layouter();
- std::shared_ptr<PageObjectLayouter> GetPageObjectLayouter() const;
+ std::shared_ptr<PageObjectLayouter> const & GetPageObjectLayouter() const;
/** Set the interval of valid column counts. When nMinimalColumnCount
<= nMaximalColumnCount is not fulfilled then the call is ignored.
@param nMinimalColumnCount
@@ -112,7 +112,7 @@ public:
sal_Int32 GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const;
- Size GetPageObjectSize() const;
+ Size const & GetPageObjectSize() const;
/** Return the bounding box in window coordinates of the nIndex-th page
object.
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 81536d264d43..754bb4db51f3 100644
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -298,7 +298,7 @@ Layouter::~Layouter()
{
}
-std::shared_ptr<PageObjectLayouter> Layouter::GetPageObjectLayouter() const
+std::shared_ptr<PageObjectLayouter> const & Layouter::GetPageObjectLayouter() const
{
return mpImplementation->mpPageObjectLayouter;
}
@@ -338,7 +338,7 @@ sal_Int32 Layouter::GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) con
return mpImplementation->GetIndex(nRow,nColumn,true);
}
-Size Layouter::GetPageObjectSize() const
+Size const & Layouter::GetPageObjectSize() const
{
return mpImplementation->maPageObjectSize;
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 99dca2efed88..ab6eca07ca5e 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -373,7 +373,7 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView)
mpImpl->SetUserWantsTabBar( bIsTabBarVisible );
}
-std::shared_ptr<ViewShellManager> ViewShellBase::GetViewShellManager() const
+std::shared_ptr<ViewShellManager> const & ViewShellBase::GetViewShellManager() const
{
return mpImpl->mpViewShellManager;
}
@@ -920,7 +920,7 @@ OUString ViewShellBase::GetInitialViewShellType()
return sRequestedView;
}
-std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer()
+std::shared_ptr<tools::EventMultiplexer> const & ViewShellBase::GetEventMultiplexer()
{
OSL_ASSERT(mpImpl.get()!=nullptr);
OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=nullptr);
@@ -933,7 +933,7 @@ const ::tools::Rectangle& ViewShellBase::getClientRectangle() const
return mpImpl->maClientArea;
}
-std::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const
+std::shared_ptr<ToolBarManager> const & ViewShellBase::GetToolBarManager() const
{
OSL_ASSERT(mpImpl.get()!=nullptr);
OSL_ASSERT(mpImpl->mpToolBarManager.get()!=nullptr);
@@ -941,7 +941,7 @@ std::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const
return mpImpl->mpToolBarManager;
}
-std::shared_ptr<FormShellManager> ViewShellBase::GetFormShellManager() const
+std::shared_ptr<FormShellManager> const & ViewShellBase::GetFormShellManager() const
{
OSL_ASSERT(mpImpl.get()!=nullptr);
OSL_ASSERT(mpImpl->mpFormShellManager.get()!=nullptr);
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 4fd1a539607f..42be1b63f8b0 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -306,7 +306,7 @@ public:
: ClassificationCommon(rDrawViewShell)
{}
- std::vector<svx::ClassificationResult> getResults()
+ std::vector<svx::ClassificationResult> const & getResults()
{
return m_aResults;
}
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index fd206cb0d1be..78d6cd13f4db 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -1019,12 +1019,12 @@ void ViewShell::SetWinViewPos(const Point& rWinPos)
}
}
-Point ViewShell::GetWinViewPos() const
+Point const & ViewShell::GetWinViewPos() const
{
return mpContentWindow->GetWinViewPos();
}
-Point ViewShell::GetViewOrigin() const
+Point const & ViewShell::GetViewOrigin() const
{
return mpContentWindow->GetViewOrigin();
}