From c4aa95310d98a7f92ae799ead76c8b25ffca53b3 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Tue, 9 Apr 2024 15:28:00 +0200 Subject: tdf#160267 Fix SVG and add PNG format from the clipboard Since 6c04b8356c0764ba8ac51448eee5ff577b08d9e2 SVG was added to the supported clipboard formats but it did not work. SVG support is now fixed and PNG format is added in the gallery. Change-Id: Ic9cb2eebfc37bd38605dfaa3a1c353a7532af357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165908 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- svx/source/gallery2/galmisc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'svx/source/gallery2') diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 6e80276c3aa6..cda1c9af2c71 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -489,7 +489,8 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons { bRet = SetGDIMetaFile( mpGraphicObject->GetGraphic().GetGDIMetaFile() ); } - else if( ( SotClipboardFormatId::BITMAP == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::BITMAP == nFormat || SotClipboardFormatId::PNG == nFormat) + && mpGraphicObject ) { bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor ); } -- cgit