diff options
author | Tor Lillqvist <tml@collabora.com> | 2019-11-12 14:46:11 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2019-11-13 13:55:45 +0100 |
commit | 9c40a13144cdbb31791ee3e2e7340461a2520af2 (patch) | |
tree | b91a906873463727a829b154a0e9fa8e5488a5e4 | |
parent | 8a2e3c687248f5de979fa8020e1f925e7ae28cb7 (diff) |
tdf#128465: Enable pasting also JPEG images in presentation documents
Change-Id: I0f3254ad536c26c975452f800a464f5498e66a78
Reviewed-on: https://gerrit.libreoffice.org/82507
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/82587
Tested-by: Jenkins
-rw-r--r-- | vcl/source/treelist/transfer.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 2afa7d4950a1..38611e2c200a 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -1253,7 +1253,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor rDataFlavorExVector.push_back( aFlavorEx ); // add additional formats for special mime types - if(SotClipboardFormatId::BMP == aFlavorEx.mnSotId || SotClipboardFormatId::PNG == aFlavorEx.mnSotId) + if(SotClipboardFormatId::BMP == aFlavorEx.mnSotId || SotClipboardFormatId::PNG == aFlavorEx.mnSotId || SotClipboardFormatId::JPEG == aFlavorEx.mnSotId) { if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavorEx ) ) { @@ -1525,6 +1525,15 @@ bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx return true; } } + + // then JPEG + if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::JPEG, aFlavor)) + { + if(GetBitmapEx(aFlavor, rBmpEx)) + { + return true; + } + } } DataFlavor aFlavor; |