Created attachment 142701 [details] comparison MSO 2010 and LibreOffice 6.2 Steps to reproduce: 1. Open attachment 82686 [details] from bug 67087 Observed behaviour -> Both images on page 1 and 2 are smaller than they should be. Check attached screenshot. Reproduced in Version: 6.2.0.0.alpha0+ Build ID: 4c6e11886a9d396bf7be18e9e3209a73c6e303ad CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded [Bug found by office-interoperability-tools]
Regression introduced by: author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2018-05-11 00:22:06 +0900 committer Tomaž Vajngerl <quikee@gmail.com> 2018-05-12 10:07:09 +0200 commit 8484e52675052848d2d3ffe07378ce2ad29fd288 (patch) tree 61745cc72ae36c6a04572021e6ccac1638a12c35 parent 3e2fdcf48055572dd0f6bb7d73b14c1832622f24 (diff) tdf#117427 missing API for determining and loading linked graphic This adds 2 properties to GraphicDescriptor: "Linked" - to indicate if the graphic is a linked one "OriginURL" - the URL of the location from where the graphic was or will be loaded (and is linked to) Additionally GraphicProvider was extended with a "LoadAsLink" (media)property, which can be passed using queryGraphic method. If "LoadAsLink" is set to true, then the Graphic will be created as a linked one. In addition the tests for this API was added to VCL (home of this API implementors). Bisected with: bibisect-linux64-6.1 Adding Cc: to Tomaž Vajngerl
*** Bug 120508 has been marked as a duplicate of this bug. ***
@Miklos, I thought you could be interested in this issue...
attachment 151401 [details] from bug 125281 is also affected
*** Bug 118036 has been marked as a duplicate of this bug. ***
I think I have a fix for this issue based on miklos' commit: https://gerrit.libreoffice.org/plugins/gitiles/core/+/69b62cfcbd364d7f62142149c2f690104b217ca1%5E%21 Tomorrow I'll submit it to gerrit along with a unittest :D
I tried to fix it in a similar way to bug 125281 diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 95292ee13186..3ed73c6cf0bb 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -408,6 +408,11 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co if (bLazyRead) { Graphic aGraphic = rFilter.ImportUnloadedGraphic(*pIStm); + Size aPrefSize; + aPrefSize.setWidth ( nExtWidth ); + aPrefSize.setHeight ( nExtHeight ); + // Size available in metafile header, set that here. + aGraphic.SetPrefSize(aPrefSize); if (!aGraphic.IsNone()) aVCLGraphic = aGraphic; } but then testImageLazyRead fails, so I don't really know how to fix it... @Miklos, feel free to take it, I guess you can fix it in 2 minutes
No longer reproducible in Version: 6.4.0.0.alpha1+ Build ID: de4839e66d3d195315729b95cc144cdab96b6e74 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded nor in Versión: 6.3.3.1 (x86) Id. de compilación: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99 Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; Configuración regional: es-ES (es_ES); Idioma de IU: es-ES Calc: threaded Issued fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=6369cab9b1e16275c8700692bb717aec3c42d346 @Luke Deller, Thanks for fixing this issue!