diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-08 15:53:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-09 07:56:10 +0200 |
commit | 91fef4a47563451e0271784a14b471e4815729d1 (patch) | |
tree | 9d944312070e241978c6e1fd6a342b989c64395e /editeng/source/xml/xmltxtimp.cxx | |
parent | 66b1ebd4ddc7127a923bf81eb569e7f99dd52022 (diff) |
clang-tidy modernize-pass-by-value in editeng
Change-Id: Ibf912c597896a2ac0bf3ba8108f55c5018115bb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135501
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/xml/xmltxtimp.cxx')
-rw-r--r-- | editeng/source/xml/xmltxtimp.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 11807feae0f3..1122ea473b6f 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -21,6 +21,7 @@ #include <comphelper/processfactory.hxx> #include <unotools/streamwrap.hxx> #include <svl/itemprop.hxx> +#include <utility> #include <xmloff/xmlimp.hxx> #include <xmloff/xmlictxt.hxx> #include <xmloff/xmltoken.hxx> @@ -50,7 +51,7 @@ namespace { class SvxXMLTextImportContext : public SvXMLImportContext { public: - SvxXMLTextImportContext( SvXMLImport& rImport, const uno::Reference< XText >& xText ); + SvxXMLTextImportContext( SvXMLImport& rImport, uno::Reference< XText > xText ); virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, @@ -62,8 +63,8 @@ private: } -SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, const uno::Reference< XText >& xText ) -: SvXMLImportContext( rImport ), mxText( xText ) +SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, uno::Reference< XText > xText ) +: SvXMLImportContext( rImport ), mxText(std::move( xText )) { } @@ -93,7 +94,7 @@ class SvxXMLXTextImportComponent : public SvXMLImport public: SvxXMLXTextImportComponent( const css::uno::Reference< css::uno::XComponentContext >& rContext, - const uno::Reference< XText > & rText ); + uno::Reference< XText > xText ); virtual SvXMLImportContext* CreateFastContext(sal_Int32 nElement, const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& xAttrList ) override; @@ -120,9 +121,9 @@ SvXMLImportContext *SvxXMLXTextImportComponent::CreateFastContext( SvxXMLXTextImportComponent::SvxXMLXTextImportComponent( const css::uno::Reference< css::uno::XComponentContext >& xContext, - const uno::Reference< XText > & xText ) + uno::Reference< XText > xText ) : SvXMLImport(xContext, ""), - mxText( xText ) + mxText(std::move( xText )) { GetTextImport()->SetCursor( mxText->createTextCursor() ); SvXMLImport::setTargetDocument(new SvxSimpleUnoModel); |