summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun3.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-10 13:11:39 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-10 13:11:39 +0000
commit03fad0cafdbb345c79f4cf1d40bd71d6c69b042d (patch)
tree2ff88e3da69d556c53e7367572560f5f11e831fa /sc/source/ui/view/viewfun3.cxx
parentce35a335100232c028d320e50d7dfc2ebfbf5ad0 (diff)
INTEGRATION: CWS dr48 (1.31.174); FILE MERGED
2006/05/24 12:33:22 nn 1.31.174.1: #129384# keep a reference of clipboard object during PasteFromClip
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r--sc/source/ui/view/viewfun3.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index a5714c2a855c..65ff28e11900 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewfun3.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 23:13:06 $
+ * last change: $Author: obo $ $Date: 2006-07-10 14:11:39 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -417,9 +417,13 @@ void ScViewFunc::PasteFromSystem()
ScDrawTransferObj* pDrawClip = ScDrawTransferObj::GetOwnClipboard( pWin );
if (pOwnClip)
+ {
+ // #129384# keep a reference in case the clipboard is changed during PasteFromClip
+ uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
TRUE ); // allow warning dialog
+ }
else if (pDrawClip)
PasteDraw();
else
@@ -508,9 +512,13 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi )
Window* pWin = GetActiveWin();
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
if ( nFormatId == 0 && pOwnClip )
+ {
+ // #129384# keep a reference in case the clipboard is changed during PasteFromClip
+ uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip );
PasteFromClip( IDF_ALL, pOwnClip->GetDocument(),
PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
!bApi ); // allow warning dialog
+ }
else
{
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );