Bug 125248 - LibreOffice Calc tabs in data not displaying and/or preserved
Summary: LibreOffice Calc tabs in data not displaying and/or preserved
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 149881 (view as bug list)
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2019-05-13 01:35 UTC by Little Girl
Modified: 2023-10-22 18:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A copy of the example.csv file used in the tests. (15 bytes, text/csv)
2019-05-13 12:38 UTC, Little Girl
Details
Screenshot showing the issue (10.89 KB, image/png)
2019-12-11 09:12 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Little Girl 2019-05-13 01:35:16 UTC
Description:
Tabs that are pasted in or that are brought in by opening or importing a .csv file that contains tabs in its data are not always displayed or preserved in the import dialog and/or the cell and/or the input line.


Steps to Reproduce:
THE EXAMPLE DATA USED IN THE TESTS:

The tests were done with the example.csv file that was created in a text editor with this line of data, containing a word followed by a single tab followed by a word followed by two tabs followed by another word:

one	two		done

Test 1:
1) Import the example.csv file into the spreadsheet program using commas as the delimiter.
2) Check whether tabs in the data are displayed in the import dialog.
3) Check whether tabs in the data are displayed in the input line.
4) Check whether tabs in the data are displayed in cell A1.
5) Verify whether the white space (if any) consists of tabs or spaces by moving the cursor across the data using the keyboard.
6) Copy the data in the cell.
7) Paste the copied data into a new text file.
8) Verify whether the white space (if any) consists of tabs or spaces by moving the cursor across the data using the keyboard or by displaying hidden characters in the text file

Test 2:
 1) Open the example.csv file in a text editor.
 2) Copy the data in it.
 3) Open the spreadsheet program.
 4) Paste the copied data into cell A1.
 5) Check whether tabs in the data are displayed in the input line.
 6) Check whether tabs in the data are displayed in cell A1.
 7) Verify whether the white space (if any) consists of tabs or spaces by moving the cursor across the data using the keyboard.
 8) Copy the data in the cell.
 9) Paste the copied data into a new text file.
10) Verify whether the white space (if any) consists of tabs or spaces by moving the cursor across the data using the keyboard or by displaying hidden characters in the text file.
11) Save the spreadsheet as the result.csv file.
12) Close the spreadsheet program.
13) Import the result.csv file into the spreadsheet program using commas as the delimiter.
14) Repeat Test 1 steps 2 through step 7.


Actual Results:
Tests were done on an older version of LibreOffice Calc, a newer version of LibreOffice Calc, and then Apple Numbers and Microsoft Excel as a comparison of behavior.
==========================================================================================================
LIBREOFFICE CALC v5.1.6.2 TESTS:

Test 1:
	When the example.csv file is imported into LibreOffice Calc using commas as the delimiter, tabs in the data are displayed in the import dialog. Once the data is imported, the tabs are preserved and displayed in the input line, but are not displayed in the cell (all visible white space has been silently stripped from the cell). The tabs are preserved when copying the cell data and pasting it into a text file.

Test 2:
	When the example data is manually pasted into cell A1 in a new instance of LibreOffice Calc, the tabs are displayed in the input line and in the cell. The tabs are preserved when copying the cell data and pasting it into a text file. When saving the contents of the spreadsheet as result.csv, the tabs are immediately and silently converted to spaces.
==========================================================================================================
LIBREOFFICE CALC v6.0.7.3 TESTS:

Test 1:
	When the example.csv file is imported into LibreOffice Calc using commas as the delimiter, tabs in the data are displayed in the import dialog. Once the data is imported, the tabs are displayed in the input line with a slightly larger gap for the sequence of tabs, but when the keyboard is used to move the cursor along the input line, the sequence of tabs behaves as one tab. The tabs are displayed in the cell with a significantly larger gap for the sequence of tabs, but when the keyboard is used to move the cursor along the cell contents, the sequence of tabs behaves as one tab. When the contents of the cell are copied and pasted into a text file, the tabs have been preserved.

