diff options
author | Rüdiger Timm <rt@openoffice.org> | 2009-01-29 10:50:15 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2009-01-29 10:50:15 +0000 |
commit | e6e8722c10e925c05c7eeea073a717f20c0ebdb2 (patch) | |
tree | fce4404b20fe88a4f5e3c268a71c38923b143a07 | |
parent | 660fc34c7c7bd5a3a485a8db2a34d7b216ed5ecd (diff) |
CWS-TOOLING: integrate CWS metropatch01_DEV300
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 9 |
4 files changed, 21 insertions, 15 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 895d7d175ab6..53f063db0e66 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -222,7 +222,16 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); aView.MarkAllObj(pPv); aSrcSize = aView.GetAllMarkedRect().GetSize(); + + if ( bOleObj ) // single OLE object + { + SdrOle2Obj* pObj = GetSingleObject(); + if ( pObj && pObj->GetObjRef().is() ) + SvEmbedTransferHelper::FillTransferableObjectDescriptor( aObjDesc, pObj->GetObjRef(), pObj->GetGraphic(), pObj->GetAspect() ); + } + aObjDesc.maSize = aSrcSize; + PrepareOLE( aObjDesc ); // // remember a unique ID of the source document @@ -408,13 +417,6 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF { if ( nFormat == SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR || nFormat == SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) { - if ( bOleObj ) // single OLE object - { - SdrOle2Obj* pObj = GetSingleObject(); - if ( pObj && pObj->GetObjRef().is() ) - SvEmbedTransferHelper::FillTransferableObjectDescriptor( aObjDesc, pObj->GetObjRef(), pObj->GetGraphic(), pObj->GetAspect() ); - } - bOK = SetTransferableObjectDescriptor( aObjDesc, rFlavor ); } else if ( nFormat == SOT_FORMATSTR_ID_DRAWING ) diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 308aa17eccd7..642612123a72 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -190,6 +190,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); aObjDesc.maSize = aMMRect.GetSize(); + PrepareOLE( aObjDesc ); } ScTransferObj::~ScTransferObj() diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 3a3fbeb85850..f49c83a1a21c 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -491,12 +491,9 @@ void ScViewFunc::PasteFromSystem() // If it's a Writer object, insert RTF instead of OLE BOOL bDoRtf = FALSE; - SotStorageStreamRef xStm; TransferableObjectDescriptor aObjDesc; - if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && - aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) ) + if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { - SotStorageRef xStore( new SotStorage( *xStm ) ); bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) || aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) ) && aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); @@ -599,12 +596,9 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran { // If it's a Writer object, insert RTF instead of OLE BOOL bDoRtf = FALSE; - SotStorageStreamRef xStm; TransferableObjectDescriptor aObjDesc; - if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && - aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) ) + if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { - SotStorageRef xStore( new SotStorage( *xStm ) ); bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) || aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) ) && aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 2c4890a5f861..f8b89a85e11c 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -193,12 +193,17 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, // try to get the replacement image from the clipboard Graphic aGraphic; ULONG nGrFormat = 0; +// (wg. Selection Manager bei Trustet Solaris) +#ifndef SOLARIS +/* if( aDataHelper.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) ) nGrFormat = SOT_FORMATSTR_ID_SVXB; else if( aDataHelper.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) ) nGrFormat = SOT_FORMAT_GDIMETAFILE; else if( aDataHelper.GetGraphic( FORMAT_BITMAP, aGraphic ) ) nGrFormat = SOT_FORMAT_BITMAP; +*/ +#endif // insert replacement image ( if there is one ) into the object helper if ( nGrFormat ) @@ -263,12 +268,16 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, // try to get the replacement image from the clipboard Graphic aGraphic; ULONG nGrFormat = 0; + +// (wg. Selection Manager bei Trustet Solaris) +#ifndef SOLARIS if( aDataHelper.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) ) nGrFormat = SOT_FORMATSTR_ID_SVXB; else if( aDataHelper.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) ) nGrFormat = SOT_FORMAT_GDIMETAFILE; else if( aDataHelper.GetGraphic( FORMAT_BITMAP, aGraphic ) ) nGrFormat = SOT_FORMAT_BITMAP; +#endif // insert replacement image ( if there is one ) into the object helper if ( nGrFormat ) |