From 8b8b1db5bcca9f6ecb1466cb4e5781c13d1e60bb Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Sun, 6 May 2018 22:40:05 -0400 Subject: tdf#117228: crash in SfxItemSet::GetItemState... (unsigned short, bool, SfxPoolItem const**) when pasting comment of closed document Re-work commit 1b7a8277aa3e9f73ccdf15e933a1ee3b42849a44. In the tiled rendering case, each view has its own clipboard, but not in desktop version which it has a shared clipboard each view. Change-Id: I57b1ab81e4c141829dbad899330e5c22204c384a Reviewed-on: https://gerrit.libreoffice.org/53922 Tested-by: Jenkins Reviewed-by: Eike Rathke Reviewed-on: https://gerrit.libreoffice.org/59623 Reviewed-by: Andras Timar Tested-by: Andras Timar --- sc/source/ui/undo/undoblk.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 a59b5d5c4177..1358d1b1f305 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1131,7 +1131,7 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget) { ScTabViewShell* pViewSh = static_cast(rTarget).GetViewShell(); // keep a reference in case the clipboard is changed during PasteFromClip - rtl::Reference pOwnClip = ScTransferObj::GetOwnClipboard( pViewSh->GetActiveWin() ); + const ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard(pViewSh->GetClipData()); if (pOwnClip) { pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(), -- cgit