Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

(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".

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

There's also a bug report, marked as "RESOLVED NOTABUG":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text 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 now
"Unformatted text".

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

There's also a bug report, marked as "RESOLVED NOTABUG":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text 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
now "Unformatted text".

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

There's also a bug report, marked as "RESOLVED NOTABUG":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text 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".

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

There's also a bug report, marked as "RESOLVED NOTABUG":NOTABUG DUPLICATE":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text format.

fdo#77492 has been marked as a duplicate of
Bug 78801 - Copying Text + Image from Website - Image Skipped

(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".

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

There's also a bug report, marked as "RESOLVED NOTABUG DUPLICATE":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text format.

fdo#77492 has been marked as a duplicate of
Bug 78801 - Copying Text + Image HTML from Website web browser - Image Skippedonly plain text is pasted

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

(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".

There's a bug report, marked as "RESOLVED NOTABUG DUPLICATE":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text format.

fdo#77492 has been marked as a duplicate of
Bug 78801 - Copying HTML from web browser - only plain text is pasted.

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

(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".

There's a bug report, marked as "RESOLVED NOTABUG DUPLICATE":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text format.

fdo#77492 has been marked as a duplicate of
Bug 78801 - Copying HTML from web browser - only plain text is pasted.

Workaround
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

(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".

There's a bug report, marked as "RESOLVED NOTABUG DUPLICATE":
Bug 77492 - Copy Website into LibreOffice Writer leaves out images and text format.

fdo#77492 has been marked as a duplicate ofReported as
Bug 78801 - Copying HTML from web browser - only plain text is pasted.
Status: RESOLVED FIXED (LibreOffice 4.2.6 / 4.3.0 beta 2 / 4.4.0).
Successfully tested with LibreOfficeDev 4.4.0.0.alpha0+ (2014-05-29).

Workaround
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

(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.6 4.2.5 / 4.3.0 beta 2 / 4.4.0).
Successfully

Patch successfully tested with (on Windows 7) with
LibreOfficeDev 4.4.0.0.alpha0+ (2014-05-29),
LibreOfficeDev 4.3.0.0.beta2 (2014-06-05
).
The bugfix will be available also in LibreOffice 4.2.5 (RC2).

Workaround
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

(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: 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 tested (on Windows 7) with
LibreOfficeDev 4.4.0.0.alpha0+ (2014-05-29),
LibreOfficeDev 4.3.0.0.beta2 (2014-06-05).
The bugfix will be available also in
),
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