Bug 129225 - Copy & paste HTML with pictures from web should results in scaled pictures sizes which fit the page margins
Summary: Copy & paste HTML with pictures from web should results in scaled pictures si...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HTML-Paste
  Show dependency treegraph
 
Reported: 2019-12-06 09:19 UTC by d.klinkenberg
Modified: 2021-06-11 06:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Screenshot marked text (249.72 KB, image/png)
2019-12-09 15:02 UTC, d.klinkenberg
Details
resulting LO odt file (1.68 MB, application/vnd.oasis.opendocument.text)
2019-12-09 15:03 UTC, d.klinkenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description d.klinkenberg 2019-12-06 09:19:15 UTC
Description:
I often copy and paste poorly formatted web-content in a writer-document for better handling and private documentation.
So far so good .... BUT pictures are often do not fit the page width, which is annoying when they are large and a lot bigger than the page magins.
Suggestion: Please automatically scale the pasted pictures so that they at least fit within the page margins.

Steps to Reproduce:
1.Paste some web content with pictures from firefox to LO
2.
3.

Actual Results:
pasted pictures are often not scaled so that they stay over the page margins

Expected Results:
pictures are automatically scaled to stay within the page margins


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.3.2.0+
Build-ID: 1:6.3.3-2
CPU-Threads: 4; BS: Linux 5.3; UI-Render: Standard; VCL: kde5; 
Gebietsschema: de-DE (de_DE.utf8); UI-Sprache: de-DE
Calc: threaded
Comment 1 Samuel Mehrbrodt (allotropia) 2019-12-06 16:40:53 UTC
Agree, this is a major annoyance when pasting pictures. Should definitely set some max size on those, not just take whatever size the pictures have.
Comment 2 Timur 2019-12-08 08:40:56 UTC
Reporter, even if this is clear, please give examples, so that reproducer doesn't have to look for page with sufficiently large image.
Comment 3 d.klinkenberg 2019-12-08 09:22:44 UTC
Some quick examples, but by far not the worst, see e.g.

(1) https://www.golem.de/news/funkstandards-womit-funkt-das-smarte-heim-1910-143420.html


(2) https://idaflieg.de/?p=846


(3) https://idaflieg.de/?p=891

and do in the browser ctrl+A, ctrl+c and in LO ctrl+v
Comment 4 Timur 2019-12-09 14:38:33 UTC
Well, something is not clear here so I set back Unconfirmed.
Title is not proper, because copying pictures "results in scaled pictures sizes which are fit the page margins".
What's explained in Comment 3 is else, after Ctrl+A of the whole web page to have paste in page area and not in margins.
And that similar or duplicate to bug 92096.
Comment 5 d.klinkenberg 2019-12-09 14:47:13 UTC
Ctrl+A was my lazyness here....

The behavoir is also present if you mark the contest inclusive pictures selectively by mouse.

If this unfortunate behavior is already known I hope it will be changed within the next release.

Keep on good work!
Comment 6 Timur 2019-12-09 14:52:21 UTC
Please make a link to the exact image and attach a screenshot of how it's pasted. 
I tried some (with just one LO version, though), but it was fine.
Comment 7 d.klinkenberg 2019-12-09 15:02:13 UTC
Created attachment 156436 [details]
Screenshot marked text

Marked the text by mouse
Comment 8 d.klinkenberg 2019-12-09 15:03:36 UTC
Created attachment 156437 [details]
resulting LO odt file
Comment 9 d.klinkenberg 2019-12-09 15:04:28 UTC
Was https://idaflieg.de/?p=891
Comment 10 Timur 2019-12-09 17:21:36 UTC
OK, we have steps now and I update the title.
Comment 11 stragu 2021-06-11 05:33:47 UTC
Reproducible in:

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 17694c906f94a195a2d5086e0e87afa1c852107b
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-09_20:52:06
Calc: threaded

With the steps:

1. Go to https://idaflieg.de/?p=891
2. Select a range that includes the last picture and some of the surrounding text
3. Paste into new Writer document

Actual result:

Image overflows to the right

Expected result:

The picture is resized (while conserving ratio) to fit the page (vertically or horizontally, whichever results in the biggest picture).

Note that simply copying and pasting the picture on its own will resize as expected.