Bug 80983

Summary: EDITING: Property inheritance where there should be NONE!!!
Product: LibreOffice Reporter: emefbee
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: jbfaure
Priority: medium    
Version: 3.5.7.2 release   
Hardware: Other   
OS: Linux (All)   
Whiteboard: BSA
Crash report or crash signature: Regression By:

Description emefbee 2014-07-06 20:36:54 UTC
Problem description: 
This is an extreme bug. a cell contains text or a number, the cell has a times new roman font as it has been pasted from a web browser. Click on the cell. In the edit line above: click on it, mark the text, copy it with Ctrl-Insert, and now you should have the original content, just in plain text.

Click on a new cell, past the plain text with Shift-Insert. Voila! Now you have the text WITH TIMES NEW ROMAN FONT! WTF?!?!?!? How on Earth could that happen? Nobody entered that property anywhere, the cell property stayed with the cell and the edit line above had no property of font, color, background, etc!


Steps to reproduce: as above

Current behavior: evil

Expected behavior: good

              
Operating System: Ubuntu
Version: 4.1.5.3 release
Comment 1 Urmas 2014-07-06 23:21:44 UTC
It seems that MS Excel does indeed copy plain text from the edit bar.
Whether LO should do the same is opened for discussion.
Comment 2 ign_christian 2014-07-07 08:51:05 UTC
Same behavior since LO 3.5.7.2 and AOO 4.1.0 (Ubuntu 12.04 x86), looks like inherited from OOO

But I wonder whether it's a bug, since Ctrl-Insert and Shift-Insert not assigned to any action (by default) in Tools > Customize > Keyboard
Comment 3 ign_christian 2014-07-07 08:56:08 UTC
> But I wonder whether it's a bug, since Ctrl-Insert and Shift-Insert not
> assigned to any action (by default) in Tools > Customize > Keyboard
In "Calc" part, not in "LibreOffice'

LO 4.2.5.2 - Ubuntu 12.04 x86
Comment 4 emefbee 2014-07-07 10:14:47 UTC
You just CONFIRMED it is a bug, did you NOT?
Since "Ctrl-Insert and Shift-Insert are not assigned any bindings", should it not just do what it did for the past 20 years ???

Talking about what "MS Excel does" is a distraction, because this does not relate to Excel or any other spreadsheet software. It worked correctly in the previous versions.

The correct way is: you want a piece of a text or equation from one cell pasted into a cell or equation in the other cell, you DO NOT EVER want the complete properties of one cell moved to another, otherwise you would NOT be editing the contents in the first place. Say you wanted a piece of an equation to be copied and paste it to finish some equation in another cell. Would you like fries with that? For example: your background to be changed to RED and your text color to BLUE and set borders around the cell you are editing an equation in?

But the bug goes on much deeper than that.

I just discovered that while I pasted a table from a web browser into one spreadsheet, the plaintext of that was inserted into a SINGLE cell in another spreadsheet that was open somewhere else, the contents of it thus are:

"=H11/2'file:///home/user/documents/tables.ods'#sheet1.a10792014-6-15 0:0:0 521.001 542 571.371 502 629..."

I do not know who, when or for what purpose changed the behavior, but this is one serious hack. Should I assume that Libre Office just accesses the contents of the buffer and pastes it anywhere it likes?



I corrected the part of the table, erased "cell formatting" on the range, set format to display one digit. Saved. Now it displays "###". Repeat ad libitum.

The button to decrease the number of decimal places does not do anything, only either manually change cell properties or erase formatting and set anew.

When I paste the contents here, it is clear why the "###". No matter how many times I click in decreasing the number of decimals, nothing changes. What process happens during the save that edits the spreadsheet? Why does save do any spreadsheet WRITE access?


11.1023381948	22.2046763896	67
8.2174608927	16.4349217855	49
6.0822019956	12.1644039911	36
4.5017775683	9.0035551365	27
3.332017136	6.6640342721	20
2.4662120743	4.9324241487	15
1.8253813673	3.6507627346	11
1.3510667516	2.7021335032	8
1	2	6
Comment 5 Urmas 2014-07-07 12:19:01 UTC
Text format is a property of the text, not a cell.

Ctrl+Insert must have been handled by the edit control.

If I made a part of equation bold, I definitely want that bold text to be copied around.
Comment 6 emefbee 2014-07-08 17:14:45 UTC
(In reply to comment #5)
> If I made a part of equation bold, I definitely want that bold text to be
> copied around.

That is correct, but I did not make anything anywhere!

Here is the problem: If you edit the cell content by double clicking on the cell itself, the text is still formatted in the font and color which it has under properties.

When you edit the same text in the edit line IT HAS NO properties as far as I can see, the font is different, the font size is different, the font color and background, all are just those as given by the system. (Sometimes only system background color is used for displaying and color is black instead of system colors, which makes black on brown hardly readable).

The point is still, the edit line never, ever displays any properties of the text you are copying, so you can NOT know whether the part of the equation you are copying is bold or not in the edit line.

Editing in the main part of the screen correctly displays all properties, editing in the edit line does not display any property. It almost seems as if this was made to make insertion of macros of "format system disk" type much easier. If there was an invisible 1-megabyte property attached to a cell, and you copy only the text, or a number in it, because you think nothing bad can happen, and you insert it somewhere else, like your command prompt, you enter the whole 1 megabyte into shell, correct?

 That is one amazing trick, that nobody will abuse, I'm sure! Is the same possible in Text Editor too? Because if it is, that is a major security hole, many times you can see word manuals that give you instructions on how to to even simple things with your computer. You would basically allow the user execution of infinitely large software packages in a true Trojan horse fashion.

As a bonus, it works in linux too!

Maybe I should just open notepad in wine while using LibreOffice and paste and copy all materials while transferring them to and from the spreadsheet?
Comment 7 Jean-Baptiste Faure 2014-07-23 20:54:41 UTC
Not a bug. If you want to paste without formatting use the option "Not formated text" of the paste button. Alternatively you can use the paste special with format option unchecked.

Closing as NotABug.
Best regards. JBF