Commits

Anonymous committed f4d674e

os151: #i98753# - method <SwTransferable::PrepareForCopy(..)> - set size of embedded object at the object description structure

  • Participants
  • Parent commits 9275efc

Comments (0)

Files changed (1)

sw/source/ui/dochdl/swdtflvr.cxx

 
 #define DDE_TXT_ENCODING 	gsl_getSystemTextEncoding()
 
-//---------------------------------------------
-// this struct conforms to the Microsoft
-// OBJECTDESCRIPTOR -> see oleidl.h
-// (MS platform sdk)
-//---------------------------------------------
-
-struct OleObjectDescriptor
-{
-        sal_uInt32      cbSize;
-        ClsId           clsid;
-        sal_uInt32      dwDrawAspect;
-        Size            sizel;
-        Point           pointl;
-        sal_uInt32      dwStatus;
-        sal_uInt32      dwFullUserTypeName;
-        sal_uInt32      dwSrcOfCopy;
-};
-
 class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
 {
 	String sName;
 	}
 	else if ( nSelection == nsSelectionType::SEL_OLE )
 	{
-		pClpDocFac = new SwDocFac;
+        pClpDocFac = new SwDocFac;
         SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
 		aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED);
 		aDocShellRef->DoInitNew( NULL );
 
 		AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 
+        // --> OD #i98753#
+        // set size of embedded object at the object description structure
+        aObjDesc.maSize = OutputDevice::LogicToLogic( pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM );
+        // <--
         PrepareOLE( aObjDesc );
 		AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );