From 767092fe2cab4a8b28426a6b2b1c752277fc7df6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 21 Oct 2022 11:58:39 +0200 Subject: loplugin:referencecasting look for a new pattern Change-Id: Ib7ded8db2c513909159f0876389f63b60082a529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141618 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/ucbhelper/tempfile.cxx | 4 ++-- unotools/source/ucbhelper/xtempfile.cxx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'unotools') diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 09e3eda62e22..f55c421a0291 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -741,12 +741,12 @@ sal_Int64 SAL_CALL TempFileFastService::getLength() css::uno::Reference< css::io::XInputStream > SAL_CALL TempFileFastService::getInputStream() { - return css::uno::Reference< css::io::XInputStream >( *this, css::uno::UNO_QUERY ); + return this; } css::uno::Reference< css::io::XOutputStream > SAL_CALL TempFileFastService::getOutputStream() { - return css::uno::Reference< css::io::XOutputStream >( this ); + return this; } // XTruncate diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index a5772d8ba0c7..1515bc05f3e9 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -290,14 +290,14 @@ sal_Int64 SAL_CALL OTempFileService::getLength( ) // XStream css::uno::Reference< css::io::XInputStream > SAL_CALL OTempFileService::getInputStream() - { - return css::uno::Reference< css::io::XInputStream >( *this, css::uno::UNO_QUERY ); +{ + return this; } css::uno::Reference< css::io::XOutputStream > SAL_CALL OTempFileService::getOutputStream() - { - return css::uno::Reference< css::io::XOutputStream >( *this, css::uno::UNO_QUERY ); - } +{ + return this; +} // XTruncate -- cgit