Bug 140135 - Merged Cell Copy and Find issue
Summary: Merged Cell Copy and Find issue
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Find-Search Calc-Merge-Split
  Show dependency treegraph
 
Reported: 2021-02-03 17:36 UTC by Getafix
Modified: 2023-11-01 13:16 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Picture of COPY FIND (5.84 KB, image/png)
2021-02-03 17:36 UTC, Getafix
Details
test file (7.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-12-05 16:40 UTC, raal
Details
Printscreen from Linux (39.30 KB, application/vnd.oasis.opendocument.text)
2021-12-05 16:41 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Getafix 2021-02-03 17:36:53 UTC
Created attachment 169447 [details]
Picture of COPY FIND

4 cell with data example TEST has been merged into ONE cell

then we COPY and try finding in another sheet

instead of searching for TEST it searches for TESTTESTTESTTEST

This is a Regression in 7.1.0.3, in previous versions when we COPY from Merged cell, only the Text visible (first cell in merged cell) used to be pasted in FIND box
Comment 1 mulla.tasanim 2021-02-03 20:13:35 UTC
Which option you are choosing for merge cells,

1.Move the contents of hidden cells in to first cell
2.Keep the contents of hidden cells
3.Empty the contents of hidden cells 

If you are choosing the first option then you will get result as TESTTESTTESTTEST and if you are choosing third option, result will be TEST
Comment 2 mulla.tasanim 2021-02-03 20:21:29 UTC
and If you are choosing 2nd option, It will hide the contents of cells and will show the result as TEST, but if you will copy and paste it will appear as TEST TEST TEST TEST, as we are keeping the contents of hidden cells 

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 761a672d62df1891b9f4f367a499b220ab2b33fa
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 3 Getafix 2021-02-03 22:44:32 UTC
I'm doing exactly what I have been doing for 5+ years (choosing 2nd option), when I copy the Merged cell and press CTRL+F (FIND), it doesnt paste what is in the first cell only but all (eg: TEST is in all 4 cells, CTRL+F > CTRL+V should paste only TEST and not TESTTESTTESTTEST, Note - am choosing the 2nd option, have been doing so for many years now, hence noticed now in this new version)
Comment 4 Getafix 2021-02-03 22:46:10 UTC
Also note: I'm talking about version 7.1.0.3 not 7.0.3.1 (as mulla.tasanim@gmail.com)
Comment 5 Getafix 2021-02-05 05:25:56 UTC
Today installed final 7.1.0 on both Ubuntu20.10 and Windows10. Problem happens. Before installing in Linux I checked on version 7.0.4 and no issues, works like a charm. So this is a regression in 7.1.0, it very frustrating/annoying to press F2 and highlight and COPY instead of just COPY like previously.
Comment 6 Getafix 2021-02-05 05:28:11 UTC
Today installed final 7.1.0 on both Ubuntu20.10 and Windows10. Problem happens. Before installing 7.1.0 in Linux I checked on version 7.0.4 in linux and no issues, works like a charm. So this is a regression in version 7.1.0. Its very frustrating/annoying to press F2 and highlight and COPY instead of just COPY like previously. So this Regression is happening in both Linux & Windows
Comment 7 raal 2021-12-05 16:39:25 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks

This changed over the time. In 7.0, bibisected, is added Enter sign. Now in 7.4 I see string TEST dubled: "TEST TEST".
 c50710fda274b999c8655a2f70db0b455425536f is the first bad commit
commit c50710fda274b999c8655a2f70db0b455425536f
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Feb 13 22:09:59 2020 +0100

    source 3b8c42a94b5448364d47daa103b3452f54990524

https://git.libreoffice.org/core/+/3b8c42a94b5448364d47daa103b3452f54990524
weld FindTextFieldControl
Comment 8 raal 2021-12-05 16:40:55 UTC
Created attachment 176711 [details]
test file
Comment 9 raal 2021-12-05 16:41:15 UTC
Created attachment 176712 [details]
Printscreen from Linux
Comment 10 Caolán McNamara 2021-12-05 20:59:07 UTC
Maybe more interesting in identifying what changed is to bisect the copy and not the paste. So bisecting copying those cells and pasting into another application shows it went from copying...

"TEST
"

to

"TEST TEST
TEST TEST
"

at

commit 1ed04c2029218619aab2f3422130c890f67f309c
Date:   Thu Sep 10 16:46:30 2020 +0200

    tdf#40993 tdf#59585 sc fill: copy merged cell structure
    
    like other spreadsheets do. This avoids losing and
    recreation of merged cell structure again and again
    after modifying cell content using fill.
    
    By dragging the fill handle, cell attributes ATTR_MERGE
    and ATTR_MERGE_FLAG are copied, too, resulting the
    same merged cell structure in the selection. See TODOs
    about the remaining tasks.
    
    Co-authored-by: Tibor Nagy (NISZ)
    
    Change-Id: Icd4287d4429d3ba27a2ffb062560856d7ad86099
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102394
    Tested-by: László Németh <nemeth@numbertext.org>
    Reviewed-by: László Németh <nemeth@numbertext.org>

wrt the widget getting pasted *into*. With the fix for bug #138848 the newline and following lines of text are stripped out on paste into the find text widget, so when pasting that
"TEST TEST
TEST TEST
"
in 7.1.1 and upwards, only the first line of "TEST TEST" is put into the widget. 

AFAICS there is nothing more that can be done at the destination widget side on this issue, only (presumably) the production of what we put into the clipboard.

caolanm->attila:
Perhaps the solution is to not put the content of hidden cells into the plain text format when putting that into the clipboard ?