vcl/source/treelist/transfer.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit 9c40a13144cdbb31791ee3e2e7340461a2520af2 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Nov 12 14:46:11 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Wed Nov 13 13:55:45 2019 +0100 tdf#128465: Enable pasting also JPEG images in presentation documents Change-Id: I0f3254ad536c26c975452f800a464f5498e66a78 Reviewed-on: https://gerrit.libreoffice.org/82507 Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82587 Tested-by: Jenkins 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits