diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2010-11-18 18:14:38 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@hemulen.(none)> | 2010-11-18 18:18:03 +0200 |
commit | 27d40392c0164cd616c621b3500adac237a23ca2 (patch) | |
tree | 1fa2416037e02d2888fd143dd9f7624a43180e57 | |
parent | 88fb06d76f75c2b907d3ed024dec53cf11a382e0 (diff) |
Add workaround to avoid pasting data from OOo Calc as an OLE object
Help for fdo#31077.
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index e37425239..69d608d4a 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -680,6 +680,10 @@ void ScViewFunc::PasteFromSystem() { // If it's a Writer object, insert RTF instead of OLE + // Else, if the class id is all-zero, and SYLK is available, + // it probably is spreadsheet cells that have been put + // on the clipboard by OOo, so use the SYLK. (fdo#31077) + BOOL bDoRtf = FALSE; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) @@ -690,6 +694,9 @@ void ScViewFunc::PasteFromSystem() } if ( bDoRtf ) PasteFromSystem( FORMAT_RTF ); + else if ( aObjDesc.maClassName == SvGlobalName( 0,0,0,0,0,0,0,0,0,0,0 ) + && aDataHelper.HasFormat( SOT_FORMATSTR_ID_SYLK )) + PasteFromSystem( SOT_FORMATSTR_ID_SYLK ); else PasteFromSystem( SOT_FORMATSTR_ID_EMBED_SOURCE ); } |