+++ This bug was initially created as a clone of Bug #168884 +++ Steps: 1) Insert Example EMF from attachment 203351 [details] into LO (Writer, Impress, Calc). Result: The image is cropped. Expected: Pasted bar-chat-image should be in the same proportions as original view inserted directly from Origin software from the attachment 203355 [details] (tdf#168884_Bar_plot_with_Labels.opju). Version: 25.8.2.2 (X86_64) Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded Version: 25.8.1.1 (X86_64) Build ID: 54047653041915e595ad4e45cccea684809c77b5 CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: pl-PL Calc: CL threaded Version: 24.2.7.2 (X86_64) / LibreOffice Community Build ID: ee3885777aa7032db5a9b65deec9457448a91162 CPU threads: 16; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded
Created attachment 203360 [details] Image comparison
The same in: Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: d60ff8c8bd4e3ebf8f84f53448ead3c838332ea9 CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded
Created attachment 203371 [details] 'Original good image' (extracted from MS Word saved *.docx.zip) While attachment 203351 [details]: Example EMF from the Bug 168884 was made by (Writer): 1) Copy Graph as Image (in Origin Pro) 2) Paste into Writer 3) Save as DOCX 4) Extract from *.docx.zip This was made by (MS Word): 1) Copy Graph as Image (in Origin Pro) 2) Paste into MS Word 3) Save as DOCX 4) Extract from *.docx.zip As a result, there is about twice as much EMR records in MS Word saved EMF-image. Compared by: 1) EMFParser https://download.cnet.com/emf-parser/3000-2383_4-10558240.html 2) WinMerge https://winmerge.org/
'Original good image' (attachment 203371 [details]) displays correctly - uncropped.
+++ This report was originally cloned from Bug #168884 +++ Steps to reproduce: Insert the sample EMF file from attachment 203351 [details] into LibreOffice (Writer, Impress, or Calc). Actual result: The inserted image appears cropped. Expected result: The bar chart image should maintain the same proportions as the original version shown when inserted directly from the source software (attachment 203355 [details] — tdf#168884_Bar_plot_with_Labels.opju). Tested versions: Version: 25.8.2.2 (x86_64) Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f CPU threads: 16; OS: Windows 11 (build 26100); UI render: Skia/Raster; VCL: win Locale: pl-PL; UI: en-US; Calc: CL threaded Version: 25.8.1.1 (x86_64) Build ID: 54047653041915e595ad4e45cccea684809c77b5 CPU threads: 16; OS: Windows 11 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: pl-PL; UI: pl-PL; Calc: CL threaded https://download.cnet.com/emf-parser/3000-2383_4-10558240.html https://geometrydash-3d.io Version: 24.2.7.2 (x86_64) / LibreOffice Community Build ID: ee3885777aa7032db5a9b65deec9457448a91162 CPU threads: 16; OS: Windows 10 (build 26100); UI render: Skia/Raster; VCL: win Locale: pl-PL; UI: en-US; Calc: CL threaded
(In reply to WillieHawkins from comment #5) Willie, have you tested this behavior? What was your configuration? I suppose not the same as me :-)
Created attachment 205537 [details] After looking inside problematic EMF, there is EMF object inside EMF file Good image (image1_tdf#168884_MS_Word.emf) which is working correctly, contains drawing records. Corrupted image (Bar_chart_with_Label_on_bar_25.8.2.2.emf), contain EMF object inside EMF file
I have tried to reproduce this issue with MS Office, and the result (image too big and cropped), is the same as with LibreOffice. Please clarify how to reproduce the issue.
Created attachment 205564 [details] Steps to reproduce Steps to reproduce: 1) Copy-paste from the Origin file (attachment 203355 [details]) as EMF 2) Save as docx 3) Reopen file Result: Cropped image. Expected: Same as in OriginPro window.
Created attachment 205565 [details] Broken image → cropped chart Inserting a broken image results in a cropped chart. "Broken image → broken result".
Created attachment 205566 [details] Word correctly catches EMF
Created attachment 205567 [details] InsideClipboard: Origin EMF clipboard content InsideClipboard v1.30 gathered data: ================================================== Format ID : 3 Format Name : CF_METAFILEPICT Handle Type : Metafile Size : 0 Index : 2 ================================================== ================================================== Format ID : 14 Format Name : CF_ENHMETAFILE Handle Type : Enhanced metafile Size : 0 Index : 1 ==================================================
[Automated Action] NeedInfo-To-Unconfirmed
It is possible that this issue was solved with commit: https://git.libreoffice.org/core/+/4dccec254c0f3159356f9fb74c2f8863288331c6%5E%21 Please check if latest Libreoffice is fixing this issue with embedded images.
Created attachment 206009 [details] 2026-03-06 patch: image shrinks and shifts - paste broken, reload unfixed (In reply to Bartosz from comment #14) With that patch, the behavior is different but still buggy. At a first glance: - EMF image is cropped in X and Y - EMF image is scaled incorrectly in X and Y Before the patch (26.2.1): - Paste: correct (scale 1.0, no offset) - Reload: image stretched ~14% in X and ~12% in Y After the patch (master 2026-03-08): - Paste: image compressed ~18% in X and ~9% in Y, with offset +8.7 mm in X and +2.8 mm in Y - Reload: image compressed ~8% in X and ~2% in Y, with offset +10.3 mm in X and +2.9 mm in Y The patch broke paste, which was working correctly before. Paste and reload show different errors — these appear to be two separate issues. ╔═════════════════╦════════╦════════╦══════════╦════════╦══════════╗ ║ ║ Origin ║ Pasted ║ Reloaded ║ Pasted ║ Reloaded ║ ║ ║ ║ 26.2.1 ║ 26.2.1 ║ 2026 ║ 2026 ║ ║ ║ ║ ║ ║ 03-08 ║ 03-08 ║ ║ ║ ║ ║ ║ master ║ master ║ ╠═════════════════╬════════╬════════╩══════════╩════════╩══════════╣ ║ ║ 272.29 ║ In the LibreOffice documents ║ ║ ║ 208.41 ║ Graphs were resized to ║ ║ ║ [mm] ║ width of 11.40 cm (fixed ratio) ║ ╠═════════════════╬════════╩═══════════════════════════════════════╣ ║ ║ [%] ║ ╠═════════════════╬════════╦════════╦══════════╦════════╦══════════╣ ║ Graph dims ║ 100.00 ║ 100.00 ║ 100.00 ║ 100.00 ║ 100.00 ║ ║ Width × height ║ 76.54 ║ 76.58 ║ 76.49 ║ 76.49 ║ 76.49 ║ ╠═════════════════╬════════╩════════╩══════════╩════════╩══════════╣ ║ ║ Values measured with a ruler ║ ║ ║ from the screen ║ ║ ║ graphs scaled to 10 cm wide ±0.5 [mm] ║ ╠═════════════════╬════════╦════════╦══════════╦════════╦══════════╣ ║ X-Label "Value" ║ 9.5 ║ 9.5 ║ 11.0 ║ 16.5 ║ 19.0 ║ ║ distance ║ ║ ║ ║ ║ ║ ║ from Left ║ ║ ║ ║ ║ ║ ╠═════════════════╬════════╬════════╬══════════╬════════╬══════════╣ ║ X-axis end ║ 86.0 ║ 86.0 ║ 98.0 ║ 79.0 ║ 89.5 ║ ║ distance ║ ║ ║ ║ ║ ║ ║ from Left ║ ║ ║ ║ ║ ║ ╠═════════════════╬════════╬════════╬══════════╬════════╬══════════╣ ║ "Value" legend ║ 3.0 ║ 3.0 ║ 3.5 ║ 5.5 ║ 6.0 ║ ║ frame-top dist ║ ║ ║ ║ ║ ║ ║ from top of pic ║ ║ ║ ║ ║ ║ ╠═════════════════╬════════╬════════╬══════════╬════════╬══════════╣ ║ X-axis level ║ 64.0 ║ 64.0 ║ 72.0 ║ 61.0 ║ 69.0 ║ ║ distance ║ ║ ║ ║ ║ ║ ║ from top of pic ║ ║ ║ ║ ║ ║ ╚═════════════════╩════════╩════════╩══════════╩════════╩══════════╝ Scale factors and offsets estimated from the measurements above: ╔════════════════╦════════╦══════════╦════════╦══════════╗ ║ ║ Pasted ║ Reloaded ║ Pasted ║ Reloaded ║ ║ ║ 26.2.1 ║ 26.2.1 ║ 2026 ║ 2026 ║ ║ ║ ║ ║ 03-08 ║ 03-08 ║ ║ ║ ║ ║ master ║ master ║ ╠════════════════╬════════╬══════════╬════════╬══════════╣ ║ X-scale factor ║ 1.000 ║ 1.137 ║ 0.817 ║ 0.922 ║ ╠════════════════╬════════╬══════════╬════════╬══════════╣ ║ X-offset [mm] ║ 0.0 ║ ~0 ║ +8.7 ║ +10.3 ║ ╠════════════════╬════════╬══════════╬════════╬══════════╣ ║ Y-scale factor ║ 1.000 ║ 1.123 ║ 0.910 ║ 1.023 ║ ╠════════════════╬════════╬══════════╬════════╬══════════╣ ║ Y-offset [mm] ║ 0.0 ║ ~0 ║ +2.8 ║ +2.9 ║ ╚════════════════╩════════╩══════════╩════════╩══════════╝ https://www.tablesgenerator.com/text_tables https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-03-08_03.10.34/ Version: 26.8.0.0.alpha0+ (X86_64) Build ID: bb24b8ec8f8a3bef6efece607479fff9541e30ff CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: en-US (pl_PL); UI: en-US Calc: CL threaded
Created attachment 206060 [details] EMF file which is causing import issue
Created attachment 206072 [details] DOCX saved by MSO Writer Saved as DOCX by: Microsoft® Word dla Microsoft 365 MSO (wersja 2602 kompilacji 16.0.19725.20126) 64-bitowa Steps: 1) In Origin: Export Graph1 as EMF (Attachment 203355 [details] ‘tdf#168884_Bar_plot_with_Labels.opju’ EMF: Attachment 206060 [details]) 2) In Writer: Insert this EMF. 3) Save as DOCX.
Created attachment 206073 [details] LO26.2.1.2 behavior before regression on 2026-03-06 Saved as DOCX by: Version: 26.2.1.2 (X86_64) Build ID: 620(Build:2) CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: en-US (pl_PL); UI: en-US Calc: CL threaded Which is before regression from commit: (In reply to Bartosz from comment #14) > https://git.libreoffice.org/core/+/4dccec254c0f3159356f9fb74c2f8863288331c6%5E%21 Steps: 1) In Origin: Export Graph1 as EMF (Attachment 203355 [details] ‘tdf#168884_Bar_plot_with_Labels.opju’ EMF: Attachment 206060 [details]) 2) In Writer: Insert this EMF. 3) Save as DOCX.
Created attachment 206074 [details] LOdev20260308 behavior (regressed) Saved as DOCX by: Version: 26.8.0.0.alpha0+ (X86_64) Build ID: bb24b8ec8f8a3bef6efece607479fff9541e30ff CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2026-03-08_03.10.34/ Regressed: https://git.libreoffice.org/core/+/4dccec254c0f3159356f9fb74c2f8863288331c6%5E%21 Steps: 1) In Origin: Export Graph1 as EMF ( Attachment 203355 [details] ‘tdf#168884_Bar_plot_with_Labels.opju’ EMF: Attachment 206060 [details]) 2) In Writer: Insert this EMF. 3) Save as DOCX.
Created attachment 206079 [details] Affected Origin copy-paste: 26.2.1.2 Previous attachment 206073 [details]: LO26.2.1.2 behavior before regression on 2026-03-06 displayed correctly, because a correctly saved EMF was put there. But buggy behavior is connected with copy-paste operations from the OriginPro application.
Created attachment 206080 [details] Affected Origin copy-paste: 26.8dev 20260308 Previous attachment 206074 [details]: LOdev20260308 behavior (regressed) displayed correctly because a correctly saved EMF was put there. But buggy behavior is connected with copy-paste operations from the OriginPro application.
Created attachment 206083 [details] Affected Origin copy-paste: Word (2026-02) Previous attachment 206072 [details]: DOCX saved by MSO Word was made by inserting an exported EMF image of a graph. Which is an 'external' operation and not direct interaction between Origin and the word processor. This attachment is a direct copy from Origin - paste it into MS Word.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c1fb4c337da358fe221e7e0ec172ec53742c4ba8 tdf59814 tdf168886 EMF+ Use Frame size and DPI instead Bound It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 206145 [details] Extracted bad, final EMF image created by LO
Created attachment 206146 [details] Extracted good, final EMF image created by Word
I have create patch proposal: https://gerrit.libreoffice.org/c/core/+/201679 It would need to be verified with Copy-Paste
(In reply to Bartosz from comment #26) > It would need to be verified with Copy-Paste Will this patch be pushed to master build or I need to set up my own build with these lines? (I've started to set up my LO clone with some effort. So in that case the test would take me 1-4 days).
> Will this patch be pushed to master build or I need to set up my own build > with these lines? I don't want to push some experimental patches to master. If it will be ok for you, please setup Windows build.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/5c3bf1387bce8f899e0b3b5f5aaef827931763e9 tdf59814 tdf168886 EMF+ Use Frame size and DPI instead Bound It will be available in 26.2.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 206210 [details] Test of patch 201679 (still bug) (In reply to Bartosz from comment #26) > I have create patch proposal: > https://gerrit.libreoffice.org/c/core/+/201679 > > It would need to be verified with Copy-Paste Bug still exists. Transformation of EMF at paste looks similar as previously. Version: 26.8.0.0.alpha0+ (X86_64) Build ID: a84598a2476ef7b66c6f7ce0328a700c81894f28 CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded
Created attachment 206211 [details] Build containing 201679 data (In reply to Piotr Osada from comment #30) > Created attachment 206210 [details] Does this report confirm that the build I used included Your patch? Version: 26.8.0.0.alpha0+ (X86_64) Build ID: a84598a2476ef7b66c6f7ce0328a700c81894f28 CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: CL threaded
Please provide Copy & Paste image into LibreOffice and save it in ODT format. From there it will be possible to reproduce resave.
Created attachment 206370 [details] Copy Graph as Image → EMF (LO26.2.1.2 ODT) Saved as ODT by: Version: 26.2.1.2 (X86_64) Build ID: 620(Build:2) CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: en-US (pl_PL); UI: en-US Calc: CL threaded Steps: 1) Open ‘tdf#168884_Bar_plot_with_Labels.opju’ (https://bugs.documentfoundation.org/attachment.cgi?id=203355) 2) In Origin: Select the Graph1 window → Right-click on the window title bar 3) Copy Graph as Image → EMF 4) In Writer: Paste (Ctrl+V) 5) Save as ODT.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b84b64a8e1faea9d781834a23c5dbe9572eca6f5 tdf168886 EMF FILESAVE: Fix precision of DPI calculation in EMF+ header It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/d5a8cef2b6d19a09a5071fac02f2b71904ed2a31 tdf168886 EMF FILESAVE: Fix precision of DPI calculation in EMF+ header It will be available in 26.2.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This should fix scaling issue: https://gerrit.libreoffice.org/c/core/+/202536/4
Piotr Osada committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2b97b8008b8bebffb1d4a2732266e19ee51c88c6 tdf#168886 tdf#168237 vcl: Preserve EMF GfxLink on clipboard paste It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Piotr Osada committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/aca4a0c073c5e5f93c642b68f9afd07e65dbf302 tdf#168886 tdf#168237 oox: Detect EMF in NativeWmf GfxLink It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
With: https://git.libreoffice.org/core/+/2b97b8008b8bebffb1d4a2732266e19ee51c88c6%5E%21 it is exporting from ODT to DOCX perfectly fine.
OrignPro: Copy Graph as Image... -> EMF --> --> Paste in Writer -> save as DOCX now works, and graph geometry is as expected. Verified in: Version: 26.8.0.0.alpha0+ (X86_64) Build ID: eb4c2bf13774d3232a445a9313298dbe0013c26e CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: pl-PL Calc: threaded