Bug 130926 - Handling tab stops in pasting monospaced or preformatted text
Summary: Handling tab stops in pasting monospaced or preformatted text
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 11:53 UTC by ricky.tigg
Modified: 2020-03-01 17:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
View of terminal (34.58 KB, image/png)
2020-02-25 11:57 UTC, ricky.tigg
Details
View of document (23.23 KB, image/png)
2020-02-25 12:01 UTC, ricky.tigg
Details
Options | LibreOffice Writer | General (9.23 KB, image/png)
2020-02-27 09:30 UTC, ricky.tigg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ricky.tigg 2020-02-25 11:53:04 UTC
Description:
Mono-spaced font display properties not preserved, when a pattern it is applied to, is copied/pasted from terminal emulator into Writer document

Steps to Reproduce:
1. Select a mono-spaced font style in a graphical terminal emulator;
2. In Shell, execute 'apropos bash | head -14 | sed 's/     -/-/g;s/bash built-in commands, see bash(1)/bash(1)/g'| column';
3. Copy output from step 2. into a Writer document;
4. Apply to it mono-spaced font style named Liberation Mono.

Actual Results:
3. – see gnome-terminal_font_style_Monospace_Regular.png;
4. – see Writer_6.3.4.2.0_font_style_Liberation_Mono.png

At step 4. command outpu are not  all exhibited in column as it is in step 3.



Expected Results:
Display at step 3. to be preserved at step 4.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.3.4.2.0+; Build ID: 6.3.4.2-2.fc31; CPU threads: 4; OS: Linux 5.5; UI render: default; VCL: gtk3; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US; Calc: threaded
Comment 1 ricky.tigg 2020-02-25 11:57:44 UTC
Created attachment 158174 [details]
View of terminal
Comment 2 ricky.tigg 2020-02-25 12:01:14 UTC
Created attachment 158175 [details]
View of document
Comment 3 V Stuart Foote 2020-02-25 16:42:11 UTC
Width of glyphs is drawn from the font assigned to LO paragraph. 

But your tab stops are not set to character spacing, with defaults probably set in inches. Either adjust the font size so default tab stops match--or probably better to change tab stops to char units and drag the tab stop to shift alignment.

Either way => NAB
Comment 4 ricky.tigg 2020-02-26 07:27:28 UTC
Within rulers (Shift + Ctrl + R) then right-click, Char as unit is selected, Tab stops, those one present at default, cannot be dragged nor removed, as probably they are not intended to be. What could be this tab stop to be dragged you referred to?.
Comment 5 V Stuart Foote 2020-02-26 14:07:09 UTC
Ssee the help for setting /editing tab stops, e.g.

https://help.libreoffice.org/7.0/en-US/text/shared/guide/tabs.html?DbPAR=SHARED#bm_id3144436
Comment 6 ricky.tigg 2020-02-27 09:30:54 UTC
Created attachment 158223 [details]
Options | LibreOffice Writer | General

Yet, what could heve there a definitive effect for all pasted expressions?
Comment 7 V Stuart Foote 2020-02-27 14:13:31 UTC
Again, issue you are having is not that pasted formatting changes, rather that your pasted monospacxed content contains <tabs> characters, and those are not defined by the font metric--rather by the tab stops set for a paragraph (or other object with text attributes).

You have to adjust the tab stops.

You can ensure in advance that the format for the paragraph receiving the pasted mono-spaced font with <tabs> has a couple of tab stops set on the ruler (and removing the rest of the preset 'center tab' spacing).

Save that as a new style (perhaps a child of the 'Preformatted Text' style for reuse. Set receiving paragraph to that style before pasting.
Comment 8 ricky.tigg 2020-03-01 17:09:44 UTC
Could not guess what you meant. Won't investigate the behaviour. Closed from my side.