Bug 67764 - FORMATTING: Spaces removed when pasting from windows clipboard data stored as HTML format
Summary: FORMATTING: Spaces removed when pasting from windows clipboard data stored as...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2013-08-05 04:00 UTC by nubile
Modified: 2023-12-29 03:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Nirsoft InsideClipboard file showing the state of my clipboard after copying from Visual Studio, and a text file showing only the contents of the HTML entry on the clipboard (6.50 KB, application/x-tar)
2013-08-05 04:00 UTC, nubile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nubile 2013-08-05 04:00:44 UTC
Created attachment 83641 [details]
Nirsoft InsideClipboard file showing the state of my clipboard after copying from Visual Studio, and a text file showing only the contents of the HTML entry on the clipboard

Problem description: Whenever I copy text from the IDE in Microsoft Visual Studio, and try to paste into a LibreOffice Writer document, all spaces are removed. Pasting into other programs such as Microsoft Wordpad, the formatting is correct and spaces appear. 

Using Nirsoft InsideClipboard, I can see that when I copy text in Visual Studio, the data is stored as several different clipboard types, one of them with format ID number 49426 (HTML Format).

In the HTML data on the clipboard, all spaces are stored as  , the html escape code for a space. It appears that Writer simply removes these instead of pasting them as spaces.

Steps to reproduce:
1. Copy text from the IDE in Microsoft Visual Studio 
1a. Alternatively, use Nirsoft InsideClipboard to load the attached .clp file to the clipboard
1b. Alternatively, use some other method that stores data on the clipboard as ID 49426 that uses   escape codes for all spaces. The attached .txt file contains an example.
2. Paste the data in Writer

Current behavior: The text appears in Writer properly formatted except all spaces are removed. Pasted text contains lines like:
struct__device_builtin__cudaMemcpy3DPeerParms

Expected behavior: Spaces should appear in the pasted text, yielding lines like:
struct __device_builtin__ cudaMemcpy3DPeerParms

Known workarounds: If I use "Paste Special" and choose "Formatted Text [RTF]", I will get formatted text with spaces.

              
Operating System: Windows 7
Version: 4.1.0.4 release
Comment 1 Mike Kaganski 2013-08-05 08:46:41 UTC
Reproducible with 4.1.0.4 and 3.3.0.4, as well as with AOO 4.0 under Win7x64 and clipboard data from Attachment 83641 [details] using InsideClipboard.

Can not reproduce this with VS 2012 Express, it looks that it only stores text to clipboard as text and RTF. This, however, doesn't change things: the bug in LO exist.
Comment 2 nubile 2013-08-06 18:37:06 UTC
(In reply to comment #1)
> Can not reproduce this with VS 2012 Express, it looks that it only stores
> text to clipboard as text and RTF. This, however, doesn't change things: the
> bug in LO exist.

Thanks for verifying this. I looked into this a bit more and found that Visual Studio only copies to the clipboard in HTML format when a certain extension is installed and enabled: Microsoft's Productivity Power Tools 2012

As a workaround for my specific instance of this bug, I can disable that plugin. But that obviously doesn't repair the bug in Writer.
Comment 3 QA Administrators 2015-04-19 03:20:56 UTC Comment hidden (obsolete)
Comment 4 Mike Kaganski 2015-04-19 06:31:38 UTC
Still reproducible with Version: 4.4.3.1
Build ID: b2f347f2ac68821efc00b6f1793cda90af748118
Locale: ru_RU
under Win7x64
Comment 5 Buovjaga 2016-07-28 19:28:21 UTC
*** Bug 101158 has been marked as a duplicate of this bug. ***
Comment 6 Buovjaga 2016-07-28 19:28:46 UTC
*** Bug 101150 has been marked as a duplicate of this bug. ***
Comment 7 Paolo Meozzi 2016-07-28 21:32:00 UTC
bug 101150 is not the same bug!
In Writer 5.2.0 rc3, the paste operation produces the default text, without formatting, but with spaces.
Paste Special only defines the "plain text"; missing the "formatted text [RTF]" option.
Comment 8 Paolo Meozzi 2016-10-01 16:38:02 UTC
In Writer 5.2.2 the problem remains. There is no longer the RTF option for the rich text.
If I copy text from SharpDevelop, the HTML option is used (and it seems work fine). But if I copy from Visual Studio, it is used the flat text option. (The only option) 
It 's really, really annoying that this feature (RTF copied from other applications) does not work consistently since the first version of Libreoffice!
Comment 9 Mike Kaganski 2016-10-02 07:43:22 UTC
Comment 8 isn't relevant here, obviously posted by mistake, because intended for bug 101150 that was mistakenly marked as duplicate of this.

Though, this specific bug (about absent spaces in text from VS pasted as HTML) remains in current master Version: 5.3.0.0.alpha0+
Build ID: d88ba9042cc68cd6c8aecd1c54c79f11d0887624
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: ru-RU (ru_RU); Calc: group
Comment 10 QA Administrators 2017-12-27 03:25:10 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2019-12-28 03:31:23 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2021-12-28 07:00:27 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2023-12-29 03:11:55 UTC
Dear nubile,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug