Description: Opening the image properties dialog for an inserted external image (key F4) is often misleading with settings. a. When selecting the main position and dimensioning tab, values entered can give unexpected results: entering a percentage (without a "relative" flag set) instead of a dimension produces a strange effect. As an example, with a 3.86 cm wide image, entering "50%" results in a 21.0 cm wide image b. The results in the cropping tab are completely astray from what the "keep proportions"/"keep dimensions" selection suggests: Even with "keep proportions" flagged, the width/height percentages/dimensions can be set to any non-proportional value. Even worse if you "substitute" an image (from the contextual menu with a right-click on the image), as it retains the old percentages. c. Different proportions on imported vectorial images, containing an unknown font, may even result in a catastrophic final effect on screen rendered image (text doesn't scale proportionally in the two directions, with unexpected overflows) Steps to Reproduce: 1. I created a simple diagram with yED and exported it to SVG; this tests the unknown fonts, as it forcibly uses "Dialog", which isn't present on my system 2. Import the SVG image 3. Select the image and open it with F4 image settings 4. Fiddle with settings as described above Actual Results: An unexpected percentage entered produces a weird change in dimensions. There's no automatic proportional resize in percentage. Unproportional resizing fails to render correctly fonts in vectorial images. Expected Results: If a percentage has no clear meaning in a field value, then it should be unacceptable as a value or have a clearer effect (e.g. affecting the dimension itself). Proportional resize could result in a proportional resize, that would make sense. Font resizing in vectorial images should follow the proportion of the rest of the image. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 12; OS: Windows 10.0 Build 22631; UI render: default; VCL: win Locale: it-IT (it_IT); UI: it-IT Calc: threaded Note also that this behavior is the same with version 24.2.0.3
Created attachment 192402 [details] Short test document
I think % a for when relative is marked, just below the field. https://help.libreoffice.org/24.2/en-US/text/swriter/01/05060100.html?System=WIN&DbPAR=WRITER&HID=modules/swriter/ui/frmtypepage/FrameTypePage#bm_id3147406
@m_a_riosv That would be fine. However, a % is accepted anyway, with the weird behavior that you can see for yourself (pressing Tab or Enter, after filling the field with something as "50%")
(In reply to luc0x61 from comment #3) > @m_a_riosv That would be fine. However, a % is accepted anyway, with the > weird behavior that you can see for yourself (pressing Tab or Enter, after > filling the field with something as "50%") It is not really accepted, but ignored. When you enter 50%, it thinks you want to make it 50 cm wide and caps it at 21 cm, the page width. It seems intuitive to automatically activate "Relative to" when percentages have been input, but let's confirm with UX team.
And if "[x] Relative" is checked a string like "10 cm" makes it an absolute parameter? And how about inch, km, px, foo... I proposed some kind of unit switch control-side in bug 72662 but this dialog is a bit of a stretch. We could also just not accept invalid input (units, comma, separators...), or have an extra spin edit for this type like Width: (o) absolute [ ] cm ( ) relative [ ] % to [Entire paragraph area] But since absolute and relative values are converted when clicking the '[ ] Relative to' option, I can follow the idea of auto-checking if % is part of the string. If the checkbox is checked a plain value would be treated as percent, any other text (2cm, 5in, 7foo) makes it an absolute value, ie. the '[ ] Relative to' is automatically unchecked.