diff options
author | jp <jp@openoffice.org> | 2001-08-16 06:51:28 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-08-16 06:51:28 +0000 |
commit | c2ada2f20ca6f34b188166017911e489c720bd32 (patch) | |
tree | 8beb9ad87a2a04a64ccadd617a839742e427e955 /sw/source/ui/dochdl | |
parent | 8fa3e96a44eb3438770c55d638d89476c9638905 (diff) |
Bug #90675#: remove unused resources, #89921#: handle also OLE-ObjectDescriptor
Diffstat (limited to 'sw/source/ui/dochdl')
-rw-r--r-- | sw/source/ui/dochdl/swdtflvr.cxx | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 3d00bbec5be2..ca6bae45dc7e 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: swdtflvr.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: hr $ $Date: 2001-08-15 10:17:27 $ + * last change: $Author: jp $ $Date: 2001-08-16 07:51:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1604,7 +1604,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData, xStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); #endif xStrm->Write( (void*)sData.GetBuffer(), - ( sData.Len() + 1 ) * sizeof( sal_Unicode )); + ULONG( sData.Len() + 1 ) * sizeof( sal_Unicode )); xStrm->Seek( 0 ); pStream = &xStrm; @@ -1732,25 +1732,18 @@ PASTEOLE_SETREADSW3: ( nFmt == nId ? xStore.Is() : ( xStore.Clear(), rData.GetSotStorageStream( nFmt, xStrm )) )) -#if SUPD>=641 || ( rData.GetTransferableObjectDescriptor( ( nFmt = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE), aObjDesc )) -#endif ) { SvInPlaceObjectRef xIPObj; -#if SUPD>=641 - if( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE == nFmtId ) + if( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE == nFmt ) { xStore = new SvStorage( aEmptyStr, STREAM_STD_READWRITE ); - xIPObj = ((SvFactory*)SvInPlaceObject::ClassFactory()) - ->CreateAndInit( rData.GetTransferable()/*&rObj*/, - xStore, - FALSE, /* Linking; irgendwann ??*/ - FALSE /*bStorFilled*/ ); + xIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory()) + ->CreateAndInit( rData.GetTransferable(), xStore); } else -#endif { if( !xStore.Is() ) xStore = new SvStorage( *xStrm ); @@ -2764,22 +2757,10 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, for( USHORT* pIds = aIds; *pIds; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) - { - String sStr; - switch( *pIds ) - { - case FORMAT_STRING: sStr = SW_RES( STR_TEXTFORMAT ); break; - case FORMAT_RTF: sStr = SW_RES( STR_RTFFORMAT ); break; - } - pDlg->Insert( *pIds, sStr ); - } + pDlg->Insert( *pIds, aEmptyStr ); ULONG nFormat = pDlg->Execute( &rSh.GetView().GetEditWin(), aFormats, - aDesc -#if SUPD>=641 - , rData -#endif - ); + aDesc, rData ); if( nFormat ) nRet = SwTransferable::PasteFormat( rSh, rData, nFormat ); @@ -2851,15 +2832,7 @@ void SwTransferable::FillClipFmtItem( SwWrtShell& rSh, for( USHORT* pIds = aIds; *pIds; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) - { - String sStr; - switch( *pIds ) - { - case FORMAT_STRING: sStr = SW_RES( STR_TEXTFORMAT ); break; - case FORMAT_RTF: sStr = SW_RES( STR_RTFFORMAT ); break; - } - rToFill.AddClipbrdFormat( *pIds, sStr ); - } + rToFill.AddClipbrdFormat( *pIds, aEmptyStr ); } void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) |