Bug 141117 - Losing indents when copy from IDEs like Visual Studio COde
Summary: Losing indents when copy from IDEs like Visual Studio COde
Status: RESOLVED DUPLICATE of bug 84318
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-19 21:37 UTC by Tobias
Modified: 2021-04-30 10:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Code snippet in VS Code and the copy in LibreOffice (194.88 KB, image/png)
2021-03-19 21:37 UTC, Tobias
Details
Code snippet in JetBrains Webstorm and the copy in LibreOffice (174.22 KB, image/png)
2021-03-19 21:38 UTC, Tobias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias 2021-03-19 21:37:24 UTC
Created attachment 170576 [details]
Code snippet in VS Code and the copy in LibreOffice

Hello,

I write code in Visual Studio Code and want to paste this with right colors and indents in LibreOffice. The problem is, that LO Writer delete all tabs and spaces which are in a line before the code. So, the code stands on the left.

It doesn't matter if I use tabs or spaces in VS Code. The indents will stored in the clipboard, a short test with a text editor (xed) shows this.

The problem appears at Visual Studio Code 1.54.3 and Atom 1.55.0. If I copy the same code from Jetbrains Webstorm or Sublime, the indents works out of the box. If I copy code from VS Code to OnlyOffice, it works like a charm!

So, I think its a file format, in which VS Code stores the code to clipboard and when LibreOffice want to insert this, they can't read the indents right.
Comment 1 Tobias 2021-03-19 21:38:14 UTC
Created attachment 170577 [details]
Code snippet in JetBrains Webstorm and the copy in LibreOffice
Comment 2 Timur 2021-03-23 09:05:50 UTC
Not common for QA to use VS. You may try to copy in intermediate file and attach. 
But then this may be the same as bug 84318. If you agree, please mark so.
Comment 3 Xisco Faulí 2021-04-30 10:10:04 UTC

*** This bug has been marked as a duplicate of bug 84318 ***