diff options
author | Muthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com> | 2014-07-22 22:08:16 +0530 |
---|---|---|
committer | Muthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com> | 2014-07-22 22:08:16 +0530 |
commit | 6296c64fb0ed8bce61eb6303920f952eda65de71 (patch) | |
tree | 5ca169aa292926503389efec29fa536833560b1e /svtools/source | |
parent | 2662df924f7d5e2d65ec727be99e39c18e1e3e7b (diff) |
Enable copy-paste of charts/ole as bitmaps.
Adds FORMAT_BITMAP to OLE Objects - to allow charts
to be pasted into non-LibreOffice applications.
Should be safe for all OLE Objects, though.
Change-Id: If18768b82d4bb4415b3a8e00828b2eb5c31eeb15
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/misc/embedtransfer.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index 7792f84032b0..7c99085e3070 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -76,6 +76,7 @@ void SvEmbedTransferHelper::AddSupportedFormats() AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( FORMAT_GDIMETAFILE ); + AddFormat( FORMAT_BITMAP ); } @@ -169,6 +170,10 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo SetAny( aAny, rFlavor ); bRet = true; } + else if ( ( nFormat == FORMAT_BITMAP || nFormat == SOT_FORMATSTR_ID_PNG ) && m_pGraphic ) + { + bRet = SetBitmapEx( m_pGraphic->GetBitmapEx(), rFlavor ); + } else if ( m_xObj.is() && :: svt::EmbeddedObjectRef::TryRunningState( m_xObj ) ) { uno::Reference< datatransfer::XTransferable > xTransferable( m_xObj->getComponent(), uno::UNO_QUERY ); |