Description: OLE Formula Objects are rendered correctly in the LibreOffice Draw view, but as soon as you export them (with default LOD settings applied), the resulting formula is not rendered correctly. This only happens if you export to one of the following file types: - PNG - GIF The effect is inverted for the following file types (the numbers are correctly rendered, but the lines are not): - APNG - EMF The bug does not happen in the following file types: - JPG - HTML - PDF (PDF has other issues which I might create a new bug report for) - SVG (SVG has other issues which I might create a new bug report for) - TIFF - WEBP - WMF I happen to know what causes the issue and a workaround: The problem is the border (officially called "margins") of the page. Following steps provide a workaround to the bug: 1. Right click the page and select *Page Properties*. 2. Notice that by default the margins are set to "1.0 cm" or "0.39''" or sth. 3. Go into the fields "Left:", "Right:", "Top:", "Bottom:" and enter "0" or "0 cm" to remove all the margins. 4. Follow the steps starting with step 2. from the "Steps to Reproduce" section. 5. Notice that the bug (and the inverted bug for APNG and EMF) disappeared. Keywords: FILESAVE, Impress, Draw Steps to Reproduce: 1. Open LibreOffice Draw. The application should create a blank page for you. 2. Click on *Insert* -> *OLE Object* -> *Formula Object...*. The application should place an OLE frame somewhere near the center of the page (it's never in the center of the page) 3. LibreOffice Draw should automatically switch the the formula edit mode. In the "Layout" tab, enter any mildly complex formula such as `f(x) = frac{21 cdot x}{19}`. 4. Click somewhere on the page to leave the edit mode. You should see a perfectly fine rendered formula somewhere in the center of the page. 5. Click on *File* -> *Export...* and in the "Export" window choose any file name and storage location and select the file type "PNG - Portable Network Graphics". 6. Open the PNG file in any image viewer you want and observe that only the fraction line is rendered correctly. The numbers and the other formula parts are moved outside of the OLE frame and not rendered correctly. Actual Results: The position of certain formula elements like numbers are not calculated correctly in the exported PNG file. Expected Results: The fraction lines and numbers and other formula elements are placed correctly in relation to one another and to the placement of the OLE object in the page in Draw Reproducible: Always User Profile Reset: Yes Additional Info: This bug seems to not appear in LibreOffice Writer, but in other components like Impress. Version: 25.8.3.2 (X86_64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 6; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: threaded
Created attachment 204433 [details] Demonstration of the bug Exported PNG file following the "Steps to Reproduce"
reproduce with Version: 26.2.0.0.beta1 (X86_64) Build ID: 620(Build:0) CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: ja-JP (ja_JP); UI: ja-JP Calc: threaded works fine Version: 7.6.7.2 (X86_64) / LibreOffice Community Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5 CPU threads: 8; OS: Windows 10.0 Build 26100; UI render: Skia/Vulkan; VCL: win Locale: ja-JP (ja_JP); UI: en-US Calc: threaded bibisected with win64-24.2 commit 9e92a17cb6e03beedeeca40bfc8524c2623d31eb author Khaled Hosny starmath: Improve glyph positioning *** adding CC: Khaled Hosny Please, take a look? If you export a formula OLE object created in Ver.7.6.7 using Ver.26.2dev, it will be exported correctly. Conversely, if you export a formula OLE object created in Ver.26.2dev using Ver.7.6.7, it will not be exported correctly. In My case - BMP - GIF - JPEG - PNG - TIFF
No idea, sorry. I wouldn’t even know how to debug that. I don’t remember what is the issue I was trying to fix, either, so if someone can revert that commit and verify it fixes the issue here, please feel free to do so.