Bug 70381 - Objects scaled to 100% of a page are rendered outside of page
Summary: Objects scaled to 100% of a page are rendered outside of page
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 16:15 UTC by Olivier Diotte
Modified: 2013-12-07 17:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Diotte 2013-10-11 16:15:17 UTC
Steps to reproduce:

1. Open new document
2. Write some text then Insert page break (changing style to Landscape in the page break pop-up)
3. Insert an object in the Landscape page (a picture for example)
4. Right-click picture and set as following: Keep relative ratio, 100% width.
5. Anchor picture to page, base at middle, centered alignment
6. Put cursor in first page and insert a page break (either letting style to [None] or setting it to Default Style)
7. The picture is still there (can be seen by putting a caption on the picture after step 3 then inserting a corresponding index (Insert -> 'Indexes and Tables', Type: Index of Tables, Category: [the category you used for the object])) but will either be hard to grab back (erasing text, messing the document, etc) and sometimes impossible (well, I haven't figured out yet how to get mine back).


From further tests it seems like the object is selectable, it just doesn't appear. The width was at 151%, so maybe the problem is that the width is not updated to change its width when the width of the page changes (Landscape -> Default Style)?
Comment 1 Dominique Boutry 2013-10-28 09:56:34 UTC
Reproduced withy LibO 4.1.2.3 on Win7.

I noticed that :
- the image is indeed still present, as shown in the Navigator,
- double-clic on it in the navigator, the 8 green handles appear in the landscape sheet, at an unchanged location,
- the anchor is visible at the top-left of page 2 (portrait).
- it's possible to grab the image (although blank) and drag&drop it in page 2 (the one with its anchor), and its content re-appeared. All seems repaired.
Comment 2 Jean-Baptiste Faure 2013-11-24 00:09:05 UTC
Hmm, it is not a good idea to anchor an image to the page and to insert a page before it. When you anchor an image to the page you probably think "that page" when the software can't do something else than "the page at that position".

If you anchor your image to the paragraph, it will be still on the landscape page if you insert a new page before it.

I am pretty sure that nobody will want to spend time and resources to improve (and complicate) the layout computation to solve this problem.

So, as we have a clear and robust workaround, I will close this bug report as WontFix.

Best regards. JBF
Comment 3 Dominique Boutry 2013-12-07 09:42:38 UTC
It is good, doing nothing is also my conclusion...
Comment 4 Olivier Diotte 2013-12-07 17:00:58 UTC
(In reply to comment #2)
> Hmm, it is not a good idea to anchor an image to the page and to insert a
> page before it. When you anchor an image to the page you probably think
> "that page" when the software can't do something else than "the page at that
> position".
> 

That's exactly how I use it. But when I author a document, particularly on a computer, I often change my mind and start modifying it (to then fix things like that). IMO, the software shouldn't go in a state it is impossible to get out of (well ok, I learned in this thread about the navigator, I had never used that feature before).

Would you expect Vim to display glitches in a file because you folded a part of code and then added a line before it? I wouldn't (at least, I'd be an inconvenience).

> If you anchor your image to the paragraph, it will be still on the landscape
> page if you insert a new page before it.
>

Yes, that's not what I want but, as said above, I'd like to be able to fix it.
Well, I guess we can use the navigator for that, although I think it may be a good idea for the image to still display in the page (couldn't it just clip the image if it is too big for the current page layout?).
 
> I am pretty sure that nobody will want to spend time and resources to
> improve (and complicate) the layout computation to solve this problem.
> 
> So, as we have a clear and robust workaround, I will close this bug report
> as WontFix.
> 
> Best regards. JBF


I have a long way to go before I can contribute code to LibreOffice (thanks to all contributors, your work is very appreciated) and don't know if my previous suggestion about resizing images would be hard to do.

On the other hand, it seems to me that, from a user perspective, if I anchor an image to a page, set its dimensions to 100% then change the page layout, it should adapt gracefully. On the other hand, if, as is often my case, the user also ticked "keep ratio", I guess a decision would need to be made what setting to honor.
Comment 5 Olivier Diotte 2013-12-07 17:16:45 UTC
As an addendum to my last comment:
I think my bug report's title is incorrect: I didn't know about the navigator and, from what I could tell, the image was only rendered outside the page somewhere I couldn't see. It now seems, from Dominique's comment: https://bugs.freedesktop.org/show_bug.cgi?id=70381#c1 that the image is still at the same location.

So maybe the title should be changed to something like: changing the style of a page makes anchored objects invisible or something to that effect.