From 24865e2d57a32aab7212b1a283f9b30215900dda Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu, 11 Aug 2022 11:04:01 +0200
Subject: clang-tidy modernize-pass-by-value in sw

Change-Id: I9a3b33595e34a264baeede33672a0c090ae85157
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138134
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 sw/source/ui/vba/vbaparagraph.cxx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'sw/source/ui/vba/vbaparagraph.cxx')

diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx
index 28cd264c1bc4..19a312795910 100644
--- a/sw/source/ui/vba/vbaparagraph.cxx
+++ b/sw/source/ui/vba/vbaparagraph.cxx
@@ -20,12 +20,13 @@
 #include "vbarange.hxx"
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/implbase.hxx>
+#include <utility>
 
 using namespace ::ooo::vba;
 using namespace ::com::sun::star;
 
-SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& xDocument, const uno::Reference< text::XTextRange >& xTextRange ) :
-    SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument( xDocument ), mxTextRange( xTextRange )
+SwVbaParagraph::SwVbaParagraph( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< text::XTextDocument >  xDocument, uno::Reference< text::XTextRange >  xTextRange ) :
+    SwVbaParagraph_BASE( rParent, rContext ), mxTextDocument(std::move( xDocument )), mxTextRange(std::move( xTextRange ))
 {
 }
 
@@ -86,7 +87,7 @@ private:
 
 public:
     /// @throws uno::RuntimeException
-    explicit ParagraphCollectionHelper( const uno::Reference< text::XTextDocument >& xDocument ): mxTextDocument( xDocument )
+    explicit ParagraphCollectionHelper( uno::Reference< text::XTextDocument > xDocument ): mxTextDocument(std::move( xDocument ))
     {
     }
     // XElementAccess
-- 
cgit