Bug 108503 - In HTML pastes some colours are lost
Summary: In HTML pastes some colours are lost
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2017-06-13 08:59 UTC by Marco A.G.Pinto
Modified: 2017-06-25 21:34 UTC (History)
2 users (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 Marco A.G.Pinto 2017-06-13 08:59:00 UTC
Hello!

When I paste HTML pages into LO, some colours are lost PLUS all the indent is damaged.

Steps to reproduce:
1) Open with Firefox:
http://marcoagpinto.cidadevirtual.pt/alexchiu.html

2) Select all text (CTR+A)

3) Paste the contents into LO

4) Switch to Web view.

5) All orange text in dates is lost.
Comment 1 Buovjaga 2017-06-23 12:35:14 UTC
The colours are defined in a CSS style. In this case it is best to save the page as HTML (so the .css files get saved as well) and then open it in Writer.

If the CSS styles were inline with the HTML element, then LibreOffice would understand them.

The root problem is, how the copy command in your operating system would know how to put the external CSS rules in your clipboard. People have made special tools for something like this: https://stackoverflow.com/questions/4911338/tools-to-selectively-copy-htmlcssjs-from-existing-sites

I will close this.
Comment 2 Marco A.G.Pinto 2017-06-23 16:16:05 UTC
(In reply to Buovjaga from comment #1)
> The colours are defined in a CSS style. In this case it is best to save the
> page as HTML (so the .css files get saved as well) and then open it in
> Writer.
> 
> If the CSS styles were inline with the HTML element, then LibreOffice would
> understand them.
> 
> The root problem is, how the copy command in your operating system would
> know how to put the external CSS rules in your clipboard. People have made
> special tools for something like this:
> https://stackoverflow.com/questions/4911338/tools-to-selectively-copy-
> htmlcssjs-from-existing-sites
> 
> I will close this.


Buovjaga,

The example URL I gave is from my personal webpage and I don't use external CSS files.

I edit the files with M$ Expression Web 4 and save as HTML.

Could you reconsider closing this ticket?
Comment 3 Buovjaga 2017-06-23 16:30:02 UTC
(In reply to Marco A.G.Pinto from comment #2)
> Buovjaga,
> 
> The example URL I gave is from my personal webpage and I don't use external
> CSS files.
> 
> I edit the files with M$ Expression Web 4 and save as HTML.
> 
> Could you reconsider closing this ticket?

Well, external file or a <style> definition in the head, it does not matter. It only understands inline styles such as:
<p style="color:blue;font-size:46px;">