summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2009-01-29 10:50:15 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2009-01-29 10:50:15 +0000
commit39c33b91931f789899c7b0a3c616eb330c65a7ae (patch)
tree6eb8684f1d67536553ab6ac198f7b2f741fb4c1b
parente6d6b4e91742d189ce523390dbf942a5aebcdee3 (diff)
CWS-TOOLING: integrate CWS metropatch01_DEV300
-rw-r--r--sc/source/ui/app/drwtrans.cxx16
-rw-r--r--sc/source/ui/app/transobj.cxx1
-rw-r--r--sc/source/ui/view/viewfun3.cxx10
-rw-r--r--sc/source/ui/view/viewfun5.cxx17
4 files changed, 25 insertions, 19 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 8d32c2d82..4c63c2746 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 8eb7cf147..e27616dfd 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 06edafa01..648524006 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 62f6e0638..e37e9d44b 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -193,13 +193,18 @@ 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 )
{
@@ -242,12 +247,12 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.MSOLEObjectSystemCreator") ) ),
uno::UNO_QUERY_THROW );
-
+
embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard(
xTmpStor,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "DummyName" ) ),
uno::Sequence< beans::PropertyValue >() );
-
+
// TODO/LATER: in future InsertedObjectInfo will be used to get container related information
// for example whether the object should be an iconified one
xObj = aInfo.Object;
@@ -263,13 +268,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 )
{