summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMuthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com>2014-10-10 22:58:00 +0530
committerAndras Timar <andras.timar@collabora.com>2014-11-23 14:32:30 +0100
commit07d8549c7b076d095cd1fc31e403a2ae327b00e3 (patch)
treececeffe949d6b31cb4a0f80fe34267f354c3c7e8 /svtools
parent359c4268d05a45a7afe6c97ef60ead6dc316d2bd (diff)
Enable copy-paste of charts/ole as bitmaps.
Cherry-picked from 6296c64fb0ed8bce61eb6303920f952eda65de71 Change-Id: I0e074da34ff1a11c223994dcf373bf60af7cd271 Reviewed-on: https://gerrit.libreoffice.org/11911 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/embedtransfer.cxx5
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 );