Bug 79524 - FILEOPEN: MSO ODT - Frame sizes arent imported correctly which crops images
Summary: FILEOPEN: MSO ODT - Frame sizes arent imported correctly which crops images
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ODF-import Frame
  Show dependency treegraph
 
Reported: 2014-06-02 03:43 UTC by Yousuf Philips (jay) (retired)
Modified: 2022-09-12 03:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
how the shape and text appear in Word 2013 vs LibO (163.44 KB, image/png)
2014-06-02 03:43 UTC, Yousuf Philips (jay) (retired)
Details
trimmed sample (21.17 KB, application/vnd.oasis.opendocument.text)
2017-10-07 14:00 UTC, Yousuf Philips (jay) (retired)
Details
Example with the four cases. (12.15 KB, application/vnd.oasis.opendocument.text)
2017-10-08 17:32 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-06-02 03:43:18 UTC
Created attachment 100264 [details]
how the shape and text appear in Word 2013 vs LibO

When examining attachment 93106 [details] from bug 74262, i noticed that a black border around the image on page 56 is not in black and it size is incorrect, which results in the text next to the image, seem like it is missing. Tested on Linux Mint with LibO 3.6.7, 4.2.4 and 4.3 beta.

PDF export from MS Word 2013 - attachment 100262 [details]
Comment 1 Firas Hanife 2014-06-06 18:52:23 UTC
Reproduced with 4.1.6.2.
Changing Status to NEW.
Comment 2 QA Administrators 2015-07-18 17:42:56 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2015-10-16 20:11:42 UTC
Still confirmed.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
Locale: en-US (fi_FI)
Comment 4 QA Administrators 2016-11-08 11:14:58 UTC Comment hidden (obsolete)
Comment 5 Yousuf Philips (jay) (retired) 2017-10-07 14:00:46 UTC
Created attachment 136830 [details]
trimmed sample
Comment 6 Yousuf Philips (jay) (retired) 2017-10-07 14:47:26 UTC
So Word and Calligra show it somewhat similar, while Writer and TextMaker show it the same.

Here is the xml from the first image in attachment 136830 [details].

 <draw:frame draw:z-index="5" draw:id="id0" draw:style-name="a0" draw:name="Врезка7" text:anchor-type="paragraph" svg:x="0in" svg:y="0in" svg:width="3.47778in" svg:height="1.8125in" style:rel-width="scale" style:rel-height="scale">
   <draw:text-box>
     <text:p text:style-name="Drawing">
       <text:span text:style-name="T5">
         <draw:frame draw:style-name="a1" draw:name="Графический объект13" text:anchor-type="as-char" svg:x="0in" svg:y="0in" svg:width="3.47913in" svg:height="1.8126in" style:rel-width="scale" style:rel-height="scale">
           <draw:image xlink:href="media/image1.png" ... />
           <svg:title />
           <svg:desc />
         </draw:frame>
       </text:span>
       Рисунок 21: Генератор входных данных
     </text:p>
   </draw:text-box>
   <svg:title />
   <svg:desc />
 </draw:frame>

So LO is using the svg:width and svg:height values from frame id0, but not taking values from draw:style-name a0 like draw:auto-grow-width="true" draw:auto-grow-height="true". @Regina: what's your take?
Comment 7 Regina Henschel 2017-10-08 17:32:04 UTC
Created attachment 136854 [details]
Example with the four cases.

LibreOffice has a curious method to distinguish whether a frame should auto-size or not. If a svg:width exists, then auto-grow-width is off, and same if a svg:height exists, the auto-grow-height is off.

LibreOffice does not write the attributes draw:auto-grow-width and draw::auto-growheight on saving and does not evaluate these attributes on loading. For me this issue is from the group "not implemented ODF feature". 

The problem is independent from the image.

I have created the example file by first making one frame and then copy it three times. Then I set the auto-size properties. And in last step I have written the text in the frame once and copied it into the other frames.
Comment 8 QA Administrators 2018-10-14 02:57:19 UTC Comment hidden (obsolete)
Comment 9 Regina Henschel 2020-09-11 17:24:53 UTC
The attributes draw:auto-grow-width and draw:auto-grow-height are still not evaluated in case of "trimmed sample", but they are evaluated in case of "Example with the four cases". So there seems to be a problem in case the content is reacher than plain text.

So it might be related to not implemented style:rel-width="scale" and style:rel-height="scale", see bug 45884.

Tested with Version: 7.0.0.2 (x64)
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 10 QA Administrators 2022-09-12 03:40:23 UTC
Dear Yousuf Philips (jay) (retired),

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug