[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 13 12:56:33 UTC 2019


 vcl/source/treelist/transfer.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 9c40a13144cdbb31791ee3e2e7340461a2520af2
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Nov 12 14:46:11 2019 +0200
Commit:     Tor Lillqvist <tml at 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 <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at 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;


More information about the Libreoffice-commits mailing list