Bug 44278 - FILESAVE .docx (MSO2007) as .odt creates duplicated picture
Summary: FILESAVE .docx (MSO2007) as .odt creates duplicated picture
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Cédric Bosdonnat
URL:
Whiteboard: target:3.7.0 target:3.6.3 target:7.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-29 08:50 UTC by v_2e
Modified: 2021-08-11 19:28 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
random docx file with image (27.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-01-11 03:16 UTC, sasha.libreoffice
Details
file produced in LibO 3.5.0 beta 1 (41.67 KB, application/vnd.oasis.opendocument.text)
2012-01-11 03:17 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description v_2e 2011-12-29 08:50:35 UTC
Hello!
  I have encountered the following problem today:
  I opened a .docx document containing an image in LibreOffice Wrier 3.5.0beta2 and saved as .odt. After that I opened this new file in Writer and saw that an extra image (the copy of the one that had been there before) appeared in the top left corner of the page.
Comment 1 sasha.libreoffice 2012-01-11 03:16:06 UTC
Created attachment 55414 [details]
random docx file with image
Comment 2 sasha.libreoffice 2012-01-11 03:17:48 UTC
Created attachment 55415 [details]
file produced in LibO 3.5.0 beta 1

reproduced in LibO 3.5.0 beta 1 on Fedora 64 bit
Comment 3 Rainer Bielefeld Retired 2012-06-23 08:42:23 UTC
Already [Reproducible] with "LibreOffice 3.3.3  German UI/Locale [OOO330m19 (Build:301) tag libreoffice-3.3.3.1] on German WIN7 Home Premium (64bit) and 
OOo 3.2-dev, so inherited from OOo.

Can be easily reproduced with an own document:

1. open new Writer Document from LibO start center
2. insert unlinked.jpg by menu 'Insert -> Picture -> From File'
   > Picture will be visible at top left corner of the document
2.1 I increased size, but I doubt that that will matter
3. Save as document1.odt, close
4. Reopen document1.odt:
   > Looks fine
5. Save as document2.docx (MSO2007), close
6. Reopen document2.docx
   > Looks fine
7. Save as document3.odt, close
8. Reopen document3.odt:
   Bug: 2 identical pictures, new one does not respect margins

Still [Reproducible] with parallel installation of Master "LOdev " 3.7.0.0.alpha0+   - WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 8d39b7]" (tinderbox: W2008R2@16-minimal_build, pull time 2012-06-20 04:38:46)

Might be related to Bug 47527 

@Cédric:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug.
Comment 4 Joel Madero 2012-09-19 23:44:46 UTC
just adding myself as QA so that we can easily query this. Confirmed with 3.6.2.1
Comment 5 Cédric Bosdonnat 2012-10-02 16:29:32 UTC
taking it
Comment 6 Not Assigned 2012-10-03 12:45:16 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1fc7c5655dde547b721b3afffabcd8bdbe0add2

fdo#44278: fix leaked image when import docx



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Cédric Bosdonnat 2012-10-03 12:52:31 UTC
fixed
Comment 8 sasha.libreoffice 2012-10-03 12:53:24 UTC
Thanks for fixing this bug
Comment 9 Roman Eisele 2012-10-04 07:35:24 UTC
The usual question ;-): Is it possible to backport this to the 3.6.x branch?

It would be nice to have the fix there, too, and not only in 3.7 which is still months away for “ordinary” users ...
Comment 10 Not Assigned 2012-10-04 08:51:54 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e553fcf085149dcaec15541278d910e59b04676&g=libreoffice-3-6

fdo#44278: fix leaked image when import docx


It will be available in LibreOffice 3.6.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Jean-Baptiste Faure 2012-10-28 21:36:04 UTC
Verified in LO 3.6.3.2

Thank you very much.
Comment 12 Commit Notification 2021-08-11 19:28:39 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2316e21b2c6f3d1f18613408a8deb41af17c03bb

tdf#44278: sw_ooxmlexport16: Add unittest

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.