summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-10-06 09:39:41 +0000
committerKurt Zenker <kz@openoffice.org>2006-10-06 09:39:41 +0000
commit3005d6a0a885a58780d24bbe76ad69d096d02816 (patch)
treee955b8cb974db36aead6b56194b9060e3366a5ec
parent921af70668492e51537804a935ecd43b647ae3c6 (diff)
INTEGRATION: CWS fwk46 (1.49.18); FILE MERGED
2006/08/28 12:02:17 mav 1.49.18.1: #i57728# get correct replacement
-rw-r--r--sd/source/ui/app/sdxfer.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 285ca1672b2b..73a8a09b4ae5 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sdxfer.cxx,v $
*
- * $Revision: 1.50 $
+ * $Revision: 1.51 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 18:32:35 $
+ * last change: $Author: kz $ $Date: 2006-10-06 10:39:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -268,7 +268,12 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
uno::Reference < embed::XEmbeddedObject > xObj = static_cast< SdrOle2Obj* >( pObj )->GetObjRef();
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
if( xObj.is() && xPersist.is() && xPersist->hasEntry() )
+ {
pOLEDataHelper = new TransferableDataHelper( new SvEmbedTransferHelper( xObj ) );
+ Graphic* pObjGr = static_cast< SdrOle2Obj* >( pObj )->GetGraphic();
+ if ( pObjGr )
+ pGraphic = new Graphic( *pObjGr );
+ }
}
catch( uno::Exception& )
{}
@@ -535,7 +540,11 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
pSdDrawDocumentIntern->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_PURGE );
}
- bOK = SetAny( pOLEDataHelper->GetAny( rFlavor ), rFlavor );
+ // TODO/LATER: support all the graphical formats, the embedded object scenario should not have separated handling
+ if( nFormat == FORMAT_GDIMETAFILE && pGraphic )
+ bOK = SetGDIMetaFile( pGraphic->GetGDIMetaFile(), rFlavor );
+ else
+ bOK = SetAny( pOLEDataHelper->GetAny( rFlavor ), rFlavor );
if( pSdDrawDocumentIntern )
pSdDrawDocumentIntern->SetSwapGraphicsMode( nOldSwapMode );