Test 2:
	When the example data is manually pasted into cell A1 in a new instance of LibreOffice Calc, the tabs are immediately and silently converted to spaces.
==========================================================================================================
APPLE NUMBERS TESTS:

Test 1:
	When the example.csv file is opened in Numbers, tabs in the data are displayed in the cell with a significantly larger gap for a sequence of tabs. When the keyboard is used to move the cursor along the data in the cell, the sequence of tabs behaves as separate tabs. When the contents of the cell are copied and pasted into a text file, the tabs have been preserved. When clicking the "Adjust Settings" button, tabs in the data are displayed in that diaglog with a significantly larger gap for a sequence of tabs.

Test 2:
	When the example data is manually pasted into cell A1 in a new instance of Numbers, the tabs are displayed in the cell with the sequence of tabs being significantly larger than the single tab. When the keyboard is used to move the cursor along the data in the cell, the sequence of tabs behaves as separate tabs. When the cell contents are copied and pasted into a text file, the tabs have been preserved. When saving the contents of the spreadsheet as result.csv, closing the file, and opening it in Numbers again, tabs in the data are displayed in the cell with a significantly larger gap for the sequence of tabs and when the keyboard is used to move the cursor along the cell contents, the sequence of tabs behaves as two tabs. When the contents of the cell are copied and pasted into a text file, the tabs have been preserved.
==========================================================================================================
MICROSOFT EXCEL TESTS:

Test 1:
	When the example.csv file is imported into Excel using commas as the delimiter, once the data is imported, tabs are not displayed in the input line or in the cell. When the contents of the cell are copied and pasted into a text file, the tabs have been preserved.

Test 2:
	When the example data is manually pasted into cell A1 in a new instance of Excel, the tabs are immediately and silently converted to spaces.
==========================================================================================================
SUMMARY:

	This is considered unexpected behavior:
		* The display of tabs in the input line and cell not being consistent with one another.
		* The sequence of tabs behaving as a single tab in the input line when the keyboard is used to move across the data.
		* The silent removal of displayed tabs from the input line and/or cell.
		* The silent conversion of tabs to spaces in the cell on paste.
		* The silent conversion of tabs to spaces in the cell on saving to .csv format.

	LibreOffice Calc and Microsoft Excel show unexpected behaviors. Apple Numbers shows no unexpected behaviors.


Expected Results:
Expected results are that tabs would display as tabs in the input dialog, in the input line, and in the cell, and that they would be preserved when copied from a cell to a text file or other document.



Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
POSSIBLY RELATED, BUT POSSIBLY A SEPARATE BUG:

It used to be possible to use Ctrl+Tab to enter a tab in the cell data, but it cannot currently be done. I'd say that's also unexpected behavior because tabs are legitimate characters that are present on keyboards, so it should be possible to create them inside of spreadsheet cells without having to copy them from elsewhere and paste them in.

As requested here is the information from Help - About LibreOffice for each of the versions of LibreOffice tested for this bug report:

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial6
CPU Threads: 6; OS Version: Linux 4.15; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0~18.04.5
CPU Threads: 1; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 m_a_riosv 2019-05-13 12:11:43 UTC
Can you attach the sample file.
Comment 2 Little Girl 2019-05-13 12:38:41 UTC
Created attachment 151360 [details]
A copy of the example.csv file used in the tests.

Sure. Here it is.
Comment 3 QA Administrators 2019-05-14 03:00:58 UTC Comment hidden (obsolete)
Comment 4 raal 2019-05-14 16:36:45 UTC
(In reply to Little Girl from comment #0)

> LIBREOFFICE CALC v6.0.7.3 TESTS:
> 
> Test 1:
> 	When the example.csv file is imported into LibreOffice Calc using commas as
> the delimiter, tabs in the data are displayed in the import dialog. Once the
> data is imported, the tabs are displayed in the input line with a slightly
> larger gap for the sequence of tabs, but when the keyboard is used to move
> the cursor along the input line, the sequence of tabs behaves as one tab.
> The tabs are displayed in the cell with a significantly larger gap for the
> sequence of tabs, but when the keyboard is used to move the cursor along the
> cell contents, the sequence of tabs behaves as one tab. When the contents of
> the cell are copied and pasted into a text file, the tabs have been
> preserved.

I have to press right arrow key twice. First key press stay at the position and second one skip two tabs.
LO 4.1 and 6.3

> 
> Test 2:
> 	When the example data is manually pasted into cell A1 in a new instance of
> LibreOffice Calc, the tabs are immediately and silently converted to spaces.

Confirm with 6.3 and 4.1.

Not sure if it's a bug, leaving unconfirmed.
Comment 5 Little Girl 2019-05-14 18:04:20 UTC
Thank you for checking into it.

If it helps any in deciding whether it's a bug or not, there's a setting for tabs in the Tools -- Options... -- LibreOffice Calc -- General tab section. Its default setting for tabs is 0.50" (quite a bit bigger than a space). That setting would only exist if LibreOffice Calc not only accepts tabs and extends you the courtesy of choosing their size, but also allows you to use them inside of cells. Tabs are also mentioned in several places in the LibreOffice Calc Help documentation.

As a result, this seems to be a bug one way or another - either in how LibreOffice Calc is behaving or in its options and documentation. If tabs are welcome inside of data, they're not behaving consistently and need to be fixed. If they're unwelcome inside of data, the option for adjusting them needs to be removed and the mentions in the Help documentation need to be adjusted. At this point, they seem to be welcome and broken, so I figured it's probably a bug.
Comment 6 Xisco Faulí 2019-12-10 15:40:03 UTC
Hello Little Girl,
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 7 Little Girl 2019-12-11 04:01:46 UTC
Hi, Xisco Faulí. My virtual machine contains the latest version of the Kubuntu operating system and the most recent version of LibreOffice Calc available in its package manager is still version 6.0.7.3, which I've already tested for you. I'll be happy to repeat the test with a more recent version once it becomes available in the Kubuntu package manager.

Meanwhile, you probably have the latest version of LibreOffice Calc installed on your system. The example.csv file I used is attached in one of my posts above. Please grab it and open it in your copy of LibreOffice and you will quickly see whether the bug is still present. This should only take a few seconds. I appreciate your time.
Comment 8 Xisco Faulí 2019-12-11 08:33:23 UTC
Hi Little Girl,
LibreOffice switched to KDE5 in LibreOffice 6.2 and newer.
You should definitely try with the latest version
LibreOffice 6.0.7 reached the end of life 1 year ago
Comment 9 m_a_riosv 2019-12-11 09:12:08 UTC
Created attachment 156471 [details]
Screenshot showing the issue

In the input line or editing in the cell, shows fine, but not in the normal cell view.
Comment 10 Little Girl 2019-12-11 18:23:55 UTC
Thank you for the information and suggestion, Xisco Faulí. I'll grab the LibreOffice PPA when I upgrade my operating system and then I'll try out the new version.

Meanwhile, I've currently got LibreOffice 6.2 running in a Kubuntu VM and 5.1.6.2 running in my not-quite-outdated-yet Ubuntu MATE operating system. This is a great example of version freeze disadvantages.

Thank you also, to m.a.riosv for following up on this by doing a more recent test.
Comment 11 QA Administrators 2021-12-11 04:21:25 UTC Comment hidden (obsolete)
Comment 12 m_a_riosv 2022-07-07 09:26:18 UTC
*** Bug 149881 has been marked as a duplicate of this bug. ***
Comment 13 Little Girl 2022-07-25 13:16:54 UTC
This bug still exists in LibreOffice Calc 7.3.4.2 inside of a fully-updated copy of Kubuntu 22.04 LTS.