[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sc/source
Tor Lillqvist
tml at kemper.freedesktop.org
Thu Nov 18 08:27:12 PST 2010
sc/source/ui/view/viewfun3.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 27d40392c0164cd616c621b3500adac237a23ca2
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Thu Nov 18 18:14:38 2010 +0200
Add workaround to avoid pasting data from OOo Calc as an OLE object
Help for fdo#31077.
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index e374252..69d608d 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 );
}
More information about the Libreoffice-commits
mailing list