Bug 139785 - FILEOPEN Embedded Draw object is rendered with wrong viewport in FODT
Summary: FILEOPEN Embedded Draw object is rendered with wrong viewport in FODT
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:fodt, regression
Depends on:
Blocks: OLE-Objects ODF-Flat
  Show dependency treegraph
 
Reported: 2021-01-20 13:41 UTC by woundorf
Modified: 2021-07-31 10:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
FODT file that shows the bug in LibreOffice 7.1 and later. (66.93 KB, application/vnd.oasis.opendocument.text-flat-xml)
2021-01-20 13:41 UTC, woundorf
Details
ODT file that is displayed correctly. (17.79 KB, application/vnd.oasis.opendocument.text)
2021-01-20 13:42 UTC, woundorf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description woundorf 2021-01-20 13:41:41 UTC
Created attachment 169049 [details]
FODT file that shows the bug in LibreOffice 7.1 and later.

When creating an ODT with an embedded Draw object, the viewport of the drawing can be adjusted to show the correct part and ignore margins, etc. This works well with both ODT and FODT in LibreOffice up to 7.0. However since the current 7.1 RC and up to yesterday's nightly (2021-01-19) in ODT the result is the same but in FODT the viewport is ignored when opening the file, thus the drawing can show big margins at the top and the left and be cropped at the right and the bottom.

See the attached files as examples. Both have been saved from the same document but the ODT is displayed as expected but the FODT is displayed wrongly. 

Steps to Reproduce:
1. Create new document with LibreOffice Writer
2. Insert > Object > OLE object…
3. LibreOffice <version> Drawing
4. Draw some big object
5. Adjust the viewport to leave it centered
6. Click outside of the drawing area to return to the text document
7. Save the document as odt
8. Save the document as fodt
9. Close the document
10. Open both the odt and the fodt

Actual Results:
In the odt the drawing is shown as before closing. In the fodt the drawing is shown panned and cropped.

Expected Results:
In both files the drawing is shown as before closing.
Comment 1 woundorf 2021-01-20 13:42:28 UTC
Created attachment 169050 [details]
ODT file that is displayed correctly.
Comment 2 Dieter 2021-02-04 07:59:31 UTC
I confirm it with

Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 3 raal 2021-04-03 15:26:46 UTC
This seems to have begun at the below commit.
Adding Cc: to Noel Grandin ; Could you possibly take a look at this one?
Thanks
linux-64-7.1$  f1db92cc70d8debc6379ddb2965f465e390dc4aa is the first bad commit
commit f1db92cc70d8debc6379ddb2965f465e390dc4aa
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Nov 4 07:07:16 2020 +0100

    source 81fe31d2c8977791f9b90ab1da4fbb1a778f87fb

https://gerrit.libreoffice.org/c/core/+/105260
use fastparser in XMLEmbeddedObjectImportContext
Comment 4 Noel Grandin 2021-07-01 13:03:12 UTC
This was fixed by

    commit 06a983b213b8fb71fdac1004868d7b4fdd6a9833
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Thu Jun 3 14:15:13 2021 +0200
    tdf#142546 broken formulas in .FODT files
Comment 5 Dieter 2021-07-31 10:18:03 UTC
VERIFIED with

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ac80ec817eb07c77a51bc0729985a473c734182e
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL