Bug 106832 - FORMATTING - Pasting plain text changes cell values that can be reformatted (numbers, dates, etc), no way to paste plain raw text
Summary: FORMATTING - Pasting plain text changes cell values that can be reformatted (...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-28 18:03 UTC by Dan Weiss
Modified: 2017-03-29 20:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Weiss 2017-03-28 18:03:27 UTC
Description:
This is similar to bug 103000.

Whenever you paste a block of plain text (such as tab-separated values), Libreoffice will always clear the formatting of the destination cells and reformat the text pasted in as General formatting, so anything that looks like a number, time, or date gets rewritten.  This includes misidentifying exponent signs, so if you pasted in hex values like 0E00, it treats it as 0.

In Microsoft Excel, you can set the formatting of cells to Text before pasting, and it will not modify the cells.  But you can't do that in Libreoffice.

If Libreoffice were to honor the previous formatting of cells to Text, it could avoid the issue with cells changing.

Steps to Reproduce:
1. Copy some tabular plain text onto the clipboard
2. Set the destination cell range to be formatted as Text
2. Paste into LibreOffice Calc


Actual Results:  
Text is rewritten using General formatting rules (things that look like numbers, times, and dates are changed), and existing formatting within cells that specifies Text is overwritten.

Expected Results:
It should preserve formatting, including Text format.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Comment 1 m_a_riosv 2017-03-29 10:30:18 UTC
Pasting as unformated text, selecting the column header on the import window, and Text as 'column type' doesn't change the @text format of the cell.
Comment 2 Dan Weiss 2017-03-29 16:19:54 UTC
Okay, you are correct there.  It does still maintain the cell format as Text.
However, the values still get rewritten on paste.
Comment 3 m_a_riosv 2017-03-29 20:44:10 UTC
In any case not a bug, I have not excel to test, but seems strange paste or not depending on the cell format.

Please if you like open a new report as enhancement (importance), requesting by a way to have the behaviour you want.