Bug 100748 - FILEOPEN: Images anchored to paragraph dont load within their table cells
Summary: FILEOPEN: Images anchored to paragraph dont load within their table cells
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odt
Depends on:
Blocks: Anchor-and-Text-Wrap Writer-Tables
  Show dependency treegraph
 
Reported: 2016-07-04 01:04 UTC by Alexandre-Xavier
Modified: 2016-10-20 02:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ordis.odt (9.28 MB, application/vnd.oasis.opendocument.text)
2016-10-20 00:00 UTC, Yousuf Philips (jay) (retired)
Details
ordis.pdf (1.41 MB, application/pdf)
2016-10-20 00:01 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre-Xavier 2016-07-04 01:04:45 UTC
I did my document's formating then saved. I have a picture in a cell. When I loaded the document, the cell was small and the picture was hanging out of it. 

If the formating would be correct, the cell would have been on the second page because the pictures are big enough that they shouldn't fit on the first page. They are at the end of the first page. 

When I save to a PDF, the formating is correct. It's only when loading the .odt document that I don't get the same result as when I saved. 


Here's a .zip file. It contains a screenshot of the bug, the .pdf that shows how it should look like and the original .odt document. 

http://www.mediafire.com/download/5f6fnbufaixwyuj/ordi.zip
Comment 1 Joel Madero 2016-07-07 22:45:51 UTC
Hi Alexandre-Xavier,

Can you try anchoring the images as a character instead of "to paragraph". 

Right click on each image and anchor as character. Arrange the images as you want, save, close, open. I believe this resolves the problem because you want the images treated like characters (inside of the table) and not to the paragraphs (which are part of the page).

Marking as NEEDINFO - throw back into UNCONFIRMED if that does not resolve it.
Comment 2 Alexandre-Xavier 2016-07-07 22:59:49 UTC
The issue is that when I saved my document and reloaded it, the images had moved. 


> Right click on each image and anchor as character.

Yes, it fixed my problem, but that's only a workaround.
Comment 3 Jean-Baptiste Faure 2016-08-02 19:34:08 UTC
(In reply to Alexandre-Xavier from comment #2)
[...]
> > Right click on each image and anchor as character.
> 
> Yes, it fixed my problem, but that's only a workaround.

No it is not a workaround, it is the correct way to anchor an image in that case. Indeed anchoring to the paragraph only fix the distance between the image and the paragraph.

Closing as WorksForMe. Please feel free to reopen if you disagree.

Best regards. JBF
Comment 4 Alexandre-Xavier 2016-08-03 04:30:05 UTC
I disagree. The issue is not whether my image was anchored correctly, it's about the document being saved with the images placed in a certain way and then this placement being different on reload.  

When a user saves a document, he expects the document to be the same on reload. 

It's acceptable when opening .docx files that were made with Microsoft Office, but not for .odt files, because they are LibreOffice's native format.
Comment 5 Yousuf Philips (jay) (retired) 2016-10-20 00:00:23 UTC
Created attachment 128085 [details]
ordis.odt
Comment 6 Yousuf Philips (jay) (retired) 2016-10-20 00:01:07 UTC
Created attachment 128086 [details]
ordis.pdf
Comment 7 Yousuf Philips (jay) (retired) 2016-10-20 00:14:52 UTC
Attached the odt and pdf to bugzilla so they dont disappear later.

@Stuart, @Cor: what is your take on this issue? This looks like a repagination issue that seems to fall down when the cell contents is at the end of the page and works perfectly fine when it isnt.
Comment 8 V Stuart Foote 2016-10-20 02:06:08 UTC
Insert anchored "to paragraph" within a table cell is going to be problematic as here because tables are "recomposed" onto the canvas round trip to and from ODF.

As with bug 87720 the default anchor should be to character.

OPs complaint that document should be structured the same on reopening the ODF is valid--but is caused by the default anchor to paragraph.

Agree with JBF this is not a bug and should be closed Works For Me--but bug 87720 for defaults needs to review placement of images into frames, table cells, etc. and assign functional defaults.