Bug 142598 - The result of Calc formula with CHAR(9) is not equal to a tab of IDE when copy & paste cell range
Summary: The result of Calc formula with CHAR(9) is not equal to a tab of IDE when cop...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) All
: low trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-IDE
  Show dependency treegraph
 
Reported: 2021-06-01 10:48 UTC by Nukool Chompuparn
Modified: 2024-01-29 16:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (15.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-06-01 13:31 UTC, Xisco Faulí
Details
Fedora 34 Workstation Edition + LibreOffice 7.1.3.2 (75.64 KB, image/png)
2021-06-02 05:24 UTC, Nukool Chompuparn
Details
Windows 10 + LibreOffice 7.1.1.2 (115.15 KB, image/jpeg)
2021-06-02 05:26 UTC, Nukool Chompuparn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nukool Chompuparn 2021-06-01 10:48:34 UTC
Description:
In LibreOffice for Linux - Copy the result of CHAR(9) of Calc formula and paste in LibreOffice CALC BASIC IDE,the tab length is shorter than the tab length of the IDE. On the other hand, it is equal in LibreOffice for Windows.

Steps to Reproduce:
1.Open LibreOffice Calc for Linux
2.Enter '0' to cell A2 and cell B2
3.Enter 'ABC' to cell C2
4.Enter a formula,
  =CONCAT(CHAR(9),"oSheet.getCellByPosition(",A2,", ",B2,")",".String = ","""",C2,"""")
  to cell D2
5.Open BASIC IDE
6.Edit any code area
7.Copy from cell D2
8.Paste in IDE code area


Actual Results:
The tab length from the result of CHAR(9) is only 1, but the default tab length of the IDE is 4. 

Expected Results:
The tab length from the result of CHAR(9) must be equal to the default tab length of the IDE.


Reproducible: Always


User Profile Reset: No



Additional Info:
Ref:
https://ask.libreoffice.org/en/question/312106/copy-the-result-of-char9-of-calc-formula-and-paste-in-libreoffice-calc-basic-ide/
Comment 1 Xisco Faulí 2021-06-01 13:31:49 UTC
Created attachment 172555 [details]
sample file
Comment 2 Nukool Chompuparn 2021-06-02 05:21:47 UTC
It can be done in either in Windows 10 or Fedora 34 Linux Workstation Edition, but only copy & paste cell by cell, not by a cell range.
Comment 3 Nukool Chompuparn 2021-06-02 05:24:08 UTC
Created attachment 172563 [details]
Fedora 34 Workstation Edition + LibreOffice 7.1.3.2
Comment 4 Nukool Chompuparn 2021-06-02 05:26:33 UTC
Created attachment 172564 [details]
Windows 10  + LibreOffice 7.1.1.2
Comment 5 Buovjaga 2022-04-27 12:20:09 UTC
Reproduced with file.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3a05acb8f0d94728ea6cbfd7a69dac6ffa7ffc68
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 1c1427e81c2463fbc40855adfafa360c13108abb
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 27 April 2022
Comment 6 Andreas Heinisch 2024-01-29 16:25:55 UTC
So CHAR(9) doesn't seem to get translated for the clipboard to \t. If you copy the tab character from a notepad and paste it into your formula inseat of CHAR(9), then everything works as expected.


The issue arises from the failure to convert CHAR(9) to \t in the clipboard.