Ask Your Question
1

Hyperlinks removed when copying text from browser and pasting into Writer [closed]

asked 2014-05-01 14:59:39 +0200

andy1 gravatar image

updated 2015-09-04 17:23:39 +0200

Alex Kemp gravatar image

I am a basic user of this software and am currently using LibreOffice Version: 4.2.3.3 on Windows 8 and when I am using Writer and copy text from my browser and paste it, any hyperlinks that existed in the original text are removed. For example, if I copy and paste the third paragraph of the article from this page - http://www.bbc.com/future/story/20140... - the hyperlinks connected to the underlined words are removed. This did not happen in the previous version of Writer and I have searched to try to find out if there are any default settings that have changed , but have had no luck.

I would greatly appreciate any help on this.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-25 10:27:10.465326

Comments

A very big thank you to all three of you that have responded at the time of writing this comment - you have helped solve my problem.

I wasn't aware of the "Paste Special" option and that choosing "HTML format without comments" does exactly what I wanted!

P.S. Thanks for the shortcut manj_k. Also I was using Firefox.

andy1 gravatar imageandy1 ( 2014-05-02 21:43:55 +0200 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2014-05-02 20:54:24 +0200

manj_k gravatar image

updated 2014-06-15 00:11:03 +0200

(Copy/paste from browser for me on Windows 7)

The default behavior for Ctrl+V up to (and including) LibreOffice 4.1.5 / 4.2.2 was "HTML format without comments".
I have noticed the modified behavior for LibreOffice 4.2.3 / 4.1.6:
Ctrl+V default is now "Unformatted text".

Reported as
Bug 78801 - Copying HTML from web browser - only plain text is pasted.
Status: RESOLVED FIXED (LibreOffice 4.2.5 / 4.3.0 beta 2 / 4.4.0).

Patch successfully tested (on Windows 7) with
LibreOfficeDev 4.4.0.0.alpha0+ (2014-05-29),
LibreOfficeDev 4.3.0.0.beta2 (2014-06-05),
LibreOffice 4.2.5 (RC2) (2014-06-13).

Workaround (up to LibreOffice 4.2.4)
As mentioned, you can use Ctrl+Shift+V, and then select "HTML format without comments".
You can record these steps as a macro, and assign it to a shortcut key.

The following macro, assigned to "Ctrl+Shift+W", works fine for me:

sub paste_html_no_comments
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SelectedFormat"
args1(0).Value = 123

dispatcher.executeDispatch(document, ".uno:ClipboardFormatItems", "", 0, args1())

end sub
edit flag offensive delete link more

Comments

Maybe introduced with the commits of fdo#52547?

manj_k gravatar imagemanj_k ( 2014-05-02 21:07:49 +0200 )edit
manj_k gravatar imagemanj_k ( 2014-05-29 18:16:07 +0200 )edit

Update: The bugfix will be available already in LibreOffice 4.2.5 (RC2).

manj_k gravatar imagemanj_k ( 2014-05-31 14:48:55 +0200 )edit
0

answered 2014-05-01 16:50:36 +0200

w_whalley gravatar image

updated 2014-05-01 21:25:03 +0200

I saw the same behavior using linux and LO 4.1.5. The only paste option was unformatted text with both Iceweasel (Firefox) and Chromium, however I just tried it again and now they both give html paste options.

Under Windows using LO 4.2.0 there are options to paste using HTML format. That retains the hyperlinks.

A work-around: Save a text document in html format, then paste your link-containing text. Then re-save the document in .odt format.

edit flag offensive delete link more
0

answered 2014-05-01 15:21:45 +0200

petermau gravatar image

updated 2014-05-01 17:31:41 +0200

I was able to copy the article and use the hyperlinks on my system. Ubuntu 12.04, Firefox 29.0 using LibO 4.2.3.3 and 4.3.0.0. I have the choice of UNFORMATTED TEXT or HTML under PASTE SPECIAL.

Have you checked that the hyperlink option enabled? TOOLS > AUTOCORRECT OPTIONS > OPTIONS > URL RECOGNITION. What browser are you using? Are selecting Paste Special?

I believe there have been some problems with Win8 and Internet Explorer and cut and paste. May be worth checking there. Sorry not to help further. ... Peter

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-01 14:59:39 +0200

Seen: 3,743 times

Last updated: Jun 15 '14