[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/opengl vcl/source vcl/unx
Noel Grandin
noel at peralex.com
Tue Apr 12 06:33:18 UTC 2016
include/vcl/bitmap.hxx | 2 +-
include/vcl/embeddedfontshelper.hxx | 2 +-
include/vcl/floatwin.hxx | 2 +-
include/vcl/print.hxx | 4 ++--
include/vcl/window.hxx | 4 ++--
vcl/inc/unx/glyphcache.hxx | 2 +-
vcl/inc/unx/screensaverinhibitor.hxx | 2 +-
vcl/opengl/gdiimpl.cxx | 2 +-
vcl/source/gdi/bitmap.cxx | 2 +-
vcl/source/gdi/embeddedfontshelper.cxx | 2 +-
vcl/source/gdi/pdfwriter_impl.hxx | 2 +-
vcl/source/gdi/pdfwriter_impl2.cxx | 2 +-
vcl/source/gdi/print3.cxx | 4 ++--
vcl/source/window/accessibility.cxx | 2 +-
vcl/source/window/floatwin.cxx | 2 +-
vcl/source/window/window2.cxx | 2 +-
vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 2 +-
vcl/unx/generic/window/screensaverinhibitor.cxx | 6 +++---
vcl/unx/gtk/a11y/atkvalue.cxx | 2 +-
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 +++---
vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx | 6 +++---
vcl/unx/gtk/gtksalframe.cxx | 2 +-
22 files changed, 31 insertions(+), 31 deletions(-)
New commits:
commit 03fd8d24c2e4603731e796b24e51289736c65621
Author: Noel Grandin <noel at peralex.com>
Date: Mon Apr 11 15:29:25 2016 +0200
clang-tidy performance-unnecessary-value-param in vcl
Change-Id: I403f148060891feec56d7d2ef173a9c4934baf9e
Reviewed-on: https://gerrit.libreoffice.org/23995
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 7dcc844..e534d20 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -718,7 +718,7 @@ public:
SAL_DLLPRIVATE void ImplMakeUnique();
std::shared_ptr<ImpBitmap> ImplGetImpBitmap() const { return mxImpBmp;}
- SAL_DLLPRIVATE void ImplSetImpBitmap( std::shared_ptr<ImpBitmap> xImpBmp );
+ SAL_DLLPRIVATE void ImplSetImpBitmap( const std::shared_ptr<ImpBitmap>& xImpBmp );
SAL_DLLPRIVATE void ImplAssignWithSize( const Bitmap& rBitmap );
SAL_DLLPRIVATE void ImplAdaptBitCount(Bitmap& rNew) const;
diff --git a/include/vcl/embeddedfontshelper.hxx b/include/vcl/embeddedfontshelper.hxx
index cae59da..e986e50 100644
--- a/include/vcl/embeddedfontshelper.hxx
+++ b/include/vcl/embeddedfontshelper.hxx
@@ -46,7 +46,7 @@ public:
@param key key to xor the data with, from the start until the key's length (not repeated)
@param eot whether the data is compressed in Embedded OpenType format
*/
- static bool addEmbeddedFont( css::uno::Reference< css::io::XInputStream > stream,
+ static bool addEmbeddedFont( const css::uno::Reference< css::io::XInputStream >& stream,
const OUString& fontName, const char* extra,
std::vector< unsigned char > key = std::vector< unsigned char >(), bool eot = false);
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index d414fb8..92ca793 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -131,7 +131,7 @@ public:
sal_uInt16& rArrangeIndex );
static Point ImplConvertToAbsPos(vcl::Window* pReference, const Point& rPos);
static Rectangle ImplConvertToAbsPos(vcl::Window* pReference, const Rectangle& rRect);
- SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, VclPtr<vcl::Window> xFocusId = nullptr );
+ SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, const VclPtr<vcl::Window>& xFocusId = nullptr );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
virtual void doDeferredInit(WinBits nBits) override;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 9133ed2..e92e13d 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -381,13 +381,13 @@ public:
static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
const JobSetup& i_rInitSetup );
static bool ExecutePrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
- static void FinishPrintJob( std::shared_ptr<vcl::PrinterController> i_pController );
+ static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
/** Implementation detail of PrintJob being asynchronous
not exported, not usable outside vcl
*/
- static void SAL_DLLPRIVATE ImplPrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
+ static void SAL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
const JobSetup& i_rInitSetup );
};
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 1f0cddd..4c22c61 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1229,7 +1229,7 @@ public:
virtual css::uno::Reference< css::accessibility::XAccessible >
CreateAccessible();
- void SetAccessible( css::uno::Reference< css::accessibility::XAccessible > );
+ void SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& );
vcl::Window* GetAccessibleParentWindow() const;
sal_uInt16 GetAccessibleChildWindowCount();
@@ -1508,7 +1508,7 @@ public:
* Adds this widget to the xGroup VclSizeGroup
*
*/
- void add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup);
+ void add_to_size_group(const std::shared_ptr<VclSizeGroup>& xGroup);
void remove_from_all_size_groups();
/*
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 264ceec..bcadbb1 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -154,7 +154,7 @@ public:
bool TestFont() const { return mbFaceOk;}
FT_Face GetFtFace() const;
int GetLoadFlags() const { return (mnLoadFlags & ~FT_LOAD_IGNORE_TRANSFORM); }
- void SetFontOptions(std::shared_ptr<FontConfigFontOptions>);
+ void SetFontOptions(const std::shared_ptr<FontConfigFontOptions>&);
std::shared_ptr<FontConfigFontOptions> GetFontOptions() const;
bool NeedsArtificialBold() const { return mbArtBold; }
bool NeedsArtificialItalic() const { return mbArtItalic; }
diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx
index deff6d8..80289f4 100644
--- a/vcl/inc/unx/screensaverinhibitor.hxx
+++ b/vcl/inc/unx/screensaverinhibitor.hxx
@@ -25,7 +25,7 @@ class VCL_PLUGIN_PUBLIC ScreenSaverInhibitor
{
public:
void inhibit( bool bInhibit, const rtl::OUString& sReason,
- bool bIsX11, const boost::optional<unsigned int> xid, boost::optional<Display*> pDisplay );
+ bool bIsX11, const boost::optional<unsigned int>& xid, boost::optional<Display*> pDisplay );
private:
// These are all used as guint, however this header may be included
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 90c19d5..32e085f 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -671,7 +671,7 @@ inline void addVertex(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rEx
rExtrusionVectors.push_back(length);
}
-inline void addVertexPair(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rExtrusionVectors, glm::vec2 point, glm::vec2 extrusionVector, float length)
+inline void addVertexPair(std::vector<GLfloat>& rVertices, std::vector<GLfloat>& rExtrusionVectors, const glm::vec2& point, const glm::vec2& extrusionVector, float length)
{
addVertex(rVertices, rExtrusionVectors, point, -extrusionVector, -length);
addVertex(rVertices, rExtrusionVectors, point, extrusionVector, length);
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 03915ea..e60d77c 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -313,7 +313,7 @@ void Bitmap::ImplAssignWithSize( const Bitmap& rBitmap )
}
-void Bitmap::ImplSetImpBitmap(std::shared_ptr<ImpBitmap> xImpBmp)
+void Bitmap::ImplSetImpBitmap(const std::shared_ptr<ImpBitmap>& xImpBmp)
{
mxImpBmp = xImpBmp;
}
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 8378e5c..c9f4a5c 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -61,7 +61,7 @@ void EmbeddedFontsHelper::clearTemporaryFontFiles()
clearDir( path + "fromsystem/" );
}
-bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > stream, const OUString& fontName,
+bool EmbeddedFontsHelper::addEmbeddedFont( const uno::Reference< io::XInputStream >& stream, const OUString& fontName,
const char* extra, std::vector< unsigned char > key, bool eot )
{
OUString fileUrl = EmbeddedFontsHelper::fileUrlForTemporaryFont( fontName, extra );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 118f9c9..4cc5e0bf 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1008,7 +1008,7 @@ i12626
// helper for playMetafile
void implWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient,
VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& );
- void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, Graphic i_pGraphic,
+ void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, const Graphic& i_pGraphic,
VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& );
// helpers for CCITT 1bit bitmap stream
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 404d0c8..9f62746 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -65,7 +65,7 @@ void PDFWriterImpl::implWriteGradient( const tools::PolyPolygon& i_rPolyPoly, co
m_rOuterFace.Pop();
}
-void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, Graphic i_Graphic,
+void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSize, const BitmapEx& i_rBitmapEx, const Graphic& i_Graphic,
VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext )
{
if ( !i_rBitmapEx.IsEmpty() && i_rSize.Width() && i_rSize.Height() )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 1633dab..d44d412 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -511,13 +511,13 @@ bool Printer::ExecutePrintJob(std::shared_ptr<PrinterController> xController)
return xController->getPrinter()->StartJob( aJobName, xController );
}
-void Printer::FinishPrintJob(std::shared_ptr<PrinterController> xController)
+void Printer::FinishPrintJob(const std::shared_ptr<PrinterController>& xController)
{
xController->resetPaperToLastConfigured();
xController->jobFinished( xController->getJobState() );
}
-void Printer::ImplPrintJob(std::shared_ptr<PrinterController> xController,
+void Printer::ImplPrintJob(const std::shared_ptr<PrinterController>& xController,
const JobSetup& i_rInitSetup)
{
if (PreparePrintJob(xController, i_rInitSetup))
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index b363999..e321dd5 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -149,7 +149,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible(
return xAcc;
}
-void Window::SetAccessible( css::uno::Reference< css::accessibility::XAccessible > x )
+void Window::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& x )
{
mpWindowImpl->mxAccessible = x;
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 9492e9c..a1d0a9b 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -766,7 +766,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags )
StartPopupMode( aRect, nFlags );
}
-void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, VclPtr<vcl::Window> xFocusId )
+void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr<vcl::Window>& xFocusId )
{
if ( !mbInPopupMode )
return;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 457cd9f..9c35022 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1976,7 +1976,7 @@ void Window::set_non_homogeneous(bool bNonHomogeneous)
pWindowImpl->mbNonHomogeneous = bNonHomogeneous;
}
-void Window::add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup)
+void Window::add_to_size_group(const std::shared_ptr<VclSizeGroup>& xGroup)
{
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
//To-Do, multiple groups
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 0a10247..5476dd1 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -537,7 +537,7 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI )
mnLoadFlags |= FT_LOAD_NO_BITMAP;
}
-void ServerFont::SetFontOptions(std::shared_ptr<FontConfigFontOptions> xFontOptions)
+void ServerFont::SetFontOptions(const std::shared_ptr<FontConfigFontOptions>& xFontOptions)
{
mxFontOptions = xFontOptions;
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 19ba95c..c63916b 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -40,7 +40,7 @@
#include <sal/log.hxx>
void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason,
- bool bIsX11, const boost::optional<unsigned int> xid, boost::optional<Display*> pDisplay )
+ bool bIsX11, const boost::optional<unsigned int>& xid, boost::optional<Display*> pDisplay )
{
const char* appname = SalGenericSystem::getFrameClassName();
const OString aReason = OUStringToOString( sReason, RTL_TEXTENCODING_UTF8 );
@@ -68,8 +68,8 @@ void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason,
#if ENABLE_DBUS
void dbusInhibit( bool bInhibit,
const gchar* service, const gchar* path, const gchar* interface,
- std::function<bool( DBusGProxy*, guint&, GError*& )> fInhibit,
- std::function<bool( DBusGProxy*, const guint, GError*& )> fUnInhibit,
+ const std::function<bool( DBusGProxy*, guint&, GError*& )>& fInhibit,
+ const std::function<bool( DBusGProxy*, const guint, GError*& )>& fUnInhibit,
boost::optional<guint>& rCookie )
{
if ( ( !bInhibit && ( rCookie == boost::none ) ) ||
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 5e4b943..1d16c9e 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -42,7 +42,7 @@ static css::uno::Reference<css::accessibility::XAccessibleValue>
return css::uno::Reference<css::accessibility::XAccessibleValue>();
}
-static void anyToGValue( uno::Any aAny, GValue *pValue )
+static void anyToGValue( const uno::Any& aAny, GValue *pValue )
{
// FIXME: expand to lots of types etc.
double aDouble=0;
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 88c4205..d20e1b4 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -303,19 +303,19 @@ void SAL_CALL SalGtkFilePicker::removeFilePickerListener( const uno::Reference<X
// FilePicker Event functions
-void SalGtkFilePicker::impl_fileSelectionChanged( FilePickerEvent aEvent )
+void SalGtkFilePicker::impl_fileSelectionChanged( const FilePickerEvent& aEvent )
{
OSL_TRACE( "file selection changed");
if (m_xListener.is()) m_xListener->fileSelectionChanged( aEvent );
}
-void SalGtkFilePicker::impl_directoryChanged( FilePickerEvent aEvent )
+void SalGtkFilePicker::impl_directoryChanged( const FilePickerEvent& aEvent )
{
OSL_TRACE("directory changed");
if (m_xListener.is()) m_xListener->directoryChanged( aEvent );
}
-void SalGtkFilePicker::impl_controlStateChanged( FilePickerEvent aEvent )
+void SalGtkFilePicker::impl_controlStateChanged( const FilePickerEvent& aEvent )
{
OSL_TRACE("control state changed");
if (m_xListener.is()) m_xListener->controlStateChanged( aEvent );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
index e602baa..49190ea 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
@@ -172,9 +172,9 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
void ensureFilterList( const OUString& _rInitialCurrentFilter );
- void impl_fileSelectionChanged( css::ui::dialogs::FilePickerEvent aEvent );
- void impl_directoryChanged( css::ui::dialogs::FilePickerEvent aEvent );
- void impl_controlStateChanged( css::ui::dialogs::FilePickerEvent aEvent );
+ void impl_fileSelectionChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
+ void impl_directoryChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
+ void impl_controlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
private:
css::uno::Reference< css::ui::dialogs::XFilePickerListener >
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index fec69ff..ffdb042 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -3833,7 +3833,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
}
uno::Reference<accessibility::XAccessibleEditableText>
- FindFocus(uno::Reference< accessibility::XAccessibleContext > xContext)
+ FindFocus(const uno::Reference< accessibility::XAccessibleContext >& xContext)
{
if (!xContext.is())
uno::Reference< accessibility::XAccessibleEditableText >();
More information about the Libreoffice-commits
mailing list