Hyperlinks removed when copying text from browser and pasting into Writer

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/20140430-why-bad-inventions-are-good - 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.

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.

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

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.

(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

Maybe introduced with the commits of fdo#52547?

See also: copying from a web browser

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