Bug 38982 - Calc [EDITING, FORMATTING] find & replace causes default formatting to be applied to cells, undo working incorrectly
Summary: Calc [EDITING, FORMATTING] find & replace causes default formatting to be app...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search Undo-Redo Calc-Cells
  Show dependency treegraph
 
Reported: 2011-07-05 10:49 UTC by Adam Voysey
Modified: 2018-08-09 05:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of spreadsheet with formatting that is affected (10.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-07-05 10:49 UTC, Adam Voysey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Voysey 2011-07-05 10:49:36 UTC
Created attachment 48777 [details]
Example of spreadsheet with formatting that is affected

Problem:
Performing a find and replace on a spreadsheet causes any formatting applied to a cell to be overwritten with the default formatting, if any of the contents of the cell are changed (even if the word/text within the cell that the formatting is applied to, is not the word/text which is changed).

Expected behavior:
find and replaces the text, but not the formating (that is it respects the formatting already in place; and leaves the same result one would have found if they manually selected the cell, double clicked to select the word to be changed, and typed the new word)

To reproduce:
i) type some text into a cell
ii) apply a formatting change (for example make one word in the cell red, and another underlined)
iii) open edit->find&replace
iv) perform a find and replace (bug exists for both "replace" and "replace all")
[compare/contrast with behavior of manually making the replacement to the text in the cell]

Bug reproduced on:
x86 and x86-64 versions on linux (Ubuntu natty) and windows (Vista)
Comment 1 Björn Michaelsen 2011-12-23 12:23:47 UTC Comment hidden (obsolete)
Comment 2 Adam Voysey 2011-12-24 13:18:29 UTC
Bug still exists in 3.5.0beta2 (x86 build) on windows Vista 64-bit at least. Will test on other OSs as well if I get chance.
Comment 3 Florian Reisinger 2012-08-14 13:59:41 UTC Comment hidden (obsolete)
Comment 4 Florian Reisinger 2012-08-14 14:00:51 UTC Comment hidden (obsolete)
Comment 5 Florian Reisinger 2012-08-14 14:05:35 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:07:36 UTC Comment hidden (obsolete)
Comment 7 Adam Voysey 2012-08-15 02:09:08 UTC
Bug still exists on version 3.5.6.2 on Ubuntu Precise x86_64.
I don't think NEEDINFO was the correct status for the bug anyway... It only had that status due to an automated change. Just needs someone to come along and give it NEW status?
Comment 8 Florian Reisinger 2012-08-24 13:44:33 UTC
I can confirm it @Win 7 with Version 3.6.0.4 (Build ID: 932b512)

@Reporter, someone: Which is the oldest version affected..?
Comment 9 sasha.libreoffice 2012-09-26 12:20:29 UTC
Reproduced in 3.3.4 and 3.6.1 on Fedora 64 bit
In case using button "Replace" this function is even not undoable.
(content undoes, but formatting is lost)
Changing version to 3.3.4 as most early reproduced
Comment 10 Maciej Rumianowski 2012-11-29 12:20:24 UTC
Reproduced in 3.3.0 (Ubuntu 11.04 x86, LO installed from site) and 3.6.3.
The bug is an Old one from OOo see i#51429
Comment 11 QA Administrators 2015-01-05 17:52:10 UTC Comment hidden (obsolete)
Comment 12 Maciej Rumianowski 2015-01-18 18:25:19 UTC
Reproduced in 4.3.5.2 Ubuntu 14.04 x86

Important to reproduce is to apply different formatting to words in a cell.
If there is only one word or same formatting on all words then formatting is preserved and bug does not occur.
Comment 13 QA Administrators 2016-02-21 08:37:13 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2017-03-06 15:45:37 UTC Comment hidden (obsolete)
Comment 15 Tino Didriksen 2017-08-08 15:16:52 UTC
I can reproduce this on LO Calc 5.4.0.3 (Windows 10, x86_64).

All formatting of a line is lost when a replace happens on it - it doesn't affect the whole cell, if there are multiple lines in the cell.
Comment 16 QA Administrators 2018-08-09 02:36:03 UTC Comment hidden (obsolete)
Comment 17 Tino Didriksen 2018-08-09 05:42:22 UTC
Reproduced in 6.1.0.3 (Windows 10, x86_64).

All formatting is still lost in cells affected by the replace action.