[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - svtools/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 09:54:55 UTC 2019
svtools/source/misc/transfer.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 6940a2c2892bff35a772d69623b84144fea16dc2
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 10:54:17 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>
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 888626d3ceb0..5403b2d0e9b0 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/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 ) )
{
@@ -1544,6 +1544,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