Bug 142930 - [Regression] Pasting unformatted text is still formatted as numbers
Summary: [Regression] Pasting unformatted text is still formatted as numbers
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-18 11:05 UTC by Dagur
Modified: 2022-01-17 03:37 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 Dagur 2021-06-18 11:05:44 UTC
Description:
I want to paste a list of numbers as text. I can not do that anymore because they are always formatted as numbers.

Steps to Reproduce:
Take a list of numbers
0123
456

And ctrl+shift+v and choose "Unformatted text". 

Actual Results:
123
456

The text is pasted but is formatted as numbers (meaning that lines starting with 0 get those 0's removed i.e. 0123 becomes 123).

Expected Results:
0123
456


Reproducible: Always


User Profile Reset: No



Additional Info:
This is a regression
Comment 1 Mike Kaganski 2021-06-18 11:25:29 UTC
(In reply to Dagur from comment #0)

What you describe is normal, and worked that way from the start IIUC. The "number" is not a format coming with pasted text, but is coming from the cells that you are *pasting to*: the plain text is inserted, processed as normal input (as if you typed those texts sin formula bar), and interpreted according to the usual rules (cells having a numeric number format try to interpret the strings as numbers). You need to have cells pre-formatted as text to avoid automatic conversion of input to numbers.

> Additional Info:
> This is a regression

This is unexpected; so please provide necessary info: in which version was it different. I have just tested with OOo 1.0.3 from 2002, and it already worked this way there.
Comment 2 Dagur 2021-06-18 11:36:24 UTC
I'll explain my routine:

I'm maintaining a list of IDs in a system that only accepts excel (1997-2003) files for importing so what I do is open the file I had, delete everything in it (ctrl+A and then the DEL key) and then paste the new IDs with ctrl+v and choose unformatted text. 
I'm copy the numbers from a google sheet.

I recently upgraded Ubuntu from 20.10 to 21.04 so I was using whatever version of Libreoffice that 20.10 had.
Comment 3 Timur 2021-06-18 11:47:29 UTC
Dagur, 
> You need to have cells pre-formatted as
> text to avoid automatic conversion of input to numbers.

I dislike that automatic Needinfo status change, here it should remain.
Comment 4 Mike Kaganski 2021-06-18 11:49:50 UTC
(In reply to Dagur from comment #2)
> paste the new IDs with ctrl+v and choose unformatted text. 

I assume you mean some other key combination (Ctrl+Shift+V maybe?), because Ctrl+V does not allow you to choose a kind of special paste, but uses default paste - automatically using the best format.

> I recently upgraded Ubuntu from 20.10 to 21.04 so I was using whatever
> version of Libreoffice that 20.10 had.

If you also used paste special -> plain text in previous version of Ubuntu, then I simply don't believe that pasting the two numbers that you cite - "0123" and "456" - were pasted differently. In *all* versions of LibreOffice, and its predecessor OpenOffice.org, pasting these *as plain text* into a cell with *numeric* number format would result in numbers being pasted.

But if you happened to clear direct cell formats in your spreadsheet that you are working with, that could be the real reason for the changed behavior, having nothing to do with OS / LibreOffice upgrade, nor with regressions: it would mean that the textual cell formatting, that was previously made incoming text to be inserted as text, was lost, and is replaced by your actions (clearing direct formatting in some way) by numeric. You could e.g. press Backspace instead of Del, and then, in the dialog, chose "Delete all", which clears formats.
Comment 5 Mike Kaganski 2021-06-18 12:05:53 UTC
If you still have a copy of your file, created at the time when it still worked, then I suggest you to open the file side-by-side with the newer one, where it doesn't work; check the workflow in it (I suspect that it will work there); and compare the relevant cell formats in older and newer copies (I suspect that older one would have Text, while newer one would have Number).
Comment 6 m_a_riosv 2021-06-18 23:52:50 UTC
If really pasting as unformatted text, import text window should appear, with that, the way is select the column and select their type as text, as always it was done.
Comment 7 Mike Kaganski 2021-06-19 07:59:51 UTC
(In reply to m.a.riosv from comment #6)

... unless it's a one-liner :-)
Comment 8 m_a_riosv 2021-06-19 09:48:18 UTC
I'm not able to find, but I think the issue about paste only one data, it's already reported.
To solve that was added:
Menu/Edit/Paste Special/Paste Special/Use Text Import Dialog
Which can be customized into context menu.
But if I'm not wrong, the report is about paste two lines.
Comment 9 QA Administrators 2021-12-17 04:06:40 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2022-01-17 03:37:57 UTC
Dear Dagur,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp