Bug 165332 - Calc: Copy of multiple lines (as unformatted text) interprets " \t" as two column breaks
Summary: Calc: Copy of multiple lines (as unformatted text) interprets " \t" as two co...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-02-19 11:04 UTC by Martin Krsek
Modified: 2025-04-15 12:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Text file described in bug description (24 bytes, text/plain)
2025-02-19 11:53 UTC, Martin Krsek
Details
Screenshsot (80.63 KB, image/png)
2025-02-19 21:39 UTC, m_a_riosv
Details
Copy of one file. File you can see in hex. (65.04 KB, image/png)
2025-02-20 15:25 UTC, Martin Krsek
Details
Result of copy of one line. You can see. It is OK. (40.51 KB, image/png)
2025-02-20 15:27 UTC, Martin Krsek
Details
Copy of two lines. (54.48 KB, image/png)
2025-02-20 15:28 UTC, Martin Krsek
Details
Import window when inserting two lines (autodect). (68.02 KB, image/png)
2025-02-20 15:36 UTC, Martin Krsek
Details
Result of copy of two lines. (20.29 KB, image/png)
2025-02-20 15:37 UTC, Martin Krsek
Details
about (142.15 KB, image/png)
2025-02-20 15:38 UTC, Martin Krsek
Details
When you choose tab as separator manualy, it works (36.60 KB, image/png)
2025-02-20 15:42 UTC, Martin Krsek
Details
I downgraded to version 24.2.3.2. There is no autodetect option, but default values are OK. (50.50 KB, image/png)
2025-02-20 16:12 UTC, Martin Krsek
Details
Comma and tab are both interpreted as column break. (41.55 KB, image/png)
2025-02-21 13:56 UTC, Martin Krsek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krsek 2025-02-19 11:04:03 UTC
Description:
1) Copy of ONE LINE of unformatted text understand " \t" as <space><new_column>.
2) Copy of MULTIPLE LINES of unformatted text understand " \t" as <new_column><new_column>.

It understood as <space><new_column> in both cases in version 24.2.

Steps to Reproduce:
Case a:
1. Copy text "a1 	b1" (ie. "a1 \tb1") as unformatted text (Ctrl + Shift + V) in cell A1.
2. Result: "a1 " in A1 cell, "b1" in B1 cell. It WORKS as expected (and as 24.2 version).
------------------------
Case b:
1. Copy text "a2 	b2
a3 	b3" (ie. "a2 \tb2\r\la3 \tb3") as unformatted text (Ctrl + Shift + V) in cell A2.
2. Result: "a2" in A2 cell, cell B2 empty, "b2" in C2 cell, "a3" in A3 cell, cell B3 empty, "b3" in C3 cell. It IS WRONG (and different than in 24.2 version).

Actual Results:
Interpretation " \t" as <new_column><new_column>.

Expected Results:
Interpretation " \t" as <space><new_column>.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: threaded
Comment 1 m_a_riosv 2025-02-19 11:38:39 UTC
Please attach a sample source file to make the copy.

It seems that the separators were not set correctly in the box.
Comment 2 Martin Krsek 2025-02-19 11:53:02 UTC
Created attachment 199308 [details]
Text file described in bug description
Comment 3 Martin Krsek 2025-02-19 12:03:51 UTC
Test file is

a1<space><tab>b1<new_line>
a2<space><tab>b2<new_line>
a3<space><tab>b3<new_line>

I think that for test is sufficient any other text file, where are <space><tab> and multiple lines.
Comment 4 Martin Krsek 2025-02-19 12:20:34 UTC
I was wrong.

--------------------------

Copy of text

a2<space><tab>b2<new_line>
a3<tab>b3<new_line>

(as unformatted text) is interpreted

cell A2: "a2<space>", cell B2: "b2", cell A3: "a3", cell B3: "b3".

--------------------------

But copy of text

a2<space><tab>b2<new_line>
a3<space><tab>b3<new_line>

(as unformatted text) is interpreted

cell A2: "a2", cell C2: "b2", cell A3: "a3", cell C3: "b3".

--------------------------

And copy of text

a2<tab>b2<new_line>
a3<space><tab>b3<new_line>

(as unformatted text) is interpreted

cell A2: "a2", cell B2: "b2", cell A3: "a3<space>", cell B3: "b3".

--------------------------

It seems like <space><tab> must be in all rows...
Comment 5 m_a_riosv 2025-02-19 21:39:21 UTC
Created attachment 199332 [details]
Screenshsot

Please take a look at the screenshot.
Comment 6 Martin Krsek 2025-02-20 15:25:30 UTC
Created attachment 199344 [details]
Copy of one file. File you can see in hex.
Comment 7 Martin Krsek 2025-02-20 15:27:06 UTC
Created attachment 199345 [details]
Result of copy of one line. You can see. It is OK.
Comment 8 Martin Krsek 2025-02-20 15:28:29 UTC
Created attachment 199346 [details]
Copy of two lines.
Comment 9 Martin Krsek 2025-02-20 15:36:08 UTC
Created attachment 199347 [details]
Import window when inserting two lines (autodect).
Comment 10 Martin Krsek 2025-02-20 15:37:38 UTC
Created attachment 199348 [details]
Result of copy of two lines.
Comment 11 Martin Krsek 2025-02-20 15:38:35 UTC
Created attachment 199349 [details]
about
Comment 12 Martin Krsek 2025-02-20 15:42:37 UTC
Created attachment 199350 [details]
When you choose tab as separator manualy, it works
Comment 13 Martin Krsek 2025-02-20 16:12:23 UTC
Created attachment 199353 [details]
I downgraded to version 24.2.3.2. There is no autodetect option, but default values are OK.
Comment 14 m_a_riosv 2025-02-20 22:30:01 UTC
Maybe it could be an enhancement request, with Autodetect not being a default option, but like any other option, if it was selected last time.

Let's ask the UX team.
Comment 15 Martin Krsek 2025-02-21 08:40:00 UTC
But there is inconsistency between one line copy ("<space><tab>" is interpreted as "<space><new_column>") and multi line copy ("<space><tab>" is interpreted "<new_column><new_column>").

I think that default column break SHOULD be <tab> or <space> (according to autodetect) but not both. In all cases. (Do you think that you will ever import text where you need that both <tab> and <space> is interpreted as column break? If so it is very very rare case. And you can choose it manually anyway.)

And it is inconsistent with previous versions...

Yah, workaround is easy: manually select only <tab> as column break. But it is annoying repeating it every copy.
Comment 16 Martin Krsek 2025-02-21 13:56:48 UTC
Created attachment 199363 [details]
Comma and tab are both interpreted as column break.

1,2<tab>3,4
5,6<tab>7,8

is interpreted as

1<new_column>2<new_column>3<new_column>4
5<new_column>6<new_column>7<new_column>8

(comma is decimal point in Czech language)
Comment 17 Martin Krsek 2025-02-21 14:13:50 UTC
I understand that it means you need hierarchy of separators.

For example "1,2<tab>3,4" should be interpreted "1,2<new_column>3,4", not "1<new_column>2<tab>3<new_column>4" (ie. <tab> has higher priority than comma).

But one line copy works so.

And I think that copy of one line of text and copy of multiple lines of text should be consistent.
Comment 18 Heiko Tietze 2025-02-27 08:42:27 UTC
(In reply to Martin Krsek from comment #0)
> Case a:
> 1. Copy text "a1 	b1" (ie. "a1 \tb1") as unformatted text (Ctrl + Shift + V)
> in cell A1.
> 2. Result: "a1 " in A1 cell, "b1" in B1 cell. It WORKS as expected (and as
> 24.2 version).
> ------------------------
> Case b:
> 1. Copy text "a2 	b2
> a3 	b3" (ie. "a2 \tb2\r\la3 \tb3") as unformatted text (Ctrl + Shift + V) in
> cell A2.
> 2. Result: "a2" in A2 cell, cell B2 empty, "b2" in C2 cell, "a3" in A3 cell,
> cell B3 empty, "b3" in C3 cell. It IS WRONG (and different than in 24.2
> version).

I can confirm the issue. And at least it is inconsistent. Regression?
Comment 19 mikhail.machine 2025-04-15 12:17:14 UTC
I did the bibisecting with the win64-25.2 repository and got the commit 565b619d57a3b98b0826c4b49dee6606f9ae70e0.

https://bugs.documentfoundation.org/show_bug.cgi?id=160582