diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 7dcc84442801..e534d200e085 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -718,7 +718,7 @@ public: SAL_DLLPRIVATE void ImplMakeUnique(); std::shared_ptr ImplGetImpBitmap() const { return mxImpBmp;} - SAL_DLLPRIVATE void ImplSetImpBitmap( std::shared_ptr xImpBmp ); + SAL_DLLPRIVATE void ImplSetImpBitmap( const std::shared_ptr& 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 cae59da32ab7..e986e500032a 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 d414fb811a93..92ca7937d4a0 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 xFocusId = nullptr ); + SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, const VclPtr& 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 9133ed2f0b35..e92e13d60d82 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -381,13 +381,13 @@ public: static bool PreparePrintJob( std::shared_ptr i_pController, const JobSetup& i_rInitSetup ); static bool ExecutePrintJob( std::shared_ptr i_pController ); - static void FinishPrintJob( std::shared_ptr i_pController ); + static void FinishPrintJob( const std::shared_ptr& i_pController ); /** Implementation detail of PrintJob being asynchronous not exported, not usable outside vcl */ - static void SAL_DLLPRIVATE ImplPrintJob( std::shared_ptr i_pController, + static void SAL_DLLPRIVATE ImplPrintJob( const std::shared_ptr& i_pController, const JobSetup& i_rInitSetup ); }; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 1f0cddd37d72..4c22c617e831 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 xGroup); + void add_to_size_group(const std::shared_ptr& xGroup); void remove_from_all_size_groups(); /* diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 264ceec08321..bcadbb128a3a 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); + void SetFontOptions(const std::shared_ptr&); std::shared_ptr 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 deff6d8086b8..80289f4f9e2c 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 xid, boost::optional pDisplay ); + bool bIsX11, const boost::optional& xid, boost::optional 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 90c19d5aed66..32e085fb4fe1 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -671,7 +671,7 @@ inline void addVertex(std::vector& rVertices, std::vector& rEx rExtrusionVectors.push_back(length); } -inline void addVertexPair(std::vector& rVertices, std::vector& rExtrusionVectors, glm::vec2 point, glm::vec2 extrusionVector, float length) +inline void addVertexPair(std::vector& rVertices, std::vector& 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 03915ea757c2..e60d77c10acd 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 xImpBmp) +void Bitmap::ImplSetImpBitmap(const std::shared_ptr& xImpBmp) { mxImpBmp = xImpBmp; } diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index 8378e5c72566..c9f4a5ceab62 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 118f9c92239c..4cc5e0bf47c8 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 404d0c88c994..9f6274660c45 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 1633dab15045..d44d4125d0b1 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -511,13 +511,13 @@ bool Printer::ExecutePrintJob(std::shared_ptr xController) return xController->getPrinter()->StartJob( aJobName, xController ); } -void Printer::FinishPrintJob(std::shared_ptr xController) +void Printer::FinishPrintJob(const std::shared_ptr& xController) { xController->resetPaperToLastConfigured(); xController->jobFinished( xController->getJobState() ); } -void Printer::ImplPrintJob(std::shared_ptr xController, +void Printer::ImplPrintJob(const std::shared_ptr& 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 b3639999a421..e321dd550153 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 9492e9c0d66b..a1d0a9b5a0af 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 xFocusId ) +void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr& xFocusId ) { if ( !mbInPopupMode ) return; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 457cd9f8006f..9c35022574f9 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 xGroup) +void Window::add_to_size_group(const std::shared_ptr& 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 0a1024788754..5476dd1fc7a0 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 xFontOptions) +void ServerFont::SetFontOptions(const std::shared_ptr& xFontOptions) { mxFontOptions = xFontOptions; diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx index 19ba95c1e7a9..c63916bb6ca0 100644 --- a/vcl/unx/generic/window/screensaverinhibitor.cxx +++ b/vcl/unx/generic/window/screensaverinhibitor.cxx @@ -40,7 +40,7 @@ #include void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason, - bool bIsX11, const boost::optional xid, boost::optional pDisplay ) + bool bIsX11, const boost::optional& xid, boost::optional 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 fInhibit, - std::function fUnInhibit, + const std::function& fInhibit, + const std::function& fUnInhibit, boost::optional& rCookie ) { if ( ( !bInhibit && ( rCookie == boost::none ) ) || diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx index 5e4b943886a3..1d16c9e817b8 100644 --- a/vcl/unx/gtk/a11y/atkvalue.cxx +++ b/vcl/unx/gtk/a11y/atkvalue.cxx @@ -42,7 +42,7 @@ static css::uno::Reference return css::uno::Reference(); } -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 88c4205de60d..d20e1b4dc25f 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::ReferencefileSelectionChanged( 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 e602baaff29f..49190eafedb7 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 fec69ff9ec5e..ffdb042941c1 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 - FindFocus(uno::Reference< accessibility::XAccessibleContext > xContext) + FindFocus(const uno::Reference< accessibility::XAccessibleContext >& xContext) { if (!xContext.is()) uno::Reference< accessibility::XAccessibleEditableText >();