Bug 151372 - Images disappear after saving
Summary: Images disappear after saving
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-06 09:58 UTC by s.amine.impactnet
Modified: 2023-05-12 03:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
a sample document (261.60 KB, application/vnd.oasis.opendocument.text)
2022-10-06 10:15 UTC, s.amine.impactnet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description s.amine.impactnet 2022-10-06 09:58:30 UTC
Description:
In a odt document, if i change anything then save, all pictures dissapear.
Exemple: I open this document (https://www.mediafire.com/file/f5xdw27y2vs8mrn/TPE_-_vente.odt/file) . As you can see, there is a picture and some text. Now modify or add any text, then save. Re-open, the picture is gone.
I have at least 5 documents behaving like this.

Steps to Reproduce:
1. download this ODT: https://www.mediafire.com/file/f5xdw27y2vs8mrn/TPE_-_vente.odt/file
2. change or add any text
3. Save
4. open the document
5. the picture is gone

Actual Results:
The pictures disappear 

Expected Results:
the picture have to be visible


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Sorry the bad english.

I investigated the problem, in the content.xml file, this part before saving:

<text:p text:style-name="P1">
    <draw:frame draw:style-name="fr3" draw:name="Image 6" text:anchor-type="paragraph" svg:x="6.585cm" svg:y="0.106cm"
                svg:width="5.292cm" style:rel-width="scale" svg:height="5.292cm" style:rel-height="scale"
                draw:z-index="4">
        <draw:image xlink:href="Pictures/10000000000000C8000000C83BDED6B6D0C4F2D4.png" xlink:type="simple"
                    xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/png"/>
    </draw:frame>
</text:p>


After saving:

<text:p text:style-name="P1">
    <draw:frame draw:style-name="fr3" draw:name="Image 6" text:anchor-type="paragraph" svg:x="6.585cm" svg:y="0.106cm"
                svg:width="0cm" style:rel-width="scale" svg:height="0cm" style:rel-height="scale"
                draw:z-index="4">
        <draw:image xlink:href="Pictures/10000000000000C8000000C83BDED6B6D0C4F2D4.png" xlink:type="simple"
                    xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="image/png"/>
    </draw:frame>
</text:p>

As you can see, svg:height and svg:width are clearly messed up
Comment 1 s.amine.impactnet 2022-10-06 10:15:44 UTC
Created attachment 182855 [details]
a sample document

Open the document, add or modify some text, save, open again: the pictures are gone.
Comment 2 V Stuart Foote 2022-10-06 12:20:47 UTC
The incorrect reset of image height and width to "0cm" would manifest as losing the picture. And in fact the second image in the sample doc "1000000000000640000002DA5EF7F5316B3E2743.jpg" already had the "0cm" width and height on opening.

But, I can not reproduce the lost size with a more recent 7.4.2.1 rc1 build, nor with recent master against 7.5

On edit - save - close - reopen the values for svg:width and svg:height are recorded as scaled, i.e. not set to "0cm"

=-testing-=

Version: 7.4.2.1 (x64) / LibreOffice Community
Build ID: 681d65acd9ede00dd724d6716f21cabfdcc95bd2
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9063d99ff5ee43cc1239fc1dbb5d9897bdda1c9b
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 Telesto 2022-10-06 17:59:36 UTC
I can not reproduce the lost size with a more recent 7.4.2.1 rc1 build, nor with recent master against 7.5

Same here.. 

A user profile reset might fix the issue: https://wiki.documentfoundation.org/UserProfile
Comment 4 Rajasekaran Karunanithi 2022-10-12 09:54:01 UTC
Reproducable in stable LO 7.4.1.2, build:3c58a8f3a960df8bc8fd77b461821e42c061c5f0 (x64) in Windows 10. It still happens.
Comment 5 QA Administrators 2023-04-11 03:19:00 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2023-05-12 03:20:02 UTC
Dear s.amine.impactnet,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp