Bug 79208 - FILESAVE: When saving to docx images are converted to png format but this fails fro jpg files resulting in 0 bytes files and corrupted documents
Summary: FILESAVE: When saving to docx images are converted to png format but this fai...
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.5.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-25 12:00 UTC by Joost Muller
Modified: 2015-02-11 19:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A correct docx document that will result in a destroyed document when saved with libreoffie as docx. The doc is self-explanatory of what happens. (384.75 KB, application/wps-office.docx)
2014-05-25 12:00 UTC, Joost Muller
Details
Content_types.xml of roundtripped document 4.3beta1 (3.74 KB, text/xml)
2014-05-25 12:49 UTC, Jorendc
Details
Roundtripped document using 4.3beta1 (948.98 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-25 12:50 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joost Muller 2014-05-25 12:00:30 UTC
Created attachment 99762 [details]
A correct docx document that will result in a destroyed document when saved with libreoffie as docx. The doc is self-explanatory of what happens.

Problem description: 1. If you insert non-png format graphics from files and save a document as docx libreoffcie will convert all graphics to png format. 2. The conversion to png format fails for jpg and jpeg files resulting in images of 0 bytes. this messes up the document terribly.

Steps to reproduce:
1. Make a new document
2. Insert graphic files in png, gif and jpgeg/jpg formats
3. Save as docx the gif-files will be converted to png, the jpegs will be destroyed. 

Current behavior: 1. Convert graphics files to png format without asking the user. 2. Attempt to convert jpegs, when this fails store anyway as files with 0 bytes as size.

Expected behavior: 1. Do not automatically convert to PNG but keep as is. 2. Should conversion be necessary or an option then either convert correctly, or refuse to save if there are serious errors.



              
Operating System: All
Version: 4.1.5.3 release
Comment 1 Jorendc 2014-05-25 12:10:59 UTC
As far I can see, I fail to reproduce Windows 8.1 using LibreOffice Versie: 4.3.0.0.beta1 
Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f

Can you please retest using 4.3.0.0 beta 1, which you can download here: http://dev-builds.libreoffice.org/pre-releases/

Kind regards,
Joren
Comment 2 Luuk 2014-05-25 12:23:37 UTC
i was also able to open document in 4.3 (DEV), and see all pictures.
i also saved under new name

QUESTION: Why is the doc with new name 2.47 times larger??

C:\temp>dir "A document*"
 Volume in drive C is Drive
 Volume Serial Number is A0B0-B175

 Directory of C:\temp

25-05-2014  14:15           393.982 A document with mixed png_jpg_gif.docx
25-05-2014  14:18           971.757 A document with mixed png_jpg_gif2.docx
               2 File(s)      1.365.739 bytes
               0 Dir(s)  85.561.290.752 bytes free

C:\temp>
Comment 3 Jorendc 2014-05-25 12:31:02 UTC
(In reply to comment #2)
> QUESTION: Why is the doc with new name 2.47 times larger??

Mmh, good question. Didn't saw that. But as far I can see the images are preserved :-)? Right? If so, lets not spend to many comments about the non-preservation but about the size.

Do you agree :-)?

Kind regards,
Joren
Comment 4 Joost Muller 2014-05-25 12:42:23 UTC
If you look inside the docx (it is just a zip-file with folders the images are in <docx>/word/media/) are the images all in their original formats of png, gif and jpeg? or have they been changed?
Comment 5 Jorendc 2014-05-25 12:49:04 UTC
Created attachment 99763 [details]
Content_types.xml of roundtripped document 4.3beta1

As far I can see, yes... At least there are about double as much entries then in the content_types.xml of a roundtripped document in 4.2.4.

Kind regards,
Joren
Comment 6 Jorendc 2014-05-25 12:50:03 UTC
Created attachment 99764 [details]
Roundtripped document using 4.3beta1
Comment 7 Joost Muller 2014-05-25 12:56:21 UTC
Thanks for that copy.

It does keep the original types now. That is great. 
But LO sems to apply "multiplicaro" to the number of graphiocs included. :-)


It is great that LO is moving in the right direction. I wonder what will happen if you open the doc, inswert a space and tthen save as <title>3.docx will it make even more pics?

Thanks for your help.
Comment 8 Luuk 2014-05-25 15:13:03 UTC
(In reply to comment #7)
> Thanks for that copy.
> 
> It does keep the original types now. That is great. 
> But LO sems to apply "multiplicaro" to the number of graphiocs included. :-)
> 
> 
> It is great that LO is moving in the right direction. I wonder what will
> happen if you open the doc, inswert a space and tthen save as <title>3.docx
> will it make even more pics?
> 
> Thanks for your help.

25-05-2014  14:15           393.982 A document with mixed png_jpg_gif.docx
25-05-2014  14:18           971.757 A document with mixed png_jpg_gif2.docx
25-05-2014  17:08           423.247 A document with mixed png_jpg_gif3.docx
25-05-2014  17:11           423.446 A document with mixed png_jpg_gif4.docx

Saved with Office 2013 on Windows7 'Preserving compatibility with older versions of Office' checked.
and file '...4.docx' with preserving UNchecked.
Comment 9 Joost Muller 2014-05-25 15:23:26 UTC
That is a great test of Office 2013, great that it can handle the file. Thanks.
If you save the file a second time from LO does it increase the number of pics even more?  It may help to change the file slightly by adding a space, for example, and then save it.

I am sorry I do not have a more modern version. Too busy working. Don't want to mess up the install until I'm finished.
Comment 10 Jorendc 2014-05-25 15:43:04 UTC
(In reply to comment #9)
> I am sorry I do not have a more modern version. Too busy working. Don't want
> to mess up the install until I'm finished.

LibreOffice 4.3.0.0 beta 1 will be installed in parallel with your current version. No need to worry about messing up installations.
Comment 11 Joost Muller 2014-05-25 16:20:12 UTC
In Linux? I thought they could not be installed in parralell
Comment 12 Jorendc 2014-05-25 16:44:26 UTC
On Linux, Mac and Windows.
Comment 13 QA Administrators 2015-01-10 18:06:23 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


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


Warm Regards,
QA Team

Message generated on: 10/01/2015
Comment 14 QA Administrators 2015-02-11 19:49:05 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID 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 FDO

Message generated on: 2015-02-11
Comment 15 QA Administrators 2015-02-11 19:54:46 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID 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 FDO
Message generated on: 2015-02-11