Grey bars in Writer text

I have converted a lot of (legal) text from MS Word to Writer and saved it in Docx format still in Writer. The problem is that sometimes (and not always) I get grey bars between characters as in this example.

.

How do I avoid this as otherwise I have to remove each bar in turn.

At the request of one commentator I have now amended this to share a file of jpg in the original question. I still cannot seem to get it in a position where Alt X works either.

Untitled 2.docx

How to avoid: Don’t press CTRL+SHIFT+SPACE

For starters, share a file, not a screenshot. The characters in question look like non-breaking spaces, but may be something else.

The problem is

But if it did not bother you in Word, why is it a problem now? Find and replace as necessary.

These bars were not present in Word and only appeared when I loaded the text into Writer.

Presence and visibility might be different things (toggle View -> [ ] Field Shadings --or-- CTRL+F8)

The bars were not present, indeed, because Word displays non-breaking spaces as small circles (I find it utterly stupid because they are not distinguishable from degree signs). The symbols were present, Writer does not add them.That’s it.

saved it in Docx format still in Writer

It is bad, a straight way to data loss. NEVER do ongoing work in foreign file formats. Save only in ODF, and only having finished, export as necessary.

Grey bars and other character sequences can appear when you paste all formatting usually when copying information from a web page. There are various paste options available, which are kind of similar to Microsoft Word’s paste options. In the menu Edit → Paste special → Paste Special… try the various options (in turn) to see which one is most suitable for your purposes. It may also strip some other formatting information such as font, size, etc.


If you need to keep formatting as close as possible to the web page (especially useful if there are headings which use multiple sizes and/or fonts/bullet styles, etc) you can use the original copy and paste your were using then manually strip out the grey bars by using the Alternative Find & Replace / (AltSearch) extension .

If you zoom in so that one of the grey boxes is large enough, move the mouse pointer midway to one of the grey boxes then press Alt+X. This will reveal the character code in the form of U+AAAA. Use this character code in the extension above in the format of \xAAAA where AAAA is the four digits revealed with the Alt+X sequence.
You can keep the replace field blank it will essentially delete the grey boxes. If you add a space in the replace field it will have all grey boxes replaced with spaces. Then select Replace All within the extension.



*If this answer helped you, please accept it by clicking the check mark ✔ to the left and, karma permitting, upvote it. That will help other people with the same question. In case you need clarification, edit your question (not an answer) or comment the relevant answer.*

In the menu Edit → Paste special → Paste Special…

Non-breaking spaces are just characters, have nothing to do with formatting, thus, you pointer is invalid. Besides, the asker did not paste anything, he has converted some documents.

If you are so worried about non-breaking spaces, you should simply replace them with conventional spaces. Call up the find-and-replace dialog, input a non-breaking space into the find field, a space into the replace field, replace all. If you need it regularly, a simple macro can be a solution:

 Sub ReplaceNBSPWithSpace 
   Dim oReplace as object 
   oReplace = ThisComponent.createReplaceDescriptor() 
   oReplace.SearchString = " " 
   oReplace.ReplaceString = " " 
   ThisComponent.ReplaceAll(oReplace)
 End Sub