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

            Bug ID: 169827
           Summary: OLE Formula Objects are not drawn correctly in
                    LibreOffice Draw projects in exported PNG file
           Product: LibreOffice
           Version: 25.8.3.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: trivial
          Priority: medium
         Component: Draw
          Assignee: [email protected]
          Reporter: [email protected]

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to