Bug 80282 - FORMATTING: Resizing image relative to page size doesn't work for image anchored to page
Summary: FORMATTING: Resizing image relative to page size doesn't work for image ancho...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.1 rc
Hardware: All All
: high major
Assignee: Justin L
URL:
Whiteboard: BSA target:6.1.0
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap Writer-Images
  Show dependency treegraph
 
Reported: 2014-06-20 11:47 UTC by Matthias Basler
Modified: 2018-02-23 09:05 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Book with image supposed to cover full page (140.12 KB, application/vnd.oasis.opendocument.text)
2014-06-20 11:49 UTC, Matthias Basler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Basler 2014-06-20 11:47:11 UTC
In the release notes to 4.3 (https://wiki.documentfoundation.org/ReleaseNotes/4.3#Relative_text_frame_anchoring_improvements) the new feature of being able to assign sizes for text frames (and images) relative to the full page. This works if the image is anchored to the paragraph, but produces nonsense if the image is anchored to the page at the same time.

To reproduce:
1. Open a blank writer document
2. Insert an image from file which is supposed to serve as a full page image. (For this test it need not exactly match the page aspect ratio.)
3. Double-click the image to edit the image properties.
4. Make sure "Keep aspect ratio" is checked.
5. Check Width "Relative to" and select "Whole page".
6. Check the anchor to be "On the page".
7. Klick OK to close the dialog.

Expected result:
- Image fills the page almost completely

Actual result:
- Image seems to disappear, actually it shrinks to a dot at the top center of the page.

Want some more fun?
8. Right-click this (still selected) dot and bring up the dialog again.
9. Change the width value to 95% (of the page) and close the dialog with OK.
New result: Image is completely disappeared. 

Note:
- You get exactly the same result if you do it in two steps. First scale the image to 100% of the page width and close the dialog. This will the so far expected result. If you then reopen the dialog and switch to "Anchor to page", the image will shrink to a dot. -> Bug

(P.S. I am using the German version, so option names might differ for you.)
Operating System: Windows 7
Version: 4.3.0.1 rc
Comment 1 Matthias Basler 2014-06-20 11:49:41 UTC
Created attachment 101427 [details]
Book with image supposed to cover full page

Simple test attached
Comment 2 Matthias Basler 2014-06-20 11:59:32 UTC
I should add that frames inserted into the page act similarly strange when scaled and anchored relative to the page at the same time.
Comment 3 Yousuf Philips (jay) (retired) 2014-06-23 02:40:50 UTC
Confirmed in Linux Mint with 4.3. CCed Miklos as he implemented the new feature.
Comment 4 Regina Henschel 2014-11-09 13:12:28 UTC
I see the same problem, when switching to "relative to page" from "relative to paragraph. The problem is still in Version: 4.4.0.0.alpha1+
Build ID: b167d1127e1579468a74c4414e7f4f33d9d24122
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-02_03:04:44

See bug 75060 and its attachment.
Comment 5 QA Administrators 2015-12-20 16:13:25 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2017-01-03 19:48:40 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2018-02-18 15:18:12 UTC
The option width or height "relative to page" is still broken for images anchored to page.
I see the error still in Version: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL
Comment 8 Justin L 2018-02-20 07:09:20 UTC
(In reply to Yousuf Philips (jay) (retired) from comment #3)
> CCed Miklos as he implemented the new feature...
in a series of commit leading up to https://cgit.freedesktop.org/libreoffice/core/commit/?id=1188866c1f0eb087a7e9b09bd9628f9c916feb68
Comment 9 Justin L 2018-02-20 11:53:29 UTC
proposed fix at https://gerrit.libreoffice.org/50034
Comment 10 Commit Notification 2018-02-23 08:32:36 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#80282 swpagerelsize: corner case frame size max

It will be available in 6.1.0.

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.