summaryrefslogtreecommitdiff
path: root/svtools/source/misc/transfer.cxx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-05-23 10:30:51 +0000
committerFrank Schönheit <fs@openoffice.org>2002-05-23 10:30:51 +0000
commit180704f4bbf62c0b0850f082c1238b2e5f25970a (patch)
tree69575cf1f3333669bdd7d30bdd2b18e7ecc7c71d /svtools/source/misc/transfer.cxx
parentc0801fda6251e6402a5b922a4bf8bc13b6e16757 (diff)
#99030# ensure that the clipboard is set when creating from clipboard or assigning
Diffstat (limited to 'svtools/source/misc/transfer.cxx')
-rw-r--r--svtools/source/misc/transfer.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 2df78387e13a..2962417fa017 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: transfer.cxx,v $
*
- * $Revision: 1.55 $
+ * $Revision: 1.56 $
*
- * last change: $Author: fs $ $Date: 2002-05-16 15:21:00 $
+ * last change: $Author: fs $ $Date: 2002-05-23 11:30:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1120,8 +1120,15 @@ TransferableDataHelper::TransferableDataHelper( const TransferableDataHelper& rD
TransferableDataHelper& TransferableDataHelper::operator=( const TransferableDataHelper& rDataHelper )
{
- mxTransfer = rDataHelper.mxTransfer;
- delete mpFormats, mpFormats = new DataFlavorExVector( *rDataHelper.mpFormats );
+ if ( this != &rDataHelper )
+ {
+ mxTransfer = rDataHelper.mxTransfer;
+ delete mpFormats, mpFormats = new DataFlavorExVector( *rDataHelper.mpFormats );
+
+ mxClipboard = rDataHelper.mxClipboard;
+ if( mpClipboardListener )
+ StopClipboardListening();
+ }
return *this;
}
@@ -1896,7 +1903,11 @@ TransferableDataHelper TransferableDataHelper::CreateFromSystemClipboard( Window
Reference< XTransferable > xTransferable( xClipboard->getContents() );
if( xTransferable.is() )
+ {
aRet = TransferableDataHelper( xTransferable );
+ aRet.mxClipboard = xClipboard;
+ // also copy the clipboard - 99030 - 23.05.2002 - fs@openoffice.org
+ }
}
catch( const ::com::sun::star::uno::Exception& )
{