[Libreoffice-bugs] [Bug 118140] FILEOPEN: DOCX: images incorrectly cropped

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu May 30 10:21:52 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=118140

Xisco FaulĂ­ <xiscofauli at libreoffice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|xiscofauli at libreoffice.org  |libreoffice-bugs at lists.free
                   |                            |desktop.org

--- Comment #7 from Xisco FaulĂ­ <xiscofauli at libreoffice.org> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190530/b26a56dc/attachment.html>


More information about the Libreoffice-bugs mailing list