Bug 41119 - Copy SVG Code Directly into LibreOffice to Render Pictures
Summary: Copy SVG Code Directly into LibreOffice to Render Pictures
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2011-09-22 07:10 UTC by vernonl63
Modified: 2019-09-20 11:31 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of Current SVG Copy and Paste in LibO-dev 3.5.0 (294.53 KB, application/zip)
2011-09-23 07:01 UTC, rk601
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vernonl63 2011-09-22 07:10:39 UTC
Dear LibreOffice Gurus:

Congratulations to everyone involved for winning the “InfoWorld BOSSIE – Best of Open Source – Awards 2011” for LibreOffice.

LibreOffice is getting better all the time, and its ability to use Scalable Vector Graphics (SVG) is improving. It appears that a goal of LibreOffice is to fully integrate DRAW into the LibreOffice suite, which will simplify exchanging graphics with all components of the suite. For example, if you create an image in Draw, reusing it in a Writer document is as simple as copying and pasting the image. You can also work with drawings directly from within Writer or Impress, using a subset of the functions and tools from Draw.

Even-though Draw’s functionality is extensive I was hoping that an enhancement will be made.

There are numerous SVG files available. It is very easy to obtain SVG code with a Web browser, select the SVG code, and copy that SVG code into another application or file. Please modify the LibreOffice suite so that SVG code can be pasted directly into the suite without having to create a new SVG file and then Inserting that new SVG file into LibreOffice.

Here are the proposed steps:

1. Launch a Web browser.
2. Navigate to the desired SVG picture (for example:  http://www.openclipart.org/people/gustavorezende/silhouettesurfer.svg).
3. With the Web Browser, Right Click the mouse, then choose View Page Source.
4. Select the SVG code and copy it.
5. Launch LibreOffice.
6. Choose File, New, Drawing.
7. Select Insert, Picture, (SVG Code). Note (SVG Code) currently does not appear.
8. Paste the previously copied SVG code into LibreOffice.
9. Click an OK button or Cancel to quit.
10. The SVG Picture will appear within document.

Please note that it is possible to insert a Picture with the Insert, Picture, From File.... command. However the ability to skip the file creation and loading steps would be a great time saver and nice enhancement.

Thank you!
Comment 1 rk601 2011-09-23 07:01:43 UTC
Created attachment 51544 [details]
Example of Current SVG Copy and Paste in LibO-dev 3.5.0

We agree! The ability to copy and paste SVG directly into LibreOffice would be a time saver and great enhancement!

As an example, we tested the desired enhancement in the Master:

LibO-dev 3.5.0 
Build ID: 47a101d-ea64cb6-1e62dcb-725236
On OSX 10.6.8

Located at:

http://dev-builds.libreoffice.org/daily/MacOSX_10.6.7_Intel_no-moz/master/2011-09-22_04.45.55/

with

master~2011-09-22_04.45.55_LibO-Dev_OOO350m1_MacOS_x86_install_en-US.dmg 

Steps to reproduce:

1. Use a Web browser or Graphic Editor to find an SVG picture (we used both).
2. Copy the SVG picture.
3. Paste the SVG picture directly into LibreOffice.
Expected results: SVG will appear within WRITER, DRAW, etc.
Actual results (vary): Either the SVG code (NOT PICTURE) appears or an Error appears.

For "SVG Copy and Paste from Web Browser.png" the copied SVG picture resulted in the insertion of the SVG code.

For "SVG Copy and Paste from Graphic Editor.png" the copied SVG picture resulted in the error "Requested clipboard format is not available."

Expected result is shown in "SVG Insert From File.png".

It would be nice to see this enhancement in LibO 3.5.0.
Comment 2 Björn Michaelsen 2011-12-23 12:33:56 UTC Comment hidden (obsolete)
Comment 3 sasha.libreoffice 2012-01-17 08:41:13 UTC
looks like duplicate of 
Bug 35146 - copy-paste from InkScape pastes text instead of image on Linux
Comment 4 sasha.libreoffice 2012-02-03 04:33:40 UTC
but it is not duplicate, here functionality should do this:
1) Clipboard contains text
2) this text inserts as svg picture
(I think it is be better use for this Edit->paste special or Insert->Picture->From clipboard)
Comment 5 Samuel Mehrbrodt (CIB) 2013-04-23 16:18:01 UTC
Copy & pasting an SVG Image works for me in 4.0.2.
I tried copying it from the Gnome Image Viewer, then pasted it in LibreOffice and the Image appeared.

Bug 35146 deals with wrongly recognized MIME types in the clipboard. Thus I'm closing this bug.
Comment 6 sasha.libreoffice 2013-04-24 10:40:01 UTC
Sorry, but here copied should be text, not an image.
And inserted as image.
in 4.0.2 not implemented yet.
IMHO this is more naturally to implement as extension written on Basic or Python
Comment 7 Samuel Mehrbrodt (CIB) 2013-04-24 11:48:01 UTC
But why would you want to copy a SVG file as text when you can just copy&paste the Image?
I don't think this feature belongs to the Core.
Buf if someone wants to write an extension, he can do so of course.
Comment 8 Joel Madero 2013-05-15 02:33:50 UTC
This is a valid request but I agree, not so sure why it's better than current solution. Marking as NEW as there's nothing wrong with the request per say, just not sure if/when it'll be implemented.

If user or someone can explain the benefit of this method, maybe we'd have a clearer understanding of the need for this feature.