summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-23 18:35:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-24 07:01:47 +0100
commit6028b64e27dc45f20aa4a4e0adbef1c03e91a79b (patch)
treefcdba02b18bc9081371b91681fcb898697155af6 /vcl
parent92bab0f11e0a93005bfd13db3a0552ecaf082ecb (diff)
loplugin:passstuffbyref even more return improvements
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2 Reviewed-on: https://gerrit.libreoffice.org/47021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/settings.cxx6
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/image/ImageTree.cxx2
-rw-r--r--vcl/source/window/menubarwindow.cxx2
-rw-r--r--vcl/source/window/menubarwindow.hxx2
-rw-r--r--vcl/source/window/msgbox.cxx6
-rw-r--r--vcl/source/window/syswin.cxx2
10 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index e2841b8b4ed2..9089ca51ffd0 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2209,13 +2209,13 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
}
}
-const BitmapEx StyleSettings::GetPersonaHeader() const
+BitmapEx const & StyleSettings::GetPersonaHeader() const
{
setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor );
return mxData->maPersonaHeaderBitmap;
}
-const BitmapEx StyleSettings::GetPersonaFooter() const
+BitmapEx const & StyleSettings::GetPersonaFooter() const
{
setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor );
return mxData->maPersonaFooterBitmap;
@@ -2974,7 +2974,7 @@ StyleSettings::GetOptions() const
return mxData->mnOptions;
}
-std::vector<vcl::IconThemeInfo>
+std::vector<vcl::IconThemeInfo> const &
StyleSettings::GetInstalledIconThemes() const
{
if (!mxData->mIconThemeScanner) {
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index ec05ea1cc298..1f1699397770 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -162,7 +162,7 @@ bool Button::SetModeImage( const Image& rImage )
return true;
}
-const Image Button::GetModeImage( ) const
+Image const & Button::GetModeImage( ) const
{
return mpButtonData->maImage;
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 9493e37e952e..6ba271aecbf3 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -1127,7 +1127,7 @@ void TextView::SetReadOnly( bool bReadOnly )
}
}
-TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
+TextSelection const & TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
{
// normally only needed for Up/Down; but who cares
mpImpl->mpTextEngine->CheckIdleFormatter();
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index d126a8b16f9a..d7a0829b882c 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -223,7 +223,7 @@ ImplJobSetup& JobSetup::ImplGetData()
return *mpData;
}
-OUString JobSetup::GetPrinterName() const
+OUString const & JobSetup::GetPrinterName() const
{
return mpData->GetPrinterName();
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 7ff4300c71ee..a360e6230231 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -457,7 +457,7 @@ void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream )
xImplementation->addStream( rMimeType, pStream );
}
-std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
+std::set< PDFWriter::ErrorCode > const & PDFWriter::GetErrors()
{
return xImplementation->getErrors();
}
diff --git a/vcl/source/image/ImageTree.cxx b/vcl/source/image/ImageTree.cxx
index bbce46b0f280..941812925190 100644
--- a/vcl/source/image/ImageTree.cxx
+++ b/vcl/source/image/ImageTree.cxx
@@ -37,7 +37,7 @@ bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle,
return mpImplImageTree->loadImage(rName, rStyle, rBitmap, bLocalized, eFlags);
}
-css::uno::Reference<css::container::XNameAccess> ImageTree::getNameAccess()
+css::uno::Reference<css::container::XNameAccess> const & ImageTree::getNameAccess()
{
return mpImplImageTree->getNameAccess();
}
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index f7f933f28a95..cb14f3fba94f 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -211,7 +211,7 @@ void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide )
Resize();
}
-Size MenuBarWindow::MinCloseButtonSize()
+Size const & MenuBarWindow::MinCloseButtonSize()
{
return aCloseBtn->getMinSize();
}
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index bdf785f36d13..988e21cc20f5 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -129,7 +129,7 @@ public:
void SetAutoPopup(bool bAuto) { mbAutoPopup = bAuto; }
void LayoutChanged();
- Size MinCloseButtonSize();
+ Size const & MinCloseButtonSize();
/// Add an arbitrary button to the menubar that will appear next to the close button.
sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 67b3edf1df37..b86335840bb7 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -386,7 +386,7 @@ InfoBox::InfoBox( vcl::Window* pParent, MessBoxStyle nStyle, const OUString& rMe
SetImage( InfoBox::GetStandardImage() );
}
-Image InfoBox::GetStandardImage()
+Image const & InfoBox::GetStandardImage()
{
ImplInitMsgBoxImageList();
return ImplGetSVData()->maWinData.maMsgBoxImgList[3];
@@ -419,7 +419,7 @@ void WarningBox::SetDefaultCheckBoxText()
maCheckBoxText = VclResId(SV_STDTEXT_DONTWARNAGAIN);
}
-Image WarningBox::GetStandardImage()
+Image const & WarningBox::GetStandardImage()
{
ImplInitMsgBoxImageList();
return ImplGetSVData()->maWinData.maMsgBoxImgList[2];
@@ -497,7 +497,7 @@ void QueryBox::SetDefaultCheckBoxText()
maCheckBoxText = VclResId(SV_STDTEXT_DONTASKAGAIN);
}
-Image QueryBox::GetStandardImage()
+Image const & QueryBox::GetStandardImage()
{
ImplInitMsgBoxImageList();
return ImplGetSVData()->maWinData.maMsgBoxImgList[1];
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 9c42fc94b2de..28a9924b0203 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -982,7 +982,7 @@ void SystemWindow::CloseNotebookBar()
maNotebookBarUIFile.clear();
}
-VclPtr<NotebookBar> SystemWindow::GetNotebookBar() const
+VclPtr<NotebookBar> const & SystemWindow::GetNotebookBar() const
{
return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->GetNotebookBar();
}