[Libreoffice-commits] core.git: avmedia/source basegfx/source canvas/source configmgr/source cppcanvas/source embeddedobj/source extensions/source forms/source fpicker/source io/source jvmfwk/inc jvmfwk/plugins linguistic/source package/inc package/source pyuno/source reportdesign/source scripting/source sdext/source slideshow/source sot/source stoc/source ucb/source xmlhelp/source xmlsecurity/inc xmlsecurity/source

Noel Grandin noel at peralex.com
Thu Apr 14 11:37:41 UTC 2016


 avmedia/source/framework/modeltools.cxx                                |    2 -
 avmedia/source/viewer/mediawindow_impl.cxx                             |    2 -
 avmedia/source/viewer/mediawindow_impl.hxx                             |    2 -
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx                       |    2 -
 basegfx/source/polygon/b2dtrapezoid.cxx                                |    4 +-
 basegfx/source/range/b2drangeclipper.cxx                               |    6 +--
 basegfx/source/tools/b2dclipstate.cxx                                  |    2 -
 canvas/source/cairo/cairo_canvashelper.cxx                             |    2 -
 canvas/source/cairo/cairo_canvashelper.hxx                             |    2 -
 configmgr/source/configurationprovider.cxx                             |    4 +-
 configmgr/source/update.cxx                                            |    2 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx                          |    2 -
 embeddedobj/source/inc/oleembobj.hxx                                   |    2 -
 embeddedobj/source/msole/oleembed.cxx                                  |    6 +--
 embeddedobj/source/msole/olevisual.cxx                                 |    2 -
 extensions/source/bibliography/bibload.cxx                             |    2 -
 extensions/source/propctrlr/formcomponenthandler.cxx                   |    2 -
 extensions/source/propctrlr/xsdvalidationhelper.cxx                    |    2 -
 extensions/source/propctrlr/xsdvalidationhelper.hxx                    |    2 -
 extensions/source/update/check/updatecheck.cxx                         |    2 -
 extensions/source/update/check/updatecheck.hxx                         |    2 -
 forms/source/component/GroupManager.cxx                                |    2 -
 forms/source/component/GroupManager.hxx                                |    2 -
 forms/source/component/propertybaghelper.cxx                           |    2 -
 forms/source/richtext/richtextimplcontrol.cxx                          |    2 -
 forms/source/richtext/richtextimplcontrol.hxx                          |    2 -
 forms/source/runtime/formoperations.cxx                                |    8 ++---
 forms/source/xforms/binding.cxx                                        |    8 ++---
 fpicker/source/office/PlacesListBox.cxx                                |    4 +-
 fpicker/source/office/PlacesListBox.hxx                                |    4 +-
 fpicker/source/office/RemoteFilesDialog.cxx                            |    2 -
 io/source/acceptor/acc_socket.cxx                                      |    8 ++---
 io/source/connector/ctr_socket.cxx                                     |    8 ++---
 jvmfwk/inc/vendorbase.hxx                                              |    2 -
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                             |    2 -
 linguistic/source/dicimp.cxx                                           |    2 -
 linguistic/source/dicimp.hxx                                           |    2 -
 linguistic/source/gciterator.cxx                                       |    6 +--
 linguistic/source/gciterator.hxx                                       |    4 +-
 linguistic/source/iprcache.cxx                                         |    4 +-
 package/inc/ByteGrabber.hxx                                            |    2 -
 package/inc/ZipFile.hxx                                                |    2 -
 package/source/xstor/selfterminatefilestream.cxx                       |    2 -
 package/source/xstor/selfterminatefilestream.hxx                       |    2 -
 package/source/xstor/xstorage.cxx                                      |    6 +--
 package/source/xstor/xstorage.hxx                                      |    2 -
 package/source/zipapi/ByteGrabber.cxx                                  |    2 -
 package/source/zipapi/ZipFile.cxx                                      |    2 -
 pyuno/source/module/pyuno.cxx                                          |    2 -
 pyuno/source/module/pyuno_impl.hxx                                     |    2 -
 pyuno/source/module/pyuno_iterator.cxx                                 |    2 -
 reportdesign/source/filter/xml/xmlfilter.cxx                           |    2 -
 reportdesign/source/ui/inc/ReportController.hxx                        |    6 +--
 reportdesign/source/ui/report/ReportController.cxx                     |    6 +--
 reportdesign/source/ui/report/dlgedfunc.cxx                            |    2 -
 scripting/source/dlgprov/dlgprov.cxx                                   |    2 -
 scripting/source/stringresource/stringresource.cxx                     |    2 -
 sdext/source/minimizer/impoptimizer.cxx                                |    2 -
 sdext/source/minimizer/optimizationstats.cxx                           |    2 -
 sdext/source/minimizer/optimizationstats.hxx                           |    2 -
 sdext/source/minimizer/unodialog.cxx                                   |    2 -
 sdext/source/minimizer/unodialog.hxx                                   |    2 -
 sdext/source/pdfimport/tree/genericelements.cxx                        |    2 -
 sdext/source/pdfimport/tree/genericelements.hxx                        |    2 -
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx   |    2 -
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx |    4 +-
 slideshow/source/engine/slide/layermanager.cxx                         |    2 -
 slideshow/source/engine/slide/layermanager.hxx                         |    2 -
 sot/source/sdstor/ucbstorage.cxx                                       |    2 -
 stoc/source/inspect/introspection.cxx                                  |    2 -
 stoc/source/invocation/invocation.cxx                                  |    4 +-
 ucb/source/cacher/cachedcontentresultsetstub.cxx                       |    8 ++---
 ucb/source/cacher/cachedcontentresultsetstub.hxx                       |    8 ++---
 ucb/source/core/FileAccess.cxx                                         |    2 -
 ucb/source/sorter/sortresult.cxx                                       |   10 +++---
 ucb/source/sorter/sortresult.hxx                                       |   10 +++---
 ucb/source/ucp/cmis/cmis_content.cxx                                   |    8 ++---
 ucb/source/ucp/cmis/cmis_content.hxx                                   |    6 +--
 ucb/source/ucp/gio/gio_content.cxx                                     |    6 +--
 ucb/source/ucp/gio/gio_content.hxx                                     |    6 +--
 xmlhelp/source/cxxhelp/inc/tvread.hxx                                  |    6 +--
 xmlhelp/source/cxxhelp/provider/databases.cxx                          |   16 +++++-----
 xmlhelp/source/cxxhelp/provider/databases.hxx                          |   16 +++++-----
 xmlhelp/source/treeview/tvread.cxx                                     |    6 +--
 xmlsecurity/inc/xmlsecurity/certificateviewer.hxx                      |    2 -
 xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx                     |   10 +++---
 xmlsecurity/source/dialogs/certificateviewer.cxx                       |    2 -
 xmlsecurity/source/helper/xmlsignaturehelper.cxx                       |   10 +++---
 xmlsecurity/source/helper/xmlsignaturehelper2.cxx                      |    2 -
 xmlsecurity/source/helper/xmlsignaturehelper2.hxx                      |    2 -
 90 files changed, 171 insertions(+), 171 deletions(-)

New commits:
commit 62633dfe026bc3badf7066e5fb454036bae9cfdc
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Apr 12 12:08:00 2016 +0200

    clang-tidy performance-unnecessary-value-param in various
    
    Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
    Reviewed-on: https://gerrit.libreoffice.org/24019
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index 74669af..9aacfc3 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -137,7 +137,7 @@ bool KmzDae2Gltf(const OUString& rSourceURL, OUString& o_rOutput)
 #endif // HAVE_FEATURE_COLLADA
 
 
-static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed::XStorage> xSubStorage, ::ucbhelper::Content& rContent)
+static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference<embed::XStorage>& xSubStorage, ::ucbhelper::Content& rContent)
 {
     // Create a temp file with which json parser can work.
     OUString sTempFileURL;
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index ecd282d..87080ba 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -237,7 +237,7 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR
 
 uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer(
     const OUString& rURL, const OUString& rManagerServName,
-    uno::Reference< uno::XComponentContext > xContext)
+    const uno::Reference< uno::XComponentContext >& xContext)
 {
     uno::Reference< media::XPlayer > xPlayer;
     try
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index ff13802..ff649ae 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -149,7 +149,7 @@ private:
     void onURLChanged();
 
     static css::uno::Reference<css::media::XPlayer> createPlayer(const OUString& rURL, const OUString& rManagerServName,
-                                                                 css::uno::Reference<css::uno::XComponentContext> xContext);
+                                                                 const css::uno::Reference<css::uno::XComponentContext>& xContext);
 
     OUString maFileURL;
     OUString mTempFileURL;
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 1d4405f..e72c6ba 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -142,7 +142,7 @@ namespace basegfx
                             while(nNewInd < nTempPointCount && rTempPoints[nNewInd].getIndex() == a)
                             {
                                 const temporaryPoint& rTempPoint = rTempPoints[nNewInd++];
-                                const B2DPoint aNewPoint(rTempPoint.getPoint());
+                                const B2DPoint& aNewPoint(rTempPoint.getPoint());
 
                                 // do not add points double
                                 if(!aRetval.getB2DPoint(aRetval.count() - 1L).equal(aNewPoint))
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 2b6db06..e36d2af 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -271,7 +271,7 @@ namespace basegfx
             bool splitEdgeAtGivenPoint(
                 TrDeEdgeEntries::reference aEdge,
                 const B2DPoint& rCutPoint,
-                TrDeEdgeEntries::iterator aCurrent)
+                const TrDeEdgeEntries::iterator& aCurrent)
             {
                 // do not create edges without deltaY: do not split when start is identical
                 if(aEdge.getStart().equal(rCutPoint))
@@ -323,7 +323,7 @@ namespace basegfx
             bool testAndCorrectEdgeIntersection(
                 TrDeEdgeEntries::reference aEdgeA,
                 TrDeEdgeEntries::reference aEdgeB,
-                TrDeEdgeEntries::iterator aCurrent)
+                const TrDeEdgeEntries::iterator& aCurrent)
             {
                 // Exclude simple cases: same start or end point
                 if(aEdgeA.getStart().equal(aEdgeB.getStart()))
diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx
index 882b4a8..46f9e49 100644
--- a/basegfx/source/range/b2drangeclipper.cxx
+++ b/basegfx/source/range/b2drangeclipper.cxx
@@ -706,14 +706,14 @@ namespace basegfx
 
         // wow what a hack. necessary because stl's list::erase does
         // not eat reverse_iterator
-        template<typename Cont, typename Iter> Iter eraseFromList(Cont&, Iter);
+        template<typename Cont, typename Iter> Iter eraseFromList(Cont&, const Iter&);
         template<> inline ListOfEdges::iterator eraseFromList(
-            ListOfEdges& rList, ListOfEdges::iterator aIter)
+            ListOfEdges& rList, const ListOfEdges::iterator& aIter)
         {
             return rList.erase(aIter);
         }
         template<> inline ListOfEdges::reverse_iterator eraseFromList(
-            ListOfEdges& rList, ListOfEdges::reverse_iterator aIter)
+            ListOfEdges& rList, const ListOfEdges::reverse_iterator& aIter)
         {
             return ListOfEdges::reverse_iterator(
                     rList.erase(boost::prior(aIter.base())));
diff --git a/basegfx/source/tools/b2dclipstate.cxx b/basegfx/source/tools/b2dclipstate.cxx
index 65a179f..251a0e1 100644
--- a/basegfx/source/tools/b2dclipstate.cxx
+++ b/basegfx/source/tools/b2dclipstate.cxx
@@ -105,7 +105,7 @@ namespace tools
                 B2VectorOrientation::Positive);
         }
 
-        void addPolyPolygon(B2DPolyPolygon aPoly, Operation eOp)
+        void addPolyPolygon(const B2DPolyPolygon& aPoly, Operation eOp)
         {
             commitPendingRanges();
             if( mePendingOps != eOp )
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index f163aa0..6354264 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -938,7 +938,7 @@ namespace cairocanvas
         cairo_set_matrix( pCairo, &aOrigMatrix );
     }
 
-    void doPolyPolygonImplementation( ::basegfx::B2DPolyPolygon aPolyPolygon,
+    void doPolyPolygonImplementation( const ::basegfx::B2DPolyPolygon& aPolyPolygon,
                                       Operation aOperation,
                                       cairo_t* pCairo,
                                       const uno::Sequence< rendering::Texture >* pTextures,
diff --git a/canvas/source/cairo/cairo_canvashelper.hxx b/canvas/source/cairo/cairo_canvashelper.hxx
index f86a27d..a5f60d7 100644
--- a/canvas/source/cairo/cairo_canvashelper.hxx
+++ b/canvas/source/cairo/cairo_canvashelper.hxx
@@ -275,7 +275,7 @@ namespace cairocanvas
     };
 
     /// also needed from SpriteHelper
-    void doPolyPolygonImplementation( ::basegfx::B2DPolyPolygon aPolyPolygon,
+    void doPolyPolygonImplementation( const ::basegfx::B2DPolyPolygon& aPolyPolygon,
                                       Operation aOperation,
                                       cairo_t* pCairo,
                                       const css::uno::Sequence< css::rendering::Texture >* pTextures,
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 65e33b7..ed4fe6a 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -92,7 +92,7 @@ class Service:
 {
 public:
     explicit Service(
-        css::uno::Reference< css::uno::XComponentContext > const context):
+        const css::uno::Reference< css::uno::XComponentContext >& context):
         ServiceBase(m_aMutex), context_(context), default_(true),
         lock_( lock() )
     {
@@ -100,7 +100,7 @@ public:
     }
 
     Service(
-        css::uno::Reference< css::uno::XComponentContext > const context,
+        const css::uno::Reference< css::uno::XComponentContext >& context,
         OUString const & locale):
         ServiceBase(m_aMutex), context_(context), locale_(locale),
         default_(false),
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index b479ffe..054bca7 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -60,7 +60,7 @@ class Service:
     public cppu::WeakImplHelper< css::configuration::XUpdate >
 {
 public:
-    explicit Service(css::uno::Reference< css::uno::XComponentContext > const context):
+    explicit Service(const css::uno::Reference< css::uno::XComponentContext >& context):
         context_(context)
     {
         assert(context.is());
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index bc716ba..15f4ce8 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2739,7 +2739,7 @@ namespace cppcanvas
             template< typename Functor > bool
                 forSubsetRange( Functor&                                            rFunctor,
                                 ImplRenderer::ActionVector::const_iterator          aRangeBegin,
-                                ImplRenderer::ActionVector::const_iterator          aRangeEnd,
+                                const ImplRenderer::ActionVector::const_iterator&   aRangeEnd,
                                 sal_Int32                                           nStartIndex,
                                 sal_Int32                                           nEndIndex,
                                 const ImplRenderer::ActionVector::const_iterator&   rEnd )
diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx
index f5dca11..8468036 100644
--- a/embeddedobj/source/inc/oleembobj.hxx
+++ b/embeddedobj/source/inc/oleembobj.hxx
@@ -254,7 +254,7 @@ protected:
     bool HasVisReplInStream();
 
     css::embed::VisualRepresentation GetVisualRepresentationInNativeFormat_Impl(
-                    const css::uno::Reference< css::io::XStream > xCachedVisRepr )
+                    const css::uno::Reference< css::io::XStream >& xCachedVisRepr )
         throw ( css::uno::Exception );
 
     css::uno::Reference< css::io::XStream > TryToRetrieveCachedVisualRepresentation_Impl(
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 473df89..6d42cab 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -664,7 +664,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState()
 namespace
 {
 #ifndef _WIN32
-    bool lcl_CopyStream(uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut)
+    bool lcl_CopyStream(const uno::Reference<io::XInputStream>& xIn, const uno::Reference<io::XOutputStream>& xOut)
     {
         const sal_Int32 nChunkSize = 4096;
         uno::Sequence< sal_Int8 > aData(nChunkSize);
@@ -683,8 +683,8 @@ namespace
     //Dump the objects content to a tempfile, just the "CONTENTS" stream if
     //there is one for non-compound documents, otherwise the whole content.
     //On success a file is returned which must be removed by the caller
-    OUString lcl_ExtractObject(css::uno::Reference< css::lang::XMultiServiceFactory > xFactory,
-        css::uno::Reference< css::io::XStream > xObjectStream)
+    OUString lcl_ExtractObject(const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory,
+        const css::uno::Reference< css::io::XStream >& xObjectStream)
     {
         OUString sUrl;
 
diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx
index d53ef5f..0445c09 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
 using namespace ::comphelper;
 
 embed::VisualRepresentation OleEmbeddedObject::GetVisualRepresentationInNativeFormat_Impl(
-                    const uno::Reference< io::XStream > xCachedVisRepr )
+                    const uno::Reference< io::XStream >& xCachedVisRepr )
         throw ( uno::Exception )
 {
     embed::VisualRepresentation aVisualRepr;
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index ce87741..4c6929f 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -417,7 +417,7 @@ Reference< XResultSet >  BibliographyLoader::GetDataCursor() const
     return m_xCursor;
 }
 
-static OUString lcl_AddProperty(Reference< XNameAccess >  xColumns,
+static OUString lcl_AddProperty(const Reference< XNameAccess >&  xColumns,
         const Mapping* pMapping, const OUString& rColumnName)
 {
     OUString sColumnName(rColumnName);
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 09ec0ed..b60e5e5 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -212,7 +212,7 @@ namespace pcr
         }
 
         Reference< resource::XStringResourceResolver > lcl_getStringResourceResolverForProperty
-            ( Reference< XPropertySet > _xComponent, const OUString& _rPropertyName,
+            ( const Reference< XPropertySet >& _xComponent, const OUString& _rPropertyName,
               const Any& _rPropertyValue )
         {
             Reference< resource::XStringResourceResolver > xRet;
diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx
index c0ca257..284de9f 100644
--- a/extensions/source/propctrlr/xsdvalidationhelper.cxx
+++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx
@@ -372,7 +372,7 @@ namespace pcr
     }
 
 
-    OUString XSDValidationHelper::getBasicTypeNameForClass( sal_Int16 _nClass, Reference< XDataTypeRepository > _rxRepository )
+    OUString XSDValidationHelper::getBasicTypeNameForClass( sal_Int16 _nClass, const Reference< XDataTypeRepository >& _rxRepository )
     {
         OUString sReturn;
         OSL_ENSURE( _rxRepository.is(), "XSDValidationHelper::getBasicTypeNameForClass: invalid repository!" );
diff --git a/extensions/source/propctrlr/xsdvalidationhelper.hxx b/extensions/source/propctrlr/xsdvalidationhelper.hxx
index 20f8f84..1f8df85 100644
--- a/extensions/source/propctrlr/xsdvalidationhelper.hxx
+++ b/extensions/source/propctrlr/xsdvalidationhelper.hxx
@@ -127,7 +127,7 @@ namespace pcr
         static OUString
                 getBasicTypeNameForClass(
                     sal_Int16 _nClass,
-                    css::uno::Reference< css::xforms::XDataTypeRepository > _rxRepository
+                    const css::uno::Reference< css::xforms::XDataTypeRepository >& _rxRepository
                 );
     };
 
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 9899472..a304b4e 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -1312,7 +1312,7 @@ UpdateCheck::setCheckFailedState()
 }
 
 
-void UpdateCheck::handleMenuBarUI( rtl::Reference< UpdateHandler > rUpdateHandler,
+void UpdateCheck::handleMenuBarUI( const rtl::Reference< UpdateHandler >& rUpdateHandler,
                                    UpdateState& eState,
                                    bool suppressBubble )
 {
diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx
index 9937b9b..f2a344ac 100644
--- a/extensions/source/update/check/updatecheck.hxx
+++ b/extensions/source/update/check/updatecheck.hxx
@@ -140,7 +140,7 @@ private:
 
     /* This method turns on the menubar icon and triggers the bubble window
      */
-    void handleMenuBarUI( rtl::Reference< UpdateHandler > rUpdateHandler,
+    void handleMenuBarUI( const rtl::Reference< UpdateHandler >& rUpdateHandler,
                           UpdateState& eState, bool suppressBubble );
     enum State {
         NOT_INITIALIZED,
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index 46cc2ca..4bde4dd 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -420,7 +420,7 @@ void OGroupManager::RemoveElement( const Reference<XPropertySet>& xSet )
     removeFromGroupMap(sGroupName,xSet);
 }
 
-OUString OGroupManager::GetGroupName( css::uno::Reference< css::beans::XPropertySet> xComponent )
+OUString OGroupManager::GetGroupName( const css::uno::Reference< css::beans::XPropertySet>& xComponent )
 {
     if (!xComponent.is())
         return OUString();
diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx
index 8567ebb..e2f3b68 100644
--- a/forms/source/component/GroupManager.hxx
+++ b/forms/source/component/GroupManager.hxx
@@ -194,7 +194,7 @@ public:
     void getGroupByName(const OUString& Name, css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> >& _rGroup);
     css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > getControlModels();
 
-    static OUString GetGroupName( css::uno::Reference< css::beans::XPropertySet> xComponent );
+    static OUString GetGroupName( const css::uno::Reference< css::beans::XPropertySet>& xComponent );
 };
 
 
diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx
index b0774a3..ab73d42 100644
--- a/forms/source/component/propertybaghelper.cxx
+++ b/forms/source/component/propertybaghelper.cxx
@@ -245,7 +245,7 @@ namespace frm
 
         struct PropertyValueLessByName : public ::std::binary_function< PropertyValue, PropertyValue, bool >
         {
-            bool operator()( const PropertyValue& _lhs, const PropertyValue _rhs ) const
+            bool operator()( const PropertyValue& _lhs, const PropertyValue& _rhs ) const
             {
                 return _lhs.Name < _rhs.Name;
             }
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 6bb6849..708b13c 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -98,7 +98,7 @@ namespace frm
     }
 
 
-    void RichTextControlImpl::implUpdateAttribute( AttributeHandlerPool::const_iterator _pHandler )
+    void RichTextControlImpl::implUpdateAttribute( const AttributeHandlerPool::const_iterator& _pHandler )
     {
         if  (  ( _pHandler->first == SID_ATTR_CHAR_WEIGHT )
             || ( _pHandler->first == SID_ATTR_CHAR_POSTURE )
diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx
index 2654274..761bd9b 100644
--- a/forms/source/richtext/richtextimplcontrol.hxx
+++ b/forms/source/richtext/richtextimplcontrol.hxx
@@ -149,7 +149,7 @@ namespace frm
 
     private:
         // updates the cache with the state provided by the given attribute handler
-        void    implUpdateAttribute( AttributeHandlerPool::const_iterator _pHandler );
+        void    implUpdateAttribute( const AttributeHandlerPool::const_iterator& _pHandler );
 
         // updates the cache with the given state, and calls listeners (if necessary)
         void    implCheckUpdateCache( AttributeId _nAttribute, const AttributeState& _rState );
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 4f9884f..e0f9367 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -460,7 +460,7 @@ namespace frm
             return true;
         }
 
-        bool commit1Form(Reference< XFormController > xCntrl, bool &needConfirmation, bool &shouldCommit)
+        bool commit1Form(const Reference< XFormController >& xCntrl, bool &needConfirmation, bool &shouldCommit)
         {
             Reference< XFormOperations > xFrmOps(xCntrl->getFormOperations());
             if (!xFrmOps->commitCurrentControl())
@@ -477,7 +477,7 @@ namespace frm
             return true;
         }
 
-        bool commitFormAndSubforms(Reference< XFormController > xCntrl, bool needConfirmation)
+        bool commitFormAndSubforms(const Reference< XFormController >& xCntrl, bool needConfirmation)
         {
             bool shouldCommit(true);
             assert(xCntrl.is());
@@ -504,7 +504,7 @@ namespace frm
             return true;
         }
 
-        bool commit1Form(Reference< XForm > xFrm, bool &needConfirmation, bool &shouldCommit)
+        bool commit1Form(const Reference< XForm >& xFrm, bool &needConfirmation, bool &shouldCommit)
         {
             Reference< XPropertySet > xProps(xFrm, UNO_QUERY_THROW);
             // nothing to do if the record is not modified
@@ -525,7 +525,7 @@ namespace frm
             return true;
         }
 
-        bool commitFormAndSubforms(Reference< XForm > xFrm, bool needConfirmation)
+        bool commitFormAndSubforms(const Reference< XForm >& xFrm, bool needConfirmation)
         {
             // No control...  do what we can with the models
             bool shouldCommit(true);
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index 9a713d4..19d8966 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -490,8 +490,8 @@ Model* Binding::getModelImpl( const css::uno::Reference<css::xforms::XModel>& xM
     return pModel;
 }
 
-static void lcl_addListenerToNode( Reference<XNode> xNode,
-                            Reference<XEventListener> xListener )
+static void lcl_addListenerToNode( const Reference<XNode>& xNode,
+                                   const Reference<XEventListener>& xListener )
 {
     Reference<XEventTarget> xTarget( xNode, UNO_QUERY );
     if( xTarget.is() )
@@ -511,8 +511,8 @@ static void lcl_addListenerToNode( Reference<XNode> xNode,
     }
 }
 
-static void lcl_removeListenerFromNode( Reference<XNode> xNode,
-                                 Reference<XEventListener> xListener )
+static void lcl_removeListenerFromNode( const Reference<XNode>& xNode,
+                                        const Reference<XEventListener>& xListener )
 {
     Reference<XEventTarget> xTarget( xNode, UNO_QUERY );
     if( xTarget.is() )
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index eda3262..64fe061 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -100,7 +100,7 @@ void PlacesListBox::dispose()
     Control::dispose();
 }
 
-void PlacesListBox::AppendPlace( PlacePtr pPlace )
+void PlacesListBox::AppendPlace( const PlacePtr& pPlace )
 {
     maPlaces.push_back( pPlace );
     mpImpl->InsertEntry( pPlace->GetName( ),
@@ -184,7 +184,7 @@ bool PlacesListBox::Notify( NotifyEvent& rNEvt )
     return Control::Notify( rNEvt );
 }
 
-Image PlacesListBox::getEntryIcon( PlacePtr pPlace )
+Image PlacesListBox::getEntryIcon( const PlacePtr& pPlace )
 {
     Image theImage = mpDlg->GetButtonImage( IMG_FILEDLG_PLACE_LOCAL );
     if ( !pPlace->IsLocal( ) )
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index 5f4f21e..05c2637 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -53,7 +53,7 @@ class PlacesListBox : public Control
         virtual ~PlacesListBox( );
         virtual void dispose() override;
 
-        void AppendPlace( PlacePtr pPlace );
+        void AppendPlace( const PlacePtr& pPlace );
         void RemovePlace( sal_uInt16 nPos );
         void RemoveSelectedPlace();
         sal_Int32 GetNbEditablePlaces() { return mnNbEditables;}
@@ -74,7 +74,7 @@ class PlacesListBox : public Control
 
     private:
 
-        Image getEntryIcon( PlacePtr pPlace );
+        Image getEntryIcon( const PlacePtr& pPlace );
 
         DECL_LINK_TYPED( Selection, SvTreeListBox*, void );
         DECL_LINK_TYPED( DoubleClick, SvTreeListBox*, bool );
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index dfb17fc..1dc31d5 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -399,7 +399,7 @@ void RemoteFilesDialog::Show()
     }
 }
 
-OUString lcl_GetServiceType( ServicePtr pService )
+OUString lcl_GetServiceType( const ServicePtr& pService )
 {
     INetProtocol aProtocol = pService->GetUrlObject().GetProtocol();
     switch( aProtocol )
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 0a1edc5..ae02856 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -127,7 +127,7 @@ namespace io_acceptor {
             t(listener);
     }
 
-    static void callStarted(Reference<XStreamListener> xStreamListener)
+    static void callStarted(const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->started();
     }
@@ -137,7 +137,7 @@ namespace io_acceptor {
 
         explicit callError(const Any & any);
 
-        void operator () (Reference<XStreamListener> xStreamListener);
+        void operator () (const Reference<XStreamListener>& xStreamListener);
     };
 
     callError::callError(const Any & aAny)
@@ -145,12 +145,12 @@ namespace io_acceptor {
     {
     }
 
-    void callError::operator () (Reference<XStreamListener> xStreamListener)
+    void callError::operator () (const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->error(any);
     }
 
-    static void callClosed(Reference<XStreamListener> xStreamListener)
+    static void callClosed(const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->closed();
     }
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index 2c0d3f6..00f35eb 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -48,7 +48,7 @@ namespace stoc_connector {
     }
 
 
-    static void callStarted(Reference<XStreamListener> xStreamListener)
+    static void callStarted(const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->started();
     }
@@ -58,7 +58,7 @@ namespace stoc_connector {
 
         explicit callError(const Any & any);
 
-        void operator () (Reference<XStreamListener> xStreamListener);
+        void operator () (const Reference<XStreamListener>& xStreamListener);
     };
 
     callError::callError(const Any & aAny)
@@ -66,12 +66,12 @@ namespace stoc_connector {
     {
     }
 
-    void callError::operator () (Reference<XStreamListener> xStreamListener)
+    void callError::operator () (const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->error(any);
     }
 
-    static void callClosed(Reference<XStreamListener> xStreamListener)
+    static void callClosed(const Reference<XStreamListener>& xStreamListener)
     {
         xStreamListener->closed();
     }
diff --git a/jvmfwk/inc/vendorbase.hxx b/jvmfwk/inc/vendorbase.hxx
index 7dc32cd..1bb7844 100644
--- a/jvmfwk/inc/vendorbase.hxx
+++ b/jvmfwk/inc/vendorbase.hxx
@@ -184,7 +184,7 @@ protected:
     typedef rtl::Reference<VendorBase> (* createInstance_func) ();
     friend rtl::Reference<VendorBase> createInstance(
         createInstance_func pFunc,
-        std::vector<std::pair<OUString, OUString> > properties);
+        const std::vector<std::pair<OUString, OUString> >& properties);
 };
 
 }
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index db4d017..e2f5ff9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1066,7 +1066,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
 }
 
 Reference<VendorBase> createInstance(createInstance_func pFunc,
-                                     vector<pair<OUString, OUString> > properties)
+                                     const vector<pair<OUString, OUString> >& properties)
 {
 
     Reference<VendorBase> aBase = (*pFunc)();
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index c22894c..b243a25 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -490,7 +490,7 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
 }
 
 void DictionaryNeo::launchEvent(sal_Int16 nEvent,
-                                uno::Reference< XDictionaryEntry > xEntry)
+                                const uno::Reference< XDictionaryEntry >& xEntry)
 {
     MutexGuard  aGuard( GetLinguMutex() );
 
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index e1bf146..6a8e893 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -60,7 +60,7 @@ class DictionaryNeo :
     DictionaryNeo & operator = (const DictionaryNeo &) = delete;
 
     void                    launchEvent(sal_Int16 nEvent,
-                                        css::uno::Reference< css::linguistic2::XDictionaryEntry > xEntry);
+                                        const css::uno::Reference< css::linguistic2::XDictionaryEntry >& xEntry);
 
     sal_uLong                   loadEntries(const OUString &rMainURL);
     sal_uLong                   saveEntries(const OUString &rMainURL);
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 22b475e..cb26ef6 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -225,7 +225,7 @@ extern "C" void lcl_workerfunc (void * gci)
 }
 
 static lang::Locale lcl_GetPrimaryLanguageOfSentence(
-    uno::Reference< text::XFlatParagraph > xFlatPara,
+    const uno::Reference< text::XFlatParagraph >& xFlatPara,
     sal_Int32 nStartIndex )
 {
     //get the language of the first word
@@ -301,8 +301,8 @@ OUString GrammarCheckingIterator::GetOrCreateDocId(
 
 
 void GrammarCheckingIterator::AddEntry(
-    uno::WeakReference< text::XFlatParagraphIterator > xFlatParaIterator,
-    uno::WeakReference< text::XFlatParagraph > xFlatPara,
+    const uno::WeakReference< text::XFlatParagraphIterator >& xFlatParaIterator,
+    const uno::WeakReference< text::XFlatParagraph >& xFlatPara,
     const OUString & rDocId,
     sal_Int32 nStartIndex,
     bool bAutomatic )
diff --git a/linguistic/source/gciterator.hxx b/linguistic/source/gciterator.hxx
index 3b15744..36e5f09 100644
--- a/linguistic/source/gciterator.hxx
+++ b/linguistic/source/gciterator.hxx
@@ -123,8 +123,8 @@ class GrammarCheckingIterator:
     OUString GetOrCreateDocId( const css::uno::Reference< css::lang::XComponent > &xComp );
 
     void AddEntry(
-            css::uno::WeakReference< css::text::XFlatParagraphIterator > xFlatParaIterator,
-            css::uno::WeakReference< css::text::XFlatParagraph > xFlatPara,
+            const css::uno::WeakReference< css::text::XFlatParagraphIterator >& xFlatParaIterator,
+            const css::uno::WeakReference< css::text::XFlatParagraph >& xFlatPara,
             const OUString &rDocId, sal_Int32 nStartIndex, bool bAutomatic );
 
     void ProcessResult( const css::linguistic2::ProofreadingResult &rRes,
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index a83cb6b..6fe5af6 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -58,7 +58,7 @@ static const struct
 
 
 static void lcl_AddAsPropertyChangeListener(
-        Reference< XPropertyChangeListener > xListener,
+        const Reference< XPropertyChangeListener >& xListener,
         Reference< XLinguProperties > &rPropSet )
 {
     if (xListener.is() && rPropSet.is())
@@ -73,7 +73,7 @@ static void lcl_AddAsPropertyChangeListener(
 
 
 static void lcl_RemoveAsPropertyChangeListener(
-        Reference< XPropertyChangeListener > xListener,
+        const Reference< XPropertyChangeListener >& xListener,
         Reference< XLinguProperties > &rPropSet )
 {
     if (xListener.is() && rPropSet.is())
diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx
index 1956065..0d522f1 100644
--- a/package/inc/ByteGrabber.hxx
+++ b/package/inc/ByteGrabber.hxx
@@ -46,7 +46,7 @@ public:
     ByteGrabber (css::uno::Reference < css::io::XInputStream > xIstream);
     ~ByteGrabber();
 
-    void setInputStream (css::uno::Reference < css::io::XInputStream > xNewStream);
+    void setInputStream (const css::uno::Reference < css::io::XInputStream >& xNewStream);
     // XInputStream
     sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
         throw(css::io::NotConnectedException, css::io::BufferSizeExceededException, css::io::IOException, css::uno::RuntimeException);
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 624593f..c32d582 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -101,7 +101,7 @@ public:
 
     EntryHash& GetEntryHash() { return aEntries; }
 
-    void setInputStream ( css::uno::Reference < css::io::XInputStream > xNewStream );
+    void setInputStream ( const css::uno::Reference < css::io::XInputStream >& xNewStream );
     css::uno::Reference< css::io::XInputStream > SAL_CALL getRawData(
             ZipEntry& rEntry,
             const ::rtl::Reference < EncryptionData > &rData,
diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx
index 6ba6e68..7575a18 100644
--- a/package/source/xstor/selfterminatefilestream.cxx
+++ b/package/source/xstor/selfterminatefilestream.cxx
@@ -24,7 +24,7 @@
 
 using namespace ::com::sun::star;
 
-OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext > xContext, const OUString& aURL )
+OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< uno::XComponentContext >& xContext, const OUString& aURL )
 : m_aURL( aURL )
 {
     uno::Reference< uno::XComponentContext > xOwnContext = xContext;
diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx
index 73ce1fa..4cd4dbd 100644
--- a/package/source/xstor/selfterminatefilestream.hxx
+++ b/package/source/xstor/selfterminatefilestream.hxx
@@ -39,7 +39,7 @@ protected:
     css::uno::Reference< css::io::XSeekable > m_xSeekable;
 
 public:
-    OSelfTerminateFileStream( const css::uno::Reference< css::uno::XComponentContext > xContext, const OUString& aURL );
+    OSelfTerminateFileStream( const css::uno::Reference< css::uno::XComponentContext >& xContext, const OUString& aURL );
 
     virtual ~OSelfTerminateFileStream();
 
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index a268c0cc..72452dd 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -144,8 +144,8 @@ void OStorage_Impl::completeStorageStreamCopy_Impl(
             xDestProps->setPropertyValue( aPropNames[ind], xSourceProps->getPropertyValue( aPropNames[ind] ) );
 }
 
-uno::Reference< io::XInputStream > GetSeekableTempCopy( uno::Reference< io::XInputStream > xInStream,
-                                                        uno::Reference< uno::XComponentContext > xContext )
+uno::Reference< io::XInputStream > GetSeekableTempCopy( const uno::Reference< io::XInputStream >& xInStream,
+                                                        const uno::Reference< uno::XComponentContext >& xContext )
 {
     uno::Reference < io::XTempFile > xTempFile = io::TempFile::create(xContext);
     uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -765,7 +765,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
 }
 
 void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
-                                        uno::Reference< embed::XStorage > xDest,
+                                        const uno::Reference< embed::XStorage >& xDest,
                                         const OUString& aName,
                                         bool bDirect )
 {
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index 712afd3..e738504 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -226,7 +226,7 @@ struct OStorage_Impl
     void CopyToStorage( const css::uno::Reference< css::embed::XStorage >& xDest,
                         bool bDirect );
     void CopyStorageElement( SotElement_Impl* pElement,
-                            css::uno::Reference< css::embed::XStorage > xDest,
+                            const css::uno::Reference< css::embed::XStorage >& xDest,
                             const OUString& aName,
                             bool bDirect );
 
diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx
index a6f2364..984becf 100644
--- a/package/source/zipapi/ByteGrabber.cxx
+++ b/package/source/zipapi/ByteGrabber.cxx
@@ -45,7 +45,7 @@ ByteGrabber::~ByteGrabber()
 {
 }
 
-void ByteGrabber::setInputStream (uno::Reference < io::XInputStream > xNewStream)
+void ByteGrabber::setInputStream (const uno::Reference < io::XInputStream >& xNewStream)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     xStream = xNewStream;
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 670513b..da44e34 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -114,7 +114,7 @@ ZipFile::~ZipFile()
     aEntries.clear();
 }
 
-void ZipFile::setInputStream ( uno::Reference < XInputStream > xNewStream )
+void ZipFile::setInputStream ( const uno::Reference < XInputStream >& xNewStream )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 8b44c64..8aa2c1c 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -593,7 +593,7 @@ void lcl_getRowsColumns( PyUNO* me, sal_Int32& nRows, sal_Int32& nColumns )
     nColumns = xIndexAccessCols->getCount();
 }
 
-PyRef lcl_indexToSlice( PyRef rIndex )
+PyRef lcl_indexToSlice( const PyRef& rIndex )
 {
     Py_ssize_t nIndex = PyNumber_AsSsize_t( rIndex.get(), PyExc_IndexError );
     if (nIndex == -1 && PyErr_Occurred())
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index e1cf3b2..0452da7 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -228,7 +228,7 @@ typedef struct
 } PyUNO;
 
 PyObject* PyUNO_iterator_new (
-    const css::uno::Reference<css::container::XEnumeration> xEnumeration);
+    const css::uno::Reference<css::container::XEnumeration>& xEnumeration);
 
 typedef struct
 {
diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx
index 7bf399e..71ccb03 100644
--- a/pyuno/source/module/pyuno_iterator.cxx
+++ b/pyuno/source/module/pyuno_iterator.cxx
@@ -166,7 +166,7 @@ static PyTypeObject PyUNO_iterator_Type =
 #endif
 };
 
-PyObject* PyUNO_iterator_new( const Reference< XEnumeration > xEnumeration )
+PyObject* PyUNO_iterator_new( const Reference< XEnumeration >& xEnumeration )
 {
     PyUNO_iterator* self = PyObject_New( PyUNO_iterator, &PyUNO_iterator_Type );
     if ( self == nullptr )
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 57a2c22..4ab047c 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -193,7 +193,7 @@ sal_Int32 ReadThroughComponent(
 
 /// read a component (storage version)
 sal_Int32 ReadThroughComponent(
-    uno::Reference< embed::XStorage > xStorage,
+    const uno::Reference< embed::XStorage >& xStorage,
     const uno::Reference<XComponent>& xModelComponent,
     const sal_Char* pStreamName,
     const sal_Char* pCompatibilityStreamName,
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 3342b75..fc8dcd9 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -215,11 +215,11 @@ namespace rptui
         @param _nUndoStrId the string id of the string which is shown in undo menu
         @param _nShrinkId  ID of what you would like to shrink.
         */
-        static void shrinkSectionBottom(css::uno::Reference< css::report::XSection > _xSection);
-        static void shrinkSectionTop(css::uno::Reference< css::report::XSection > _xSection);
+        static void shrinkSectionBottom(const css::uno::Reference< css::report::XSection >& _xSection);
+        static void shrinkSectionTop(const css::uno::Reference< css::report::XSection >& _xSection);
 
     public:
-        void shrinkSection(sal_uInt16 _nUndoStrId, css::uno::Reference< css::report::XSection > _xSection, sal_Int32 _nShrinkId);
+        void shrinkSection(sal_uInt16 _nUndoStrId, const css::uno::Reference< css::report::XSection >& _xSection, sal_Int32 _nShrinkId);
 
         /** opens the file open dialog to allow the user to select a image which will be
         * bound to a newly created image button.
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ad510d4..4093850 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2625,7 +2625,7 @@ void OReportController::alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _
     InvalidateFeature( SID_UNDO );
 }
 
-void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xSection)
+void OReportController::shrinkSectionBottom(const uno::Reference<report::XSection>& _xSection)
 {
     const sal_Int32 nElements = _xSection->getCount();
     if (nElements == 0)
@@ -2656,7 +2656,7 @@ void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xS
     _xSection->setHeight(nMaxPositionY);
 }
 
-void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSection)
+void OReportController::shrinkSectionTop(const uno::Reference<report::XSection>& _xSection)
 {
     const sal_Int32 nElements = _xSection->getCount();
     if (nElements == 0)
@@ -2693,7 +2693,7 @@ void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSect
     _xSection->setHeight(nNewSectionHeight);
 }
 
-void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid)
+void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, const uno::Reference<report::XSection>& _xSection, sal_Int32 _nSid)
 {
     if ( _xSection.is() )
     {
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index a8f7ced..b38ac8f 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -131,7 +131,7 @@ void DlgEdFunc::setOverlappedControlColor(sal_Int32 _nColor)
     m_nOverlappedControlColor = _nColor;
 }
 
-sal_Int32 lcl_setColorOfObject(uno::Reference< uno::XInterface > _xObj, long _nColorTRGB)
+sal_Int32 lcl_setColorOfObject(const uno::Reference< uno::XInterface >& _xObj, long _nColorTRGB)
 {
     sal_Int32 nBackColor = 0;
     try
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 1af17ca..02f5abc 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -213,7 +213,7 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
 
 
     Reference< resource::XStringResourceManager > getStringResourceFromDialogLibrary
-        ( Reference< container::XNameContainer > xDialogLib )
+        ( const Reference< container::XNameContainer >& xDialogLib )
     {
         Reference< resource::XStringResourceManager > xStringResourceManager;
         if( xDialogLib.is() )
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index cd04d67..64ae70f 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1901,7 +1901,7 @@ sal_Unicode getEscapeChar( const sal_Unicode* pBuf, sal_Int32 nLen, sal_Int32& r
     return cRet;
 }
 
-void CheckContinueInNextLine( Reference< io::XTextInputStream2 > xTextInputStream,
+void CheckContinueInNextLine( const Reference< io::XTextInputStream2 >& xTextInputStream,
     OUString& aLine, bool& bEscapePending, const sal_Unicode*& pBuf,
     sal_Int32& nLen, sal_Int32& i )
 {
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 53600ed..33c4e02 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -565,7 +565,7 @@ bool ImpOptimizer::Optimize()
     return true;
 }
 
-static void DispatchURL( Reference< XComponentContext > xContext, const OUString& sURL, Reference< XFrame > xFrame )
+static void DispatchURL( const Reference< XComponentContext >& xContext, const OUString& sURL, const Reference< XFrame >& xFrame )
 {
     try
     {
diff --git a/sdext/source/minimizer/optimizationstats.cxx b/sdext/source/minimizer/optimizationstats.cxx
index 74c3c14..d0f6adc 100644
--- a/sdext/source/minimizer/optimizationstats.cxx
+++ b/sdext/source/minimizer/optimizationstats.cxx
@@ -71,7 +71,7 @@ void OptimizationStats::InitializeStatusValues( const uno::Sequence< PropertyVal
 }
 
 
-void OptimizationStats::InitializeStatusValuesFromDocument( Reference< XModel > rxModel )
+void OptimizationStats::InitializeStatusValuesFromDocument( const Reference< XModel >& rxModel )
 {
     try
     {
diff --git a/sdext/source/minimizer/optimizationstats.hxx b/sdext/source/minimizer/optimizationstats.hxx
index 545f4fb..29a15aa 100644
--- a/sdext/source/minimizer/optimizationstats.hxx
+++ b/sdext/source/minimizer/optimizationstats.hxx
@@ -45,7 +45,7 @@ class OptimizationStats
         void SetStatusValue( const PPPOptimizerTokenEnum eStat, const css::uno::Any& rStatValue );
         const css::uno::Any* GetStatusValue( const PPPOptimizerTokenEnum eStat ) const;
 
-        void InitializeStatusValuesFromDocument( css::uno::Reference< css::frame::XModel > rxModel );
+        void InitializeStatusValuesFromDocument( const css::uno::Reference< css::frame::XModel >& rxModel );
         void InitializeStatusValues( const css::uno::Sequence< css::beans::PropertyValue >& rOptimizationStats );
 
         css::beans::PropertyValues GetStatusSequence();
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx
index 986d286..325a196 100644
--- a/sdext/source/minimizer/unodialog.cxx
+++ b/sdext/source/minimizer/unodialog.cxx
@@ -129,7 +129,7 @@ void UnoDialog::setVisible( const OUString& rName, bool bVisible )
 }
 
 
-Reference< XButton > UnoDialog::insertButton( const OUString& rName, Reference< XActionListener > xActionListener,
+Reference< XButton > UnoDialog::insertButton( const OUString& rName, const Reference< XActionListener >& xActionListener,
             const Sequence< OUString >& rPropertyNames, const Sequence< Any >& rPropertyValues )
 {
     Reference< XButton > xButton;
diff --git a/sdext/source/minimizer/unodialog.hxx b/sdext/source/minimizer/unodialog.hxx
index 0d8cfba..f80f122 100644
--- a/sdext/source/minimizer/unodialog.hxx
+++ b/sdext/source/minimizer/unodialog.hxx
@@ -69,7 +69,7 @@ public:
     void setVisible( const OUString& rName, bool bVisible );
 
     css::uno::Reference< css::awt::XButton > insertButton( const OUString& rName,
-        css::uno::Reference< css::awt::XActionListener > xActionListener, const css::uno::Sequence< OUString >& rPropertyNames,
+        const css::uno::Reference< css::awt::XActionListener >& xActionListener, const css::uno::Sequence< OUString >& rPropertyNames,
             const css::uno::Sequence< css::uno::Any >& rPropertyValues );
 
     css::uno::Reference< css::awt::XFixedText > insertFixedText( const OUString& rName,
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx
index 12a52dc..2da7860 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -306,7 +306,7 @@ void PageElement::updateParagraphGeometry( Element* pEle )
     }
 }
 
-bool PageElement::resolveHyperlink( std::list<Element*>::iterator link_it, std::list<Element*>& rElements )
+bool PageElement::resolveHyperlink( const std::list<Element*>::iterator& link_it, std::list<Element*>& rElements )
 {
     HyperlinkElement* pLink = dynamic_cast<HyperlinkElement*>(*link_it);
     if( ! pLink ) // sanity check
diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/tree/genericelements.hxx
index fbed71e..9bb7021 100644
--- a/sdext/source/pdfimport/tree/genericelements.hxx
+++ b/sdext/source/pdfimport/tree/genericelements.hxx
@@ -249,7 +249,7 @@ namespace pdfi
         {}
     private:
         // helper method for resolveHyperlinks
-        bool resolveHyperlink( std::list<Element*>::iterator link_it, std::list<Element*>& rElements );
+        bool resolveHyperlink( const std::list<Element*>::iterator& link_it, std::list<Element*>& rElements );
     public:
         virtual ~PageElement();
 
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index d70d9a7..f629258 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -1597,7 +1597,7 @@ GLuint VortexTransition::makeShader() const
     return OpenGLHelper::LoadShaders( "vortexVertexShader", "vortexFragmentShader", "vortexGeometryShader" );
 }
 
-glm::mat4 lookAt(glm::vec3 eye, glm::vec3 center, glm::vec3 up) {
+glm::mat4 lookAt(const glm::vec3& eye, const glm::vec3& center, const glm::vec3& up) {
     glm::vec3 f = glm::normalize(center - eye);
     glm::vec3 u = glm::normalize(up);
     glm::vec3 s = glm::normalize(glm::cross(f, u));
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index c864f87..7ed3b02 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -175,7 +175,7 @@ public:
     OGLTransitionerImpl();
     OGLTransitionerImpl(const OGLTransitionerImpl&) = delete;
     OGLTransitionerImpl& operator=(const OGLTransitionerImpl&) = delete;
-    bool setTransition( std::shared_ptr<OGLTransitionImpl> pOGLTransition );
+    bool setTransition( const std::shared_ptr<OGLTransitionImpl>& pOGLTransition );
     bool initialize( const Reference< presentation::XSlideShowView >& xView,
             const Reference< rendering::XBitmap >& xLeavingSlide,
             const Reference< rendering::XBitmap >& xEnteringSlide );
@@ -546,7 +546,7 @@ void OGLTransitionerImpl::impl_finishTransition()
         mpTransition->finish();
 }
 
-bool OGLTransitionerImpl::setTransition( std::shared_ptr<OGLTransitionImpl> pTransition )
+bool OGLTransitionerImpl::setTransition( const std::shared_ptr<OGLTransitionImpl>& pTransition )
 {
     if ( mpTransition ) // already initialized
         return true;
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 34603d8..865e642 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -655,7 +655,7 @@ namespace slideshow
 
         void LayerManager::commitLayerChanges( std::size_t              nCurrLayerIndex,
                                                LayerShapeMap::const_iterator  aFirstLayerShape,
-                                               LayerShapeMap::const_iterator  aEndLayerShapes )
+                                               const LayerShapeMap::const_iterator&  aEndLayerShapes )
         {
             const bool bLayerExists( maLayers.size() > nCurrLayerIndex );
             if( bLayerExists )
diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx
index 61ccede..859de37 100644
--- a/slideshow/source/engine/slide/layermanager.hxx
+++ b/slideshow/source/engine/slide/layermanager.hxx
@@ -270,7 +270,7 @@ namespace slideshow
              */
             void           commitLayerChanges( std::size_t                    nCurrLayerIndex,
                                                LayerShapeMap::const_iterator  aFirstLayerShape,
-                                               LayerShapeMap::const_iterator  aEndLayerShapes );
+                                               const LayerShapeMap::const_iterator& aEndLayerShapes );
 
             /** Init Shape layers with background layer.
              */
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index ec3003b..33d2f52 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -311,7 +311,7 @@ void FileStreamWrapper_Impl::checkError()
 
 #define min( x, y ) (( x < y ) ? x : y)
 
-SotClipboardFormatId GetFormatId_Impl( SvGlobalName aName )
+SotClipboardFormatId GetFormatId_Impl( const SvGlobalName& aName )
 {
     if ( aName == SvGlobalName( SO3_SW_CLASSID_60 ) )
         return SotClipboardFormatId::STARWRITER_60;
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 1fff94f..c755eef 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -96,7 +96,7 @@ typedef WeakImplHelper< XIntrospectionAccess, XMaterialHolder, XExactName,
 
 
 // Method to assert, if a class is derived from another class
-bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass> xDerivedFromClass )
+bool isDerivedFrom( const Reference<XIdlClass>& xToTestClass, const Reference<XIdlClass>& xDerivedFromClass )
 {
     Sequence< Reference<XIdlClass> > aClassesSeq = xToTestClass->getSuperclasses();
     const Reference<XIdlClass>* pClassesArray = aClassesSeq.getConstArray();
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 9f2c4c0..370478f 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -204,7 +204,7 @@ private:
     void getInfoSequenceImpl( Sequence< OUString >* pStringSeq, Sequence< InvocationInfo >* pInfoSeq );
     void fillInfoForNameAccess( InvocationInfo& rInfo, const OUString& aName );
     static void fillInfoForProperty( InvocationInfo& rInfo, const Property& rProp );
-    static void fillInfoForMethod( InvocationInfo& rInfo, const Reference< XIdlMethod > xMethod );
+    static void fillInfoForMethod( InvocationInfo& rInfo, const Reference< XIdlMethod >& xMethod );
 
     Reference<XTypeConverter>           xTypeConverter;
     Reference<XIntrospection>           xIntrospection;
@@ -960,7 +960,7 @@ void Invocation_Impl::fillInfoForProperty
 void Invocation_Impl::fillInfoForMethod
 (
     InvocationInfo& rInfo,
-    const Reference< XIdlMethod > xMethod
+    const Reference< XIdlMethod >& xMethod
 )
 {
     rInfo.aName = xMethod->getName();
diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx
index 8064360..ba0c575 100644
--- a/ucb/source/cacher/cachedcontentresultsetstub.cxx
+++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx
@@ -332,7 +332,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub
 
 void SAL_CALL CachedContentResultSetStub
     ::impl_getCurrentRowContent( Any& rRowContent
-        , Reference< XRow > xRow )
+        , const Reference< XRow >& xRow )
         throw ( SQLException, RuntimeException )
 {
     sal_Int32 nCount = impl_getColumnCount();
@@ -437,7 +437,7 @@ void SAL_CALL CachedContentResultSetStub
 
 void SAL_CALL CachedContentResultSetStub
     ::impl_getCurrentContentIdentifierString( Any& rAny
-        , Reference< XContentAccess > xContentAccess )
+        , const Reference< XContentAccess >& xContentAccess )
         throw ( RuntimeException )
 {
      rAny <<= xContentAccess->queryContentIdentifierString();
@@ -445,7 +445,7 @@ void SAL_CALL CachedContentResultSetStub
 
 void SAL_CALL CachedContentResultSetStub
     ::impl_getCurrentContentIdentifier( Any& rAny
-        , Reference< XContentAccess > xContentAccess )
+        , const Reference< XContentAccess >& xContentAccess )
         throw ( RuntimeException )
 {
      rAny <<= xContentAccess->queryContentIdentifier();
@@ -453,7 +453,7 @@ void SAL_CALL CachedContentResultSetStub
 
 void SAL_CALL CachedContentResultSetStub
     ::impl_getCurrentContent( Any& rAny
-        , Reference< XContentAccess > xContentAccess )
+        , const Reference< XContentAccess >& xContentAccess )
         throw ( RuntimeException )
 {
      rAny <<= xContentAccess->queryContent();
diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx
index 9157d97..9793100 100644
--- a/ucb/source/cacher/cachedcontentresultsetstub.hxx
+++ b/ucb/source/cacher/cachedcontentresultsetstub.hxx
@@ -54,7 +54,7 @@ private:
     void SAL_CALL
     impl_getCurrentRowContent(
         css::uno::Any& rRowContent,
-        css::uno::Reference< css::sdbc::XRow > xRow )
+        const css::uno::Reference< css::sdbc::XRow >& xRow )
         throw ( css::sdbc::SQLException
               , css::uno::RuntimeException );
 
@@ -64,19 +64,19 @@ private:
     static void SAL_CALL
     impl_getCurrentContentIdentifierString(
             css::uno::Any& rAny
-            , css::uno::Reference< css::ucb::XContentAccess > xContentAccess )
+            , const css::uno::Reference< css::ucb::XContentAccess >& xContentAccess )
             throw ( css::uno::RuntimeException );
 
     static void SAL_CALL
     impl_getCurrentContentIdentifier(
             css::uno::Any& rAny
-            , css::uno::Reference< css::ucb::XContentAccess > xContentAccess )
+            , const css::uno::Reference< css::ucb::XContentAccess >& xContentAccess )
             throw ( css::uno::RuntimeException );
 
     static void SAL_CALL
     impl_getCurrentContent(
             css::uno::Any& rAny
-            , css::uno::Reference< css::ucb::XContentAccess > xContentAccess )
+            , const css::uno::Reference< css::ucb::XContentAccess >& xContentAccess )
             throw ( css::uno::RuntimeException );
 
     void SAL_CALL
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index f386d14..6ec2fef 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -167,7 +167,7 @@ class OCommandEnvironment : public cppu::WeakImplHelper< XCommandEnvironment >
     Reference< XInteractionHandler > mxInteraction;
 
 public:
-    void setHandler( Reference< XInteractionHandler > xInteraction_ )
+    void setHandler( const Reference< XInteractionHandler >& xInteraction_ )
     {
         mxInteraction = xInteraction_;
     }
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 43c7493..55271af 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -963,8 +963,8 @@ void SAL_CALL SortedResultSet::removeVetoableChangeListener(
 
 // private methods
 
-sal_IntPtr SortedResultSet::CompareImpl( Reference < XResultSet > xResultOne,
-                                   Reference < XResultSet > xResultTwo,
+sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResultOne,
+                                   const Reference < XResultSet >& xResultTwo,
                                    sal_IntPtr nIndexOne, sal_IntPtr nIndexTwo,
                                    SortInfo* pSortInfo )
 
@@ -1178,8 +1178,8 @@ sal_IntPtr SortedResultSet::CompareImpl( Reference < XResultSet > xResultOne,
 }
 
 
-sal_IntPtr SortedResultSet::CompareImpl( Reference < XResultSet > xResultOne,
-                                   Reference < XResultSet > xResultTwo,
+sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResultOne,
+                                   const Reference < XResultSet >& xResultTwo,
                                    sal_IntPtr nIndexOne, sal_IntPtr nIndexTwo )
     throw( SQLException, RuntimeException )
 {
@@ -1617,7 +1617,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
 
 
 void SortedResultSet::BuildSortInfo(
-                Reference< XResultSet > aResult,
+                const Reference< XResultSet >& aResult,
                 const Sequence < NumberedSortingInfo > &xSortInfo,
                 const Reference< XAnyCompareFactory > &xCompFactory )
 {
diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx
index e2461f4..9ee45c5 100644
--- a/ucb/source/sorter/sortresult.hxx
+++ b/ucb/source/sorter/sortresult.hxx
@@ -145,16 +145,16 @@ private:
     sal_IntPtr          Compare( SortListData *pOne,
                                  SortListData *pTwo )
                             throw( css::sdbc::SQLException, css::uno::RuntimeException );
-    void                BuildSortInfo( css::uno::Reference< css::sdbc::XResultSet > aResult,
+    void                BuildSortInfo( const css::uno::Reference< css::sdbc::XResultSet >& aResult,
                                        const css::uno::Sequence < css::ucb::NumberedSortingInfo > &xSortInfo,
                                        const css::uno::Reference< css::ucb::XAnyCompareFactory > &xCompFac );
-    static sal_IntPtr   CompareImpl( css::uno::Reference < css::sdbc::XResultSet > xResultOne,
-                                     css::uno::Reference < css::sdbc::XResultSet > xResultTwo,
+    static sal_IntPtr   CompareImpl( const css::uno::Reference < css::sdbc::XResultSet >& xResultOne,
+                                     const css::uno::Reference < css::sdbc::XResultSet >& xResultTwo,
                                      sal_IntPtr nIndexOne, sal_IntPtr nIndexTwo,
                                      SortInfo* pSortInfo )
                             throw( css::sdbc::SQLException, css::uno::RuntimeException );
-    sal_IntPtr          CompareImpl( css::uno::Reference < css::sdbc::XResultSet > xResultOne,
-                                     css::uno::Reference < css::sdbc::XResultSet > xResultTwo,
+    sal_IntPtr          CompareImpl( const css::uno::Reference < css::sdbc::XResultSet >& xResultOne,
+                                     const css::uno::Reference < css::sdbc::XResultSet >& xResultTwo,
                                      sal_IntPtr nIndexOne, sal_IntPtr nIndexTwo )
                             throw( css::sdbc::SQLException, css::uno::RuntimeException );
     void                PropertyChanged( const css::beans::PropertyChangeEvent& rEvt );
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 0fe6936..7ea714f 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -88,7 +88,7 @@ namespace
         return unoTime;
     }
 
-    uno::Any lcl_cmisPropertyToUno( libcmis::PropertyPtr pProperty )
+    uno::Any lcl_cmisPropertyToUno( const libcmis::PropertyPtr& pProperty )
     {
         uno::Any aValue;
         switch ( pProperty->getPropertyType( )->getType( ) )
@@ -1393,8 +1393,8 @@ namespace cmis
     const int TRANSFER_BUFFER_SIZE = 65536;
 
     void Content::copyData(
-        uno::Reference< io::XInputStream > xIn,
-        uno::Reference< io::XOutputStream > xOut )
+        const uno::Reference< io::XInputStream >& xIn,
+        const uno::Reference< io::XOutputStream >& xOut )
     {
         uno::Sequence< sal_Int8 > theData( TRANSFER_BUFFER_SIZE );
 
@@ -1498,7 +1498,7 @@ namespace cmis
         return aRet;
     }
 
-    bool Content::feedSink( uno::Reference< uno::XInterface> xSink,
+    bool Content::feedSink( const uno::Reference< uno::XInterface>& xSink,
         const uno::Reference< ucb::XCommandEnvironment >& xEnv )
     {
         if ( !xSink.is() )
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index f835a96..0252ed5 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -109,8 +109,8 @@ private:
     OUString cancelCheckOut( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv )
             throw( css::uno::Exception );
 
-    static void copyData( css::uno::Reference< css::io::XInputStream > xIn,
-        css::uno::Reference< css::io::XOutputStream > xOut );
+    static void copyData( const css::uno::Reference< css::io::XInputStream >& xIn,
+        const css::uno::Reference< css::io::XOutputStream >& xOut );
 
     css::uno::Sequence< css::uno::Any >
         setPropertyValues( const css::uno::Sequence< css::beans::PropertyValue >& rValues,
@@ -121,7 +121,7 @@ private:
             throw(css::uno::Exception,
                   std::exception);
 
-    bool feedSink( css::uno::Reference< css::uno::XInterface> aSink,
+    bool feedSink( const css::uno::Reference< css::uno::XInterface>& aSink,
         const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
 
 public:
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 5073b9d..4152428 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -811,8 +811,8 @@ bool Content::doSetFileInfo(GFileInfo *pNewInfo)
 
 const int TRANSFER_BUFFER_SIZE = 65536;
 
-void Content::copyData( uno::Reference< io::XInputStream > xIn,
-    uno::Reference< io::XOutputStream > xOut )
+void Content::copyData( const uno::Reference< io::XInputStream >& xIn,
+    const uno::Reference< io::XOutputStream >& xOut )
 {
     uno::Sequence< sal_Int8 > theData( TRANSFER_BUFFER_SIZE );
 
@@ -824,7 +824,7 @@ void Content::copyData( uno::Reference< io::XInputStream > xIn,
     xOut->closeOutput();
 }
 
-bool Content::feedSink( uno::Reference< uno::XInterface > xSink,
+bool Content::feedSink( const uno::Reference< uno::XInterface >& xSink,
     const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ )
 {
     if ( !xSink.is() )
diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx
index 6bb53cb..84b8534 100644
--- a/ucb/source/ucp/gio/gio_content.hxx
+++ b/ucb/source/ucp/gio/gio_content.hxx
@@ -101,8 +101,8 @@ private:
 
     void destroy( bool bDeletePhysical ) throw( css::uno::Exception, std::exception );
 
-    static void copyData( css::uno::Reference< css::io::XInputStream > xIn,
-        css::uno::Reference< css::io::XOutputStream > xOut );
+    static void copyData( const css::uno::Reference< css::io::XInputStream >& xIn,
+        const css::uno::Reference< css::io::XOutputStream >& xOut );
 
     css::uno::Sequence< css::uno::Any >
         setPropertyValues( const css::uno::Sequence<
@@ -110,7 +110,7 @@ private:
             const css::uno::Reference<
             css::ucb::XCommandEnvironment >& xEnv );
 
-    bool feedSink( css::uno::Reference< css::uno::XInterface> aSink,
+    bool feedSink( const css::uno::Reference< css::uno::XInterface>& aSink,
         const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
 
     bool exchangeIdentity(const css::uno::Reference< css::ucb::XContentIdentifier >&  xNewId);
diff --git a/xmlhelp/source/cxxhelp/inc/tvread.hxx b/xmlhelp/source/cxxhelp/inc/tvread.hxx
index 0b21e31..bb5868e 100644
--- a/xmlhelp/source/cxxhelp/inc/tvread.hxx
+++ b/xmlhelp/source/cxxhelp/inc/tvread.hxx
@@ -288,7 +288,7 @@ namespace treeview {
 
     private:
         static css::uno::Reference< css::deployment::XPackage > implGetHelpPackageFromPackage
-            ( const css::uno::Reference< css::deployment::XPackage > xPackage,
+            ( const css::uno::Reference< css::deployment::XPackage >& xPackage,
               css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
 
     protected:
@@ -300,7 +300,7 @@ namespace treeview {
             ( css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
 
         void implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
 
         osl::Mutex                                                                  m_aMutex;
         css::uno::Reference< css::uno::XComponentContext >    m_xContext;
@@ -339,7 +339,7 @@ namespace treeview {
     private:
         OUString expandURL( const OUString& aURL );
         OUString implGetTreeFileFromPackage( sal_Int32& rnFileSize,
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
 
     }; // end class TreeFileIterator
 
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 4f502d4..8c7fae0 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -86,7 +86,7 @@ OUString Databases::expandURL( const OUString& aURL )
     return aRetURL;
 }
 
-OUString Databases::expandURL( const OUString& aURL, Reference< uno::XComponentContext > xContext )
+OUString Databases::expandURL( const OUString& aURL, const Reference< uno::XComponentContext >& xContext )
 {
     static Reference< util::XMacroExpander > xMacroExpander;
     static Reference< uri::XUriReferenceFactory > xFac;
@@ -1176,7 +1176,7 @@ void ExtensionIteratorBase::init()
 }
 
 Reference< deployment::XPackage > ExtensionIteratorBase::implGetHelpPackageFromPackage
-    ( Reference< deployment::XPackage > xPackage, Reference< deployment::XPackage >& o_xParentPackageBundle )
+    ( const Reference< deployment::XPackage >& xPackage, Reference< deployment::XPackage >& o_xParentPackageBundle )
 {
     o_xParentPackageBundle.clear();
 
@@ -1325,7 +1325,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP
 }
 
 OUString ExtensionIteratorBase::implGetFileFromPackage(
-    const OUString& rFileExtension, Reference< deployment::XPackage > xPackage )
+    const OUString& rFileExtension, const Reference< deployment::XPackage >& xPackage )
 {
     // No extension -> search for pure language folder
     bool bLangFolderOnly = rFileExtension.isEmpty();
@@ -1362,7 +1362,7 @@ inline bool isLetter( sal_Unicode c )
 }
 
 void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
-    css::uno::Reference< css::deployment::XPackage > xPackage )
+    const css::uno::Reference< css::deployment::XPackage >& xPackage )
 {
     rv.clear();
     OUString aExtensionPath = xPackage->getURL();
@@ -1453,7 +1453,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( OUString* o_pExtensionPath, O
     return pRetHdf;
 }
 
-helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< deployment::XPackage > xPackage,
+helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( const Reference< deployment::XPackage >& xPackage,
             OUString* o_pExtensionPath, OUString* o_pExtensionRegistryPath )
 {
 
@@ -1574,7 +1574,7 @@ OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
 
 //Returns a file URL, that does not contain macros
 OUString KeyDataBaseFileIterator::implGetDbFileFromPackage
-    ( Reference< deployment::XPackage > xPackage )
+    ( const Reference< deployment::XPackage >& xPackage )
 {
     OUString aExpandedURL =
         implGetFileFromPackage( ".key", xPackage );
@@ -1643,7 +1643,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::nextJarFile
 }
 
 Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
-( Reference< deployment::XPackage > xPackage, OUString* o_pExtensionPath, OUString* o_pExtensionRegistryPath )
+( const Reference< deployment::XPackage >& xPackage, OUString* o_pExtensionPath, OUString* o_pExtensionRegistryPath )
 {
     Reference< XHierarchicalNameAccess > xNA;
 
@@ -1771,7 +1771,7 @@ OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o_rbTe
     return aIndexFolder;
 }
 
-OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary, Reference< deployment::XPackage > xPackage )
+OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary, const Reference< deployment::XPackage >& xPackage )
 {
     OUString aIndexFolder =
         implGetFileFromPackage( ".idxl", xPackage );
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 5b8626d..7976ccc 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -232,7 +232,7 @@ namespace chelp {
         OUString expandURL( const OUString& aURL );
 
         static OUString expandURL( const OUString& aURL,
-            css::uno::Reference< css::uno::XComponentContext > xContext );
+            const css::uno::Reference< css::uno::XComponentContext >& xContext );
 
     private:
 
@@ -337,7 +337,7 @@ namespace chelp {
 
     private:
         static css::uno::Reference< css::deployment::XPackage > implGetHelpPackageFromPackage
-            ( const css::uno::Reference< css::deployment::XPackage > xPackage,
+            ( const css::uno::Reference< css::deployment::XPackage >& xPackage,
               css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
 
     protected:
@@ -348,9 +348,9 @@ namespace chelp {
         css::uno::Reference< css::deployment::XPackage > implGetNextBundledHelpPackage
         ( css::uno::Reference< css::deployment::XPackage >& o_xParentPackageBundle );
         OUString implGetFileFromPackage( const OUString& rFileExtension,
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
         void implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
 
         css::uno::Reference< css::uno::XComponentContext >    m_xContext;
         css::uno::Reference< css::ucb::XSimpleFileAccess3 >   m_xSFA;
@@ -397,7 +397,7 @@ namespace chelp {
 
     private:
         helpdatafileproxy::Hdf* implGetHdfFromPackage(
-            css::uno::Reference< css::deployment::XPackage > xPackage,
+            const css::uno::Reference< css::deployment::XPackage >& xPackage,
             OUString* o_pExtensionPath, OUString* o_pExtensionRegistryPath );
 
         bool                                                                        m_bHelpText;
@@ -416,7 +416,7 @@ namespace chelp {
 
     private:
         OUString implGetDbFileFromPackage(
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
 
     }; // end class KeyDataBaseFileIterator
 
@@ -434,7 +434,7 @@ namespace chelp {
 
     private:
         css::uno::Reference< css::container::XHierarchicalNameAccess >
-            implGetJarFromPackage(css::uno::Reference< css::deployment::XPackage > xPackage,
+            implGetJarFromPackage(const css::uno::Reference< css::deployment::XPackage >& xPackage,
                 OUString* o_pExtensionPath = nullptr, OUString* o_pExtensionRegistryPath = nullptr );
 
     }; // end class JarFileIterator
@@ -451,7 +451,7 @@ namespace chelp {
 
     private:
         OUString implGetIndexFolderFromPackage( bool& o_rbTemporary,
-            css::uno::Reference< css::deployment::XPackage > xPackage );
+            const css::uno::Reference< css::deployment::XPackage >& xPackage );
 
     }; // end class KeyDataBaseFileIterator
 
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index beab519..3dffd29 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -895,7 +895,7 @@ void ExtensionIteratorBase::init()
 }
 
 Reference< deployment::XPackage > ExtensionIteratorBase::implGetHelpPackageFromPackage
-    ( Reference< deployment::XPackage > xPackage, Reference< deployment::XPackage >& o_xParentPackageBundle )
+    ( const Reference< deployment::XPackage >& xPackage, Reference< deployment::XPackage >& o_xParentPackageBundle )
 {
     o_xParentPackageBundle.clear();
 
@@ -1042,7 +1042,7 @@ inline bool isLetter( sal_Unicode c )
 }
 
 void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
-    css::uno::Reference< css::deployment::XPackage > xPackage )
+    const css::uno::Reference< css::deployment::XPackage >& xPackage )
 {
     rv.clear();
     OUString aExtensionPath = xPackage->getURL();
@@ -1156,7 +1156,7 @@ OUString TreeFileIterator::expandURL( const OUString& aURL )
 }
 
 OUString TreeFileIterator::implGetTreeFileFromPackage
-    ( sal_Int32& rnFileSize, Reference< deployment::XPackage > xPackage )
+    ( sal_Int32& rnFileSize, const Reference< deployment::XPackage >& xPackage )
 {
     OUString aRetFile;
     OUString aLanguage = m_aLanguage;
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index c0fbe5a..fa9e33f 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -133,7 +133,7 @@ private:
     DECL_LINK_TYPED(    CertSelectHdl, SvTreeListBox*, void );
     void                Clear();
     SvTreeListEntry*    InsertCert( SvTreeListEntry* _pParent, const OUString& _rName,
-                                    css::uno::Reference< css::security::XCertificate > rxCert,
+                                    const css::uno::Reference< css::security::XCertificate >& rxCert,
                                     bool bValid);
 
 public:
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 51c07d2..869d66b 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -182,15 +182,15 @@ public:
     /// Read and verify a single OOXML signature.
     bool ReadAndVerifySignatureStorageStream(const css::uno::Reference<css::io::XInputStream>& xInputStream);
     /// Adds or removes an OOXML digital signature relation to _rels/.rels if there wasn't any before.
-    void EnsureSignaturesRelation(css::uno::Reference<css::embed::XStorage> xStorage, bool bAdd);
+    void EnsureSignaturesRelation(const css::uno::Reference<css::embed::XStorage>& xStorage, bool bAdd);
     /// Given that xStorage is an OOXML _xmlsignatures storage, create origin.sigs and its relations.
-    void ExportSignatureRelations(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount);
+    void ExportSignatureRelations(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount);
     /// Given that xSignatureStorage is an OOXML _xmlsignatures storage, create and write a new signature.
-    bool CreateAndWriteOOXMLSignature(css::uno::Reference<css::embed::XStorage> xRootStorage, css::uno::Reference<css::embed::XStorage> xSignatureStorage, int nSignatureIndex);
+    bool CreateAndWriteOOXMLSignature(const css::uno::Reference<css::embed::XStorage>& xRootStorage, const css::uno::Reference<css::embed::XStorage>& xSignatureStorage, int nSignatureIndex);
     /// Similar to CreateAndWriteOOXMLSignature(), but used to write the signature to the persistent storage, not the temporary one.
-    void ExportOOXMLSignature(css::uno::Reference<css::embed::XStorage> xRootStorage, css::uno::Reference<css::embed::XStorage> xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex);
+    void ExportOOXMLSignature(const css::uno::Reference<css::embed::XStorage>& xRootStorage, const css::uno::Reference<css::embed::XStorage>& xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex);
     /// Given that xStorage is an OOXML root storage, advertise signatures in its [Content_Types].xml stream.
-    void ExportSignatureContentTypes(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount);
+    void ExportSignatureContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount);
 };
 
 #endif // INCLUDED_XMLSECURITY_INC_XMLSECURITY_XMLSIGNATUREHELPER_HXX
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 1fd3685..21584b8 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -461,7 +461,7 @@ void CertificateViewerCertPathTP::Clear()
 }
 
 SvTreeListEntry* CertificateViewerCertPathTP::InsertCert(
-    SvTreeListEntry* _pParent, const OUString& _rName, css::uno::Reference< css::security::XCertificate > rxCert,
+    SvTreeListEntry* _pParent, const OUString& _rName, const css::uno::Reference< css::security::XCertificate >& rxCert,
     bool bValid)
 {
     Image aImage = bValid ? maCertImage : maCertNotValidatedImage;
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 1a3effb2..e7e8e05 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -204,7 +204,7 @@ void XMLSignatureHelper::ExportSignature(
     XSecController::exportSignature(xDocumentHandler, signatureInfo);
 }
 
-void XMLSignatureHelper::ExportOOXMLSignature(uno::Reference<embed::XStorage> xRootStorage, uno::Reference<embed::XStorage> xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex)
+void XMLSignatureHelper::ExportOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, const SignatureInformation& rInformation, int nSignatureIndex)
 {
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
     uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY);
@@ -487,7 +487,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref
     return !mbError;
 }
 
-void XMLSignatureHelper::EnsureSignaturesRelation(css::uno::Reference<css::embed::XStorage> xStorage, bool bAdd)
+void XMLSignatureHelper::EnsureSignaturesRelation(const css::uno::Reference<css::embed::XStorage>& xStorage, bool bAdd)
 {
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
     uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode);
@@ -544,7 +544,7 @@ void XMLSignatureHelper::EnsureSignaturesRelation(css::uno::Reference<css::embed
     xTransact->commit();
 }
 
-void XMLSignatureHelper::ExportSignatureRelations(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount)
+void XMLSignatureHelper::ExportSignatureRelations(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount)
 {
     // Write the empty file, its relations will be the signatures.
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
@@ -570,7 +570,7 @@ void XMLSignatureHelper::ExportSignatureRelations(css::uno::Reference<css::embed
     xTransact->commit();
 }
 
-void XMLSignatureHelper::ExportSignatureContentTypes(css::uno::Reference<css::embed::XStorage> xStorage, int nSignatureCount)
+void XMLSignatureHelper::ExportSignatureContentTypes(const css::uno::Reference<css::embed::XStorage>& xStorage, int nSignatureCount)
 {
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
     uno::Reference<io::XStream> xStream(xStorage->openStreamElement("[Content_Types].xml", nOpenMode), uno::UNO_QUERY);
@@ -620,7 +620,7 @@ void XMLSignatureHelper::ExportSignatureContentTypes(css::uno::Reference<css::em
     uno::Reference<embed::XTransactedObject> xTransact(xStorage, uno::UNO_QUERY);
     xTransact->commit();
 }
-bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(uno::Reference<embed::XStorage> xRootStorage, uno::Reference<embed::XStorage> xSignatureStorage, int nSignatureIndex)
+bool XMLSignatureHelper::CreateAndWriteOOXMLSignature(const uno::Reference<embed::XStorage>& xRootStorage, const uno::Reference<embed::XStorage>& xSignatureStorage, int nSignatureIndex)
 {
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
     uno::Reference<io::XOutputStream> xOutputStream(xSignatureStorage->openStreamElement("sig" + OUString::number(nSignatureIndex) + ".xml", nOpenMode), uno::UNO_QUERY);
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
index 9fcf9ab..a850a83 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
@@ -46,7 +46,7 @@ ImplXMLSignatureListener::~ImplXMLSignatureListener()
 }
 
 void ImplXMLSignatureListener::setNextHandler(
-    uno::Reference< xml::sax::XDocumentHandler > xNextHandler)
+    const uno::Reference< xml::sax::XDocumentHandler >& xNextHandler)
 {
     m_xNextHandler = xNextHandler;
 }
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
index f8d3d5b..3207239 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
@@ -61,7 +61,7 @@ public:
                              const Link<LinkParamNone*, void>& rStartVerifySignatureElement);
     virtual ~ImplXMLSignatureListener();
 
-    void setNextHandler(css::uno::Reference< css::xml::sax::XDocumentHandler > xNextHandler);
+    void setNextHandler(const css::uno::Reference< css::xml::sax::XDocumentHandler >& xNextHandler);
 
     // css::xml::crypto::sax::XSignatureCreationResultListener
     virtual void SAL_CALL signatureCreated( sal_Int32 securityId, css::xml::crypto::SecurityOperationStatus creationResult )


More information about the Libreoffice-commits mailing list