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
commit5a67da7d345f0b6e53eb6c019397d276abb054f5 (patch)
treec9d3a00edddc8065a643a81bcd2325f919b242d9
parent4a35cff65b7771880d361d41dbe8dc76cc08a306 (diff)
CWS-TOOLING: integrate CWS metropatch01_DEV300
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx25
1 files changed, 22 insertions, 3 deletions
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 756d2684db..b634fbe08b 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -287,6 +287,8 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_UNAMBIGUOUS );
}
+
+ PrepareOLE( aObjDesc );
}
}
@@ -835,7 +837,9 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty())
AddFormat( SOT_FORMATSTR_ID_SVXB );
+ PrepareOLE( aObjDesc );
AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+
// --> OD 2005-02-09 #119353# - robust
const Graphic* pGrf = pWrtShell->GetGraphic();
if( pGrf && pGrf->IsSupportedGraphic() )
@@ -856,7 +860,10 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
pWrtShell->Copy( pDoc );
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
+
+ PrepareOLE( aObjDesc );
AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+
AddFormat( FORMAT_GDIMETAFILE );
eBufferType = TRNSFR_OLE;
}
@@ -917,7 +924,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
//Wenn's einer braucht OLE'n wir ihm was.
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
- AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
//RTF vor das Metafile von OLE stellen, weil mit weniger verlusten
//behaftet.
@@ -979,6 +985,9 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ PrepareOLE( aObjDesc );
+ AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+
delete pWait;
}
else
@@ -1069,7 +1078,6 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
//Wenn's einer braucht OLE'n wir ihm was.
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
- AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
AddFormat( FORMAT_RTF );
AddFormat( SOT_FORMATSTR_ID_HTML );
AddFormat( FORMAT_STRING );
@@ -1081,6 +1089,9 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
+ PrepareOLE( aObjDesc );
+ AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+
SW_MOD()->pClipboard = this;
CopyToClipboard( &pWrtShell->GetView().GetEditWin() );
@@ -1871,12 +1882,18 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// try to get the replacement image from the clipboard
Graphic aGraphic;
ULONG nGrFormat = 0;
+
+// (wg. Selection Manager bei Trustet Solaris)
+#ifndef SOLARIS
+/*
if( rData.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) )
nGrFormat = SOT_FORMATSTR_ID_SVXB;
else if( rData.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) )
nGrFormat = SOT_FORMAT_GDIMETAFILE;
else if( rData.GetGraphic( FORMAT_BITMAP, aGraphic ) )
nGrFormat = SOT_FORMAT_BITMAP;
+*/
+#endif
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
@@ -3039,6 +3056,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
else if( nsSelectionType::SEL_OLE == nSelection )
{
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
+ PrepareOLE( aObjDesc );
AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
AddFormat( FORMAT_GDIMETAFILE );
eBufferType = TRNSFR_OLE;
@@ -3062,7 +3080,6 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
eBufferType = (TransferBufferType)(TRNSFR_TABELLE | eBufferType);
AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
- AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
//RTF vor das Metafile von OLE stellen, weil mit weniger verlusten
//behaftet.
@@ -3112,6 +3129,8 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
aObjDesc.maDragStartPos = rSttPos;
aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
MAP_TWIP, MAP_100TH_MM );
+ PrepareOLE( aObjDesc );
+ AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
}
else if( nSelection & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() )
{