This is an automated email from the ASF dual-hosted git repository. damjan pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push: new 8809675e41 Allow pasting SVG graphics into OpenOffice. 8809675e41 is described below commit 8809675e418555082e24d8d46f876db1e912250e Author: Damjan Jovanovic <dam...@apache.org> AuthorDate: Fri Feb 23 20:46:47 2024 +0200 Allow pasting SVG graphics into OpenOffice. Patch by: me (cherry picked from commit dbea4404ca2c86a3a74294e262e6584c3e450818) --- main/svtools/source/misc/transfer.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main/svtools/source/misc/transfer.cxx b/main/svtools/source/misc/transfer.cxx index 5f83b0527b..e10123880e 100644 --- a/main/svtools/source/misc/transfer.cxx +++ b/main/svtools/source/misc/transfer.cxx @@ -1970,6 +1970,20 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM } } + if( !bRet && + HasFormat( SOT_FORMATSTR_ID_SVG ) && + SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_SVG, aSubstFlavor ) && + GetSotStorageStream( aSubstFlavor, xStm ) ) + { + Graphic aGraphic; + + if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE ) + { + rMtf = aGraphic.GetGDIMetaFile(); + bRet = sal_True; + } + } + return bRet; }