[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 13 13:15:47 UTC 2019


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

New commits:
commit ec08a6508eb7ac43579d69668685aa9211ce66a4
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 15:14:53 2019 +0200

    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
    (cherry picked from commit 9c40a13144cdbb31791ee3e2e7340461a2520af2)

diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 1f73b377e5a8..824af36710e0 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1237,7 +1237,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 ) )
                 {
@@ -1509,6 +1509,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