Bug 70454 - FILESAVE: ooxml: Bitmaps treated as drawing objects (pasted from Draw) are not exported to docx
Summary: FILESAVE: ooxml: Bitmaps treated as drawing objects (pasted from Draw) are no...
Status: RESOLVED DUPLICATE of bug 65836
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 14:59 UTC by Jacobo Aragunde Pérez
Modified: 2013-10-30 10:40 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test case (39.47 KB, application/vnd.oasis.opendocument.text)
2013-10-14 15:02 UTC, Jacobo Aragunde Pérez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacobo Aragunde Pérez 2013-10-14 14:59:00 UTC
Steps to reproduce:

1. Create a new Draw document
2. Insert a bitmap with insert -> picture -> from file
3. Select and copy the bitmap
4. Create a new Writer document
5. Paste the bitmap
6. Save as .docx
7. Close and open again the saved document

You will find that the bitmap has disappeared. If you open the file, you will see the references to the bitmap in place but the file that should contain it is empty.

The problem is probably related with how SwXShape objects are exported.
Comment 1 Jacobo Aragunde Pérez 2013-10-14 15:02:47 UTC
Created attachment 87603 [details]
Test case

To reproduce the bug you can also:
1. Open the attached file.
2. Save it as docx.
3. Close the current document and open the docx.
Comment 2 Cor Nouws 2013-10-14 15:33:00 UTC
Hi Jacobo,

thanks for the report & test file, but ..

> 5. Paste the bitmap

You did not paste as bitmap, rather as drawing object.
In Writer, do Edit > Paste special and choose bitmap there.

> The problem is probably related with how SwXShape objects are exported.

If you look at Tools > Options > Load/save > Ms Office, you can enable export Powerpoint <> Impress (Draw) conversion.
That could help in your case?

Cheers,
Cor
Comment 3 Jacobo Aragunde Pérez 2013-10-14 15:54:12 UTC
(In reply to comment #2)
> > 5. Paste the bitmap
> 
> You did not paste as bitmap, rather as drawing object.
> In Writer, do Edit > Paste special and choose bitmap there.
> 

Indeed, when pasted as a bitmap it behaves as a normal Writer bitmap (which can only be rotated in 90-degree steps) and it is properly exported to docx, so the error relates with how drawing objects are exported to docx.

JFTR, other drawing objects (for example, a simple rectangle) are properly saved to docx when pasted into a text document.


> > The problem is probably related with how SwXShape objects are exported.
> 
> If you look at Tools > Options > Load/save > Ms Office, you can enable
> export Powerpoint <> Impress (Draw) conversion.
> That could help in your case?
> 

This menu option seems to have no effect on this topic. Results are the same regardless of it being enabled of disabled.


Thanks for such a quick review.
Comment 4 Cor Nouws 2013-10-14 21:31:49 UTC
(In reply to comment #3)

> Thanks for such a quick review.

thanks for your quick reply & additional test :)

We could change the issue to reflect that that particular object is not saved in docx. (Probably should look for similar issues first. And maybe it's nuts to expect that to be possible  at all ??)

Would that make sense for you?
Cheers,
Cor
Comment 5 Jacobo Aragunde Pérez 2013-10-15 07:30:56 UTC
(In reply to comment #4)
> (Probably should look for similar issues first. And maybe
> it's nuts to expect that to be possible  at all ??)
> 

This is probably the same bug as #65836. I should have chosen better search terms to look for similar issues ;)

*** This bug has been marked as a duplicate of bug 65836 ***
Comment 6 Jacobo Aragunde Pérez 2013-10-30 10:40:13 UTC
For the record, this set of changes fixes this bug:

https://gerrit.libreoffice.org/6366
https://gerrit.libreoffice.org/6369

It doesn't completely fix #65856 yet because that one uses a WMF file.