From 389da66dfc96d06c407bff156c4ea21e940c5e06 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 May 2017 15:40:42 +0200 Subject: remove unused uno::Reference vars found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/undo/undoblk.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sc/source/ui/undo/undoblk.cxx') diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 1141e75655b7..291151d11a6d 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1080,11 +1080,10 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget) if (dynamic_cast( &rTarget) != nullptr) { ScTabViewShell* pViewSh = static_cast(rTarget).GetViewShell(); - ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pViewSh->GetActiveWin() ); + // keep a reference in case the clipboard is changed during PasteFromClip + rtl::Reference pOwnClip = ScTransferObj::GetOwnClipboard( pViewSh->GetActiveWin() ); if (pOwnClip) { - // keep a reference in case the clipboard is changed during PasteFromClip - css::uno::Reference aOwnClipRef( pOwnClip ); pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(), aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose, aPasteOptions.bAsLink, aPasteOptions.eMoveMode, InsertDeleteFlags::NONE, -- cgit