svgio/inc/svgcharacternode.hxx              |    2 +-
 svgio/inc/svgdocument.hxx                   |    2 +-
 svgio/source/svgreader/svgcharacternode.cxx |    5 +++--
 svgio/source/svgreader/svgdocument.cxx      |    5 +++--
 svgio/source/svguno/xsvgparser.cxx          |    7 ++++---
 5 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 448ca8c2729b5a0194906e9c9dae95504d5212b9
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jun 27 09:48:33 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jun 27 16:06:51 2022 +0200

    clang-tidy modernize-pass-by-value in svgio
    
    Change-Id: I48283b202a0d5b9560a587daa4ebbf86367875ff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136453
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svgio/inc/svgcharacternode.hxx b/svgio/inc/svgcharacternode.hxx
index e5c520d69e22..b7a0a9a254c9 100644
--- a/svgio/inc/svgcharacternode.hxx
+++ b/svgio/inc/svgcharacternode.hxx
@@ -135,7 +135,7 @@ namespace svgio::svgreader
             SvgCharacterNode(
                 SvgDocument& rDocument,
                 SvgNode* pParent,
-                const OUString& rText);
+                OUString aText);
             virtual ~SvgCharacterNode() override;
 
             virtual const SvgStyleAttributes* getSvgStyleAttributes() const 
override;
diff --git a/svgio/inc/svgdocument.hxx b/svgio/inc/svgdocument.hxx
index ef7817284bee..9f79342c0c55 100644
--- a/svgio/inc/svgdocument.hxx
+++ b/svgio/inc/svgdocument.hxx
@@ -46,7 +46,7 @@ namespace svgio::svgreader
             IdStyleTokenMapper      maIdStyleTokenMapperList;
 
         public:
-            explicit SvgDocument(const OUString& rAbsolutePath);
+            explicit SvgDocument(OUString aAbsolutePath);
             ~SvgDocument();
 
             SvgDocument(const SvgDocument&) = delete;
diff --git a/svgio/source/svgreader/svgcharacternode.cxx 
b/svgio/source/svgreader/svgcharacternode.cxx
index bdd0c4f3471b..3efda44ee4a9 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -24,6 +24,7 @@
 #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
 #include <drawinglayer/primitive2d/textbreakuphelper.hxx>
 #include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
+#include <utility>
 #include <osl/diagnose.h>
 
 using namespace drawinglayer::primitive2d;
@@ -183,9 +184,9 @@ namespace svgio::svgreader
         SvgCharacterNode::SvgCharacterNode(
             SvgDocument& rDocument,
             SvgNode* pParent,
-            const OUString& rText)
+            OUString aText)
         :   SvgNode(SVGToken::Character, rDocument, pParent),
-            maText(rText)
+            maText(std::move(aText))
         {
         }
 
diff --git a/svgio/source/svgreader/svgdocument.cxx 
b/svgio/source/svgreader/svgdocument.cxx
index 2b1d534ffd72..69066c96f8b5 100644
--- a/svgio/source/svgreader/svgdocument.cxx
+++ b/svgio/source/svgreader/svgdocument.cxx
@@ -18,11 +18,12 @@
  */
 
 #include <svgdocument.hxx>
+#include <utility>
 
 namespace svgio::svgreader
 {
-        SvgDocument::SvgDocument(const OUString& rAbsolutePath)
-        : maAbsolutePath(rAbsolutePath)
+        SvgDocument::SvgDocument(OUString aAbsolutePath)
+        : maAbsolutePath(std::move(aAbsolutePath))
         {
         }
 
diff --git a/svgio/source/svguno/xsvgparser.cxx 
b/svgio/source/svguno/xsvgparser.cxx
index 32db2bc773f1..b0acf58d0e87 100644
--- a/svgio/source/svguno/xsvgparser.cxx
+++ b/svgio/source/svguno/xsvgparser.cxx
@@ -32,6 +32,7 @@
 #include <rtl/ref.hxx>
 
 #include <svgvisitor.hxx>
+#include <utility>
 
 using namespace ::com::sun::star;
 
@@ -49,7 +50,7 @@ namespace svgio::svgreader
                              uno::Reference<xml::sax::XDocumentHandler> const 
& xSvgDocHdl);
         public:
             explicit XSvgParser(
-                uno::Reference< uno::XComponentContext > const & context);
+                uno::Reference< uno::XComponentContext > context);
             XSvgParser(const XSvgParser&) = delete;
             XSvgParser& operator=(const XSvgParser&) = delete;
 
@@ -71,8 +72,8 @@ namespace svgio::svgreader
         }
 
         XSvgParser::XSvgParser(
-            uno::Reference< uno::XComponentContext > const & context):
-            context_(context)
+            uno::Reference< uno::XComponentContext > context):
+            context_(std::move(context))
         {
         }
 

Reply via email to