Hyphens/dashes in bulleted lists end up as bullets when copy-pasted from Writer to other programs

The issue is stated in the title. When using the hyphen-minus - - Hyphen-Minus: U+002D - Unicode Character Table or en dash – - En Dash: U+2013 ndash - Unicode Character Table character instead of the bullet for bulleted lists, the hyphens/dashes are replaced with bullets when you copy the list from LibreOffice Writer (either .docx or .odt document) to another program like a text editor with UTF-8 support. I realise that bulleted lists are called bulleted for a reason, still it’s not unreasonable to expect that LibreOffice would copy the actual list item marker that was selected for a particular bulleted list (through Toggle Bulleted List > More Bullets… > Customize > Character) in the document, instead of using the bullet in all cases. Is there a way to achieve that in LibreOffice?

LibreOffice 7.1.6.2
Ubuntu 18.04.5 LTS

I don’t understand the question.

When you copy/paste into a text editor, you only paste text. The bullet or numbering is something “off band”, a decoration added to text. Since a text editor accepts only text and no formatting directive, it is then perfectly normal that no bullet is pasted.

However, if this happens in another document processing application, one capable of formatting paragraphs, then something is wrong.

Well, the bullets do get pasted (for example into a plain text document opened in the pluma text editor, or a textarea input field in a form on a web page), even though supposedly it’s not part of the actual content, but formatting/styling directives that only work in “rich” document formats such as docx. And that is what I actually want, I do want list item markers to be pasted as well as the content, but the issue being here is that, even when I choose hyphens or dashes (or some other character) for list item markers of a bulleted list (instead of bullets as per default), the list is still pasted with bullets in it, no matter what character was selected as the marker in the list options (accessed via Toggle Bulleted List > More Bullets… > Customize > Character). And I want it to be pasted with hyphens or dashes, depending on what character I choose as the marker (but I end up with bullets all the time). To my understanding, it’s an issue with how LibreOffice Writer copies the selected content to the clipboard, perhaps there is an option controlling how Writer should do that, but I had not been able to find any information regarding such a feature, so I came here to ask.

Since my way of formatting document is different from yours, please attach a 1-page document so that I can experiment. I’m under Fedora 34 with KDE desktop. My preferred text editor is KWrite. This may give different results.

test_bulleted_list.docx (5.1 KB)

Here, just try copy/pasting (1) select text with mouse 2) press Ctrl + C to copy to the clipboard 3) press Ctrl + V to paste from the clipboard into some other program – that is exactly how I do it) the bulleted list under ‘Test bulleted list’ to some other program, for example a text editor or a web browser.

This is how the list gets pasted in my browser (Chrome Version 89.0.4389.114 (Official Build) (64-bit)):

• test 1
• test 2
• test 3

Notice, there are bullets there, not dashes. And it is the same with pluma and vscode. I want there to be dashes and not bullets.

I copy the list into the pluma text editor and save it as a plain text file, then when I open the file in hexedit I can see there multiple occurrences of the byte sequence E2 80 A2 which is the code for the bullet in UTF-8 • - Bullet: U+2022 bull - Unicode Character Table.

As a workaround, select None for Number:, and set the En dash as Separator Before:

en dash bullet

Tested on LibreOffice 7.0.6.2, on Linux 4.12.

First of all, your document is saved .docx which means it goes into format conversion whon loading and when closing. This is a good reason for messing up formatting. An aggravating factor is M$ Word has no notion of character, frame, page and, most important in your case, list styles.

And, worse, the original document was probably created with Word. Why is this so important? Because, Word has its own original encoding for bullets. For an analysis of the document XML, I found that your “sticky” bullet was U+F02D, i.e. assigned to Private Use Area in the Basic Multilingual Plane.

I don’t know how this is converted when read by Writer but it is kept in list style WWNum1. Although this style is effectively patched for a hyphen at level 1, there is some character direct formatting (List Id list…) which seems to create havoc.

When I copy/paste any list item created directly in Writer, the bullet is not pasted into KWrite (because, as I mentioned, it is added decoration). But if I copy your sample list item, I get this @#*! sticky bullet.

Removing the bullets and assigning any list style brings back the sticky bullet, whatever the bullet forced by the style.

Conclusion: something is broken in the Word content of your file. It looks like it is impossible to recover the original text.

Fix: Use only native format from the start (.odt). If this still happens in ODF, paste as unformatted text and redo the formatting instead of pasting also the Word formatting directives which would translate into this mishap.

This is really strange. When I copy/paste to a plain text editor from Google Documents (I uploaded to Google Documents my original docx sample document), the bullets are removed altogether, but when I copy/paste from Google Documents to Writer, the text gets formatted as a bulleted list. I tried using the xsel command line tool (Index of /~conrad/software/xsel/download) to check the contents of the clipboard after I copy text into it with Ctrl + C, and in both cases there was just text (without bullets or even indents), but somehow LibreOffice is able to recognise that it should be a bulleted list.

And the bullets added when copying from ODF too.
test_bulleted_list.odt (8.9 KB)
When copying from Writer, examination of the clipboard contents with xsel tells that there are bullets, although I have created a new ODF document.

I am no developer but I think your guess is right. I tried to paste unformatted text in the same .odt document as the bulleted list and, yes, the unformatted text is not identical to pure document text.

The list items are as follows:

  • four spaces (I think the number may vary)
  • one bullet U+2022
  • one space
  • list item text

Writer knows the paragraph is a list item because it has received a bullet (either through a list style or through toolbar button). Then it can put two (or more) variants of the list item into the clipboard: ODF, , RTF, HTML, unformatted, DDE link (according to the choices in Edit>Paste Special>Paste Special).

For unformatted text, since a text editor has no formatting directives, Writer simulates the formatting with spaces and a “standard” bullet. Eventually, you could submit an enhancement request to improve the filter.