summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r--sc/source/ui/view/cellsh1.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ce3fe707a663..c4a580f9be4c 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1335,15 +1335,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
vcl::Window* pWin = GetViewData()->GetActiveWin();
ScDocument* pDoc = GetViewData()->GetDocument();
bool bOtherDoc = !pDoc->IsClipboardSource();
- ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
+ // keep a reference in case the clipboard is changed during dialog or PasteFromClip
+ rtl::Reference<ScTransferObj> pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( pOwnClip )
{
bool bSkipEmpty = false;
bool bTranspose = false;
bool bAsLink = false;
- // keep a reference in case the clipboard is changed during dialog or PasteFromClip
- uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
if ( pReqArgs!=nullptr && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;