summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 13:56:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 19:38:38 +0100
commit5962006370e818798099c75c21a392ee57e5b876 (patch)
tree7a296001bd52aca23d78e491fb2acc50692494ec /desktop/source
parentd79790da8a4de4758f46ae4a8573382c681af974 (diff)
loplugin:reftotemp in dbaccess..editeng
Change-Id: I51f5e47fb2fca37928ac58952a6a34b7351ca53c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176277 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/dp_persmap.cxx6
-rw-r--r--desktop/source/lib/init.cxx14
-rw-r--r--desktop/source/lib/lokinteractionhandler.cxx10
3 files changed, 15 insertions, 15 deletions
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::function<bool (const C
void CallbackFlushHandler::addViewStates(int viewId)
{
- const auto& result = m_viewStates.emplace(viewId, decltype(m_viewStates)::mapped_type());
+ const auto result = m_viewStates.emplace(viewId, decltype(m_viewStates)::mapped_type());
if (!result.second && result.first != m_viewStates.end())
{
result.first->second.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<task
sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest(
const uno::Reference<task::XInteractionRequest>& xRequest)
{
- uno::Sequence<uno::Reference<task::XInteractionContinuation>> const &rContinuations = xRequest->getContinuations();
+ uno::Sequence<uno::Reference<task::XInteractionContinuation>> 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;
}