From 5962006370e818798099c75c21a392ee57e5b876 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Nov 2024 13:56:18 +0200 Subject: loplugin:reftotemp in dbaccess..editeng Change-Id: I51f5e47fb2fca37928ac58952a6a34b7351ca53c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176277 Reviewed-by: Noel Grandin Tested-by: Jenkins --- desktop/source/deployment/dp_persmap.cxx | 6 +++--- desktop/source/lib/init.cxx | 14 +++++++------- desktop/source/lib/lokinteractionhandler.cxx | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 948c8e857c72..9cc74b0c79a8 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -248,9 +248,9 @@ void PersistentMap::flush() OSL_ASSERT( o3tl::make_unsigned(nKeyLen) == nBytesWritten); m_MapFile.write( "\n", 1, nBytesWritten); // write line for value - const OString& rValString = encodeString( entry.second); - const sal_Int32 nValLen = rValString.getLength(); - m_MapFile.write( rValString.getStr(), nValLen, nBytesWritten); + const OString aValString = encodeString( entry.second); + const sal_Int32 nValLen = aValString.getLength(); + m_MapFile.write( aValString.getStr(), nValLen, nBytesWritten); OSL_ASSERT( o3tl::make_unsigned(nValLen) == nBytesWritten); m_MapFile.write( "\n", 1, nBytesWritten); } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9400a9bc6ce9..9913d021fdf7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -831,10 +831,10 @@ OUString lcl_getCurrentDocumentMimeType(const LibLODocument_Impl* pDocument) // Gets an undo manager to enter and exit undo context. Needed by ToggleOrientation css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::uno::Reference< css::frame::XFrame >& rxFrame ) { - const css::uno::Reference< css::frame::XController >& xController = rxFrame->getController(); + const css::uno::Reference< css::frame::XController > xController = rxFrame->getController(); if ( xController.is() ) { - const css::uno::Reference< css::frame::XModel >& xModel = xController->getModel(); + const css::uno::Reference< css::frame::XModel > xModel = xController->getModel(); if ( xModel.is() ) { const css::uno::Reference< css::document::XUndoManagerSupplier > xSuppUndo( xModel, css::uno::UNO_QUERY_THROW ); @@ -1880,7 +1880,7 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) case LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: case LOK_CALLBACK_A11Y_SELECTION_CHANGED: { - const auto& pos = std::find(m_queue1.rbegin(), m_queue1.rend(), type); + const auto pos = std::find(m_queue1.rbegin(), m_queue1.rend(), type); auto pos2 = toQueue2(pos); if (pos != m_queue1.rend() && pos2->getPayload() == aCallbackData.getPayload()) { @@ -1893,12 +1893,12 @@ void CallbackFlushHandler::queue(const int type, CallbackData& aCallbackData) if (type == LOK_CALLBACK_TEXT_SELECTION && aCallbackData.isEmpty()) { - const auto& posStart = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_START); + const auto posStart = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_START); auto posStart2 = toQueue2(posStart); if (posStart != m_queue1.rend()) posStart2->clear(); - const auto& posEnd = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_END); + const auto posEnd = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_TEXT_SELECTION_END); auto posEnd2 = toQueue2(posEnd); if (posEnd != m_queue1.rend()) posEnd2->clear(); @@ -2064,7 +2064,7 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(int type, CallbackData& a // If we have to invalidate all tiles, we can skip any new tile invalidation. // Find the last INVALIDATE_TILES entry, if any to see if it's invalidate-all. - const auto& pos + const auto pos = std::find(m_queue1.rbegin(), m_queue1.rend(), LOK_CALLBACK_INVALIDATE_TILES); if (pos != m_queue1.rend()) { @@ -2591,7 +2591,7 @@ bool CallbackFlushHandler::removeAll(int type, const std::functionsecond.clear(); diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index 0680a9dd97f1..2d1e7cb74cbb 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -410,16 +410,16 @@ bool LOKInteractionHandler::handleFilterOptionsRequest(const uno::Reference& xRequest) { - uno::Sequence> const &rContinuations = xRequest->getContinuations(); + uno::Sequence> const aContinuations = xRequest->getContinuations(); uno::Any const request(xRequest->getRequest()); - if (handleIOException(rContinuations, request)) + if (handleIOException(aContinuations, request)) return true; - if (handleNetworkException(rContinuations, request)) + if (handleNetworkException(aContinuations, request)) return true; - if (handlePasswordRequest(rContinuations, request)) + if (handlePasswordRequest(aContinuations, request)) return true; if (handleFilterOptionsRequest(xRequest)) @@ -435,7 +435,7 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( return true; // TODO: perform more interactions 'for real' like the above - selectApproved(rContinuations); + selectApproved(aContinuations); return true; } -- cgit