Bug Hunting Session
Bug 110740 - UI: Font shrinks when pasting text
Summary: UI: Font shrinks when pasting text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: x86 (IA32) Windows (All)
: medium minor
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:6.1.0
Keywords: needsDevAdvice
Depends on:
Blocks:
 
Reported: 2017-07-31 20:46 UTC by Patrick Coughlin
Modified: 2018-05-01 21:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example of the font shrinking (24.76 KB, image/jpeg)
2017-07-31 20:46 UTC, Patrick Coughlin
Details
Another example of font shrinking, with annotations (11.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-02-24 01:03 UTC, tagishsimon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Coughlin 2017-07-31 20:46:59 UTC
Created attachment 135030 [details]
Example of the font shrinking

When pasting text copied from one cell to another, the font unexpectedly shrinks. I have seen this in older versions of LibreOffice Calc, but I can reproduce it in 5.3.3.2.

Steps to reproduce:
- Start with a new, blank sheet
- Pick an empty cell.
- Enter the following formula and press enter:
  =1+2
- Select the cell.
- Select the text of the entered formula in the "input line", not within the cell.
- Cut the text with Shift-Delete or Ctrl-X
- Double click to edit another cell
- Paste the text with Shift-Insert ot Ctrl-V - the font size has shrunk.
- Press enter
- If you select undo one time (Ctrl-Z), the font size restores.
Comment 1 Xavier Van Wijmeersch 2017-08-01 13:12:09 UTC
One question why you need to double click a cell before pasting a cut/copy entree
Yes it shrinks because it use the format of the "input line" and not the format of the cell; that's why i don't understand why the double click in another cell before pasting a entree
Comment 2 Patrick Coughlin 2017-08-01 18:49:36 UTC
(In reply to Xavier Van Wijmeersch from comment #1)
> One question why you need to double click a cell before pasting a cut/copy
> entree
> Yes it shrinks because it use the format of the "input line" and not the
> format of the cell; that's why i don't understand why the double click in
> another cell before pasting a entree

I wanted to convey the fact that you must be editing the cell. Simply pasting in a selected cell does not cause the same result.

Also, copying instead of cutting does not cause the font to shrink.

Simpler steps to reproduce:
- Start with a new, blank sheet
- Pick an empty cell.
- Enter the following text and press enter: 1
- Re-select the cell.
- Select the text of the entered formula in the "input line", not within the cell.
- Cut the text with Shift-Delete or Ctrl-X (note that you must cut. Copy doesn't reproduce the same result)
- Paste the text with Shift-Insert ot Ctrl-V - the font size has shrunk.
- Press enter
- If you select undo one time (Ctrl-Z), the font size restores.
Comment 3 Xavier Van Wijmeersch 2017-08-02 08:44:14 UTC
I did follow your description; and yes your observation is correct.
The only thing a did not is the undo step.
So still it is my believe the cutting is taking the format of the input line and when going to another cell and go to edit mode of that cell; its past the cutting format from the input line. When you undo that step its fills the cell format to the data of that cell.
I only cut/copy in the input line when needing to change the formula.
Comment 4 tagishsimon 2018-02-24 01:02:29 UTC
I confirm this bug - in Calc 6.0.1.1

If I select and cut text (CTRL-X) from the formula bar, and paste it into a new cell, the pasted text does not take the format of the source or destination cell, (e.g. Liberation Sans @ 10 points) but instead applies the font .AppleSystemUIFont @ 5.1 points.

Cells with content using .AppleSystemUIFont @ 5.1 points are then inpervious to the format painter - try painting a new format, and it'll be roundly ignored.

If I CTRL-C from the formula bar rather that CTRL-X, and paste it, then all is fine - the pasted text takes the format of the cell from which the text was cut

If I CTRL-C or CTRL-X from the cell (rather than from the formula bar), and paste it, then all is fine - the pasted text takes the format of the cell from which the text was cut.
 
So. CTRL-X from the formula bar produces a different result from CTRL-C from the formula bar, and from CTRL-X or -C from the cell.
Comment 5 tagishsimon 2018-02-24 01:03:30 UTC
Created attachment 140106 [details]
Another example of font shrinking, with annotations

Here's an example of font shrinking associated with CTRL-X from the formula bar
Comment 6 tagishsimon 2018-03-01 22:37:02 UTC
I'm marking this as 'new' since a) I confirm it b) it's driving me mad. I thank you.
Comment 7 Commit Notification 2018-05-01 21:17:36 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9708df8179fd4db377bf1d2c399623149464dd5

tdf#110740 Wrong formatting when cutting from the input line

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.