Unable to remove URL formatting in writer

Build ID: 1:6.0.3-0ubuntu1

I’ve still got the URL formatting problem. With a document that was originally created in Word with URLs in, which are formatted as clickable URLs in blue with a single underline, if I try to remove the URL formatting, here’s what happens:

Right click-Remove URL
URL disappears (e.g. from the Navigator)
The text is still blue and underlined and I cannot easily remove the format

  1. Change the paragraph format? No change.

  2. Change the character format? Now it has direct formatting to make it match Default paragraph style.

  3. Select the text and remove direct formatting? No change. Writer thinks that blue underlined IS default format, for that text only.

  4. Cut the text and paste it back in without formatting? The formatting is still there.

  5. Cut the text plus the paragraph either side and paste it back in without formatting? The formatting is sometimes now gone, sometimes still there.

It seems that the URL formatting is in the document, even if I cut the text out and paste it back in as text only.

This is causing a lot of problems with book editing for me, where the original author has sent a Word file, though I think it happens in ODT docs too if URL recognition was originally on.

In older releases of LOW, remove URL also returned the text to the surrounding formatting, in my case, Default.

Any suggestions?

Since your document comes from Word, you can’t expect it to behave like a native .odt document, notably concerning *character styles which do not exist in Word. URL formatting is a matter of character style (normally Internet Link). When reading and converting a .doc, a lot of character styles are generated to translate Word’s character direct formatting.

To get rid of them, select your URL and apply character Default Style.

If it works, I’ll change my comment for an answer.

I read this fix somewhere else, there is no Internet Link paragraph style, nor hyperlink, URL or similar. The fix I read didn’t say that to look for a character style.

And I do expect it to behave like an ODT document since LO is converting a hyperlink in text and applying a style, and also the ability to click it.

I didn’t try character style before, I tried paragraph style. Amazingly, that does the job!


I misread your comment and closed the question, I don’t have 200 points to reopen it…

M$ Word and LO Writer are based on different document formatting structures. LOW has more elaborate principles: there are more styles categories (paragraph, character, frame, page, list and to a lesser extent table) where Word knows only paragraph and uses direct-formatting for the rest.

When LOW reads in a .doc or .docx* document, it translates it. There is little problem with paragraph styles which are converted into equivalent named styles. M$W direct-formatting is tentatively converted into character styles with fancy names. Notice that this results in a tremendous number of character styles because LOW can’t guess if the same direct-formatting is a new application of a previous style or a new style (I have no idea of the algorithm because I am not a developer).

URL links are a bit complex in LOW. They have the special property of supporting two character styles instead of a single one: a standard one (in your case, a converted one coming from M$W) and special system Internet Link which makes the link clickable.

When you right-click on the link and Remove Hyperlink, you only remove character style Internet Link and this makes visible the formatting by the non-special character style which was hidden by Internet Link (at least the conflicting attributes).

This generated character style cannot be removed with Format>Clear direct formatting because this command does not operate on styles, only on direct-formatting as the name implies. To remove a character style, you must apply a “fake” character style called Default Style:

  • select the sequence of characters to “unstyle”
  • open the style side pane (F11)
  • click on the second icon in the toolbar (the one with an A) Character Styles
  • double-click on Default Style

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Some corrections.

  1. Although it’s true that LO has more style categories, still Word has more than a single one: .
  2. Although it’s unusual to have more than a single character style to a single text run, it’s still an ODF-standard feature, and not specific to Internet Link style (although it might be the only one that has UI for that): see tdf#115311 by @Regina.

@mikekaganski: thanks for 1. information; I haven’t used Word for more than one decade now, so I’m not aware of evolution. I know of the multi-character style experimental feature 2. (one of my questions was the cause of @Regina’s bug report) but I didn’t mention it because I think it isn’t fully operational yet, in particular no convenient UI for it.