A feature, or ...?

I have on several occasions been annoyed by something in LO - just a small thing, but none the less: Normally, when you apply a style, like a header style, it sets the typeface etc, but sometimes it doesn't.

I think it happens in situations like this: I write a section of text, apply some character formatting (eg. bold or a different font), then decide to break the section up and insert a heading in between - and it "doesn't work", ie the font doesn't change etc. Why is that?

Is this the way it should be, or is it a bug? If it is a feature, what am I doing wrong?

It is possible that there is some direct formatting applied to the text.

Among other things, what determine the final look of text, it first apply
the paragraph style, then the character style, then the direct formatting.
Those two can be changed independently. For example, applying the bold
attribute by hand (using the B button in the toolbars) change the direct
formatting. If you then apply a style, it will not override the direct
formatting of the text.

Usually, if using styles correctly, you shouldn't apply attributes by hand
*at all*. To check if this is the issue, you can delete direct formatting
quickly by selecting the text, and use the "Format->Delete direct
formatting" menu (or something like that; I'm not sure about the english
UI, but it's the first command in the "Format" menu).

Ah, that sounds like it could be the explanation; thank you for clearing that up for me :slight_smile:

Once you apply your style, you can clear any direct formatting by selecting the text and hitting <Ctrl-M>. Everything should then snap to the style-controlled formatting.

Virgil

I've seen a case when this not always work. If you apply some direct formatting (i.e. bold something by hand), then apply some charactery style, then a paragraph style (with the format you really wanted in the first place)... what you get is a mix of applied formatting that almost never corresponds to the style you wanted. If you clear the direct formatting there, it does not reset completely. You have to also remove the applied character style to get the text to respond completely to the paragraph style.
It's annoying, but It could be considered a feature, not a bug :wink:
Cheers,

Well, it IS a feature. The direct formatting is *only* the direct
formatting: done using the toolbar buttons, or directly by doing right
click on the text and changing paragraph/characters here. Removing direct
formatting will *not* remove paragraph styles nor character styles since
they are, well, styles, not direct formatting.

It can get confusing, but you just have to remember that there is multiple
"layers" โ€‹โ€‹of formatting applied to the text: paragraph styles, then
character styles, then direct formatting (don't ask me where the
conditional formatting goes).

I just tried it and you're right. Ctrl-M clears *direct* formatting, but preserves any *style* based formatting, whether paragraph or character style.

I certainly wouldn't consider that a bug; it seems to me to be the way it was deliberately designed.

Virgil

I personally think it would be great if LO had a "lock styles" feature that one could choose to prevent himself from making direct formatting changes without going through styles.

As you've noticed there are several layers of formatting methods and, when they're combined in a single document, the file confusion can be great.

Of course, I'm not at all suggesting that LO *require* all formatting to be styles based, only that it provide the user the opportunity to select such a feature.

Virgil

I'm with you on this one Virgil.
Is there a way to show the styles in a section of text, a bit like showing the tags in HTML. If I have a bit of text with a paragraph style, a character style and direct formatting, how do I see what is applied where.
Steve

Virgil Arrington wrote (14-07-13 00:37)

I certainly wouldn't consider that a bug; it seems to me to be the way
it was deliberately designed.

It is :slight_smile:

It's a bug, or, if you prefer, a missing vital feature.

The problem:

If you have a document filled with paragraph formatting which has been
applied directly using a paragraph style menu, any styles you define and
apply as a style will be overridden by the direct formatting previously
applied. There is no way that I have found to remove it, except by a manual
change using the paragraph style menu. That fixes my problem, but passes
the same problem on to the next person who wants to change the paragraph
styling.

I have just had to do this. The document was an imported Word .doc, but the
principle seems to apply everywhere.

How to fix it:
Add Format menu items "Clear all paragraph/character(/list?) formatting." It
doesn't actually remove all formatting, but applies a default format which
clear all the problem formats and allows a style to be cleanly applied.

List formatting is such a delicate matter that I don't know whether a clear
all list formatting operation would cause more trouble than it's worth.

Would "Select All" (CTRL-A), Menu->Format->Clear Direct Formatting (CTRL-M) not work for you?

I don't know, because there were elements whose particular formatting I needed. But I know that that sequence on individual paragraphs does not work, for the reasons explained by others in earlier posts in this discussion.

Peter West

...he saw a poor widow put in two copper coins.

Interesting... yours is the only post I've seen so far.

It's a bug, or, if you prefer, a missing vital feature.

It's a feature - and I don't think it's missing, in fact.

The problem: If you have a document filled with paragraph formatting which has been applied directly using a paragraph style menu, any styles you define and apply as a style will be overridden by the direct formatting previously applied. There is no way that I have found to remove it, except by a manual change using the paragraph style menu. That fixes my problem, but passes the same problem on to the next person who wants to change the paragraph styling.

I fear that paragraph is somewhat confused. There is direct character formatting, character style formatting, paragraph formatting, and paragraph style formatting - all different. To confuse things further, you can apply character formatting or character style formatting to an entire paragraph. If you really do solve your problem using a new paragraph style (and I'm not clear why you would call this a "manual change"), I think you have left your document in an ideal state for later modification by yourself or others.

How to fix it: Add Format menu items "Clear all paragraph/character(/list?) formatting." It doesn't actually remove all formatting, but applies a default format which clear all the problem formats and allows a style to be cleanly applied.

You don't need to clear any style formatting, as any modifications to these styles or replacements by other styles will simply supersede existing effects. What can be a problem is any local ("direct") character formatting which may have been applied - perhaps even (confusingly) to complete paragraphs. (This is the way that a beginner will format his or her documents.) But no-one needs to add any menu items: what you need is already there, at Format | Default Formatting (or right-click | Default Formatting or Ctrl+M). If you invoke this and then apply your new styles, everything should be hunky-dory.

List formatting is such a delicate matter that I don't know whether a clear all list formatting operation would cause more trouble than it's worth.

Any proper list formatting (applied using styles) should survive the application of Default Formatting, which is what you would want.

I trust this helps.

Brian Barker

Here's an earlier post from Pablo Dotro:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Once you apply your style, you can clear any direct formatting by
selecting the text and hitting <Ctrl-M>. Everything should then snap
to the style-controlled formatting.

Virgil

I've seen a case when this not always work. If you apply some direct
formatting (i.e. bold something by hand), then apply some charactery
style, then a paragraph style (with the format you really wanted in the
first place)... what you get is a mix of applied formatting that almost
never corresponds to the style you wanted. If you clear the direct
formatting there, it does not reset completely. You have to also remove
the applied character style to get the text to respond completely to the
paragraph style.
It's annoying, but It could be considered a feature, not a bug :wink:
Cheers,

Hi :slight_smile:
For my company's newsletter i sometimes copy&paste into a text-editor
and then re-select and copy&paste from there.

Fairly recently i found i could use
Shift Ctrl v
and go to the bottom of the pop-up box that gives me to "Paste as
unformatted text" and that usually strips away all strange formatting.
The only thing it doesn't get rid of is when people press "Enter" or
"Return" at the end of each line. I guess going back to the
text-editor method might be an easier way of doing that. In the GEdit
text-editor i would search for
\n

Even though it removes the odd 1 or 2 bits of formatting that you do
want to keep i tend to find it more efficient to just get rid of the
whole lot and then reapply styles (such as "Heading 3") and then maybe
open the styles pop-up to edit that style.

I used to pick little bits&bobs to unformat or chunks or maybe whole
paragraphs but it involves much more faffing around than so doing the
whole lot in one go and then sorting the headings and stuff. It might
take a little while before you find the best work-flow for you.

Regards from
Tom :slight_smile:

I still don't understand why you consider any of this a difficulty. If you have a mixture of direct formatting along with character and paragraph styles, you may well wish to remove some parts of it, but not all. So it's useful to have more than one facility. Surely you would expect to need to remove the different parts of applied formatting separately - and delight that you were able to do so selectively.

As far as I can see:

o Format | Default Formatting removes both direct formatting (to characters or paragraphs) and formatting by character styles.

o The Apply Style drop-down applies paragraph styles, so you'd expect "Clear formatting" there to reset the paragraph style to Default - and it does. But it also does the same as Format | Default Formatting as well.

I suspect that at least part of the problem here is that it is sometimes difficult to see - especially with an inherited document - exactly how formatting has been applied and consequently how it might be removed.

I trust this helps.

Brian Barker

The only thing it doesn't get rid of is when people press "Enter" or "Return" at the end of each line.

There is a workaround for that, too: select the text and go to Format

AutoCorrect > | Apply. Amongst other reformatting, this combines

single line paragraphs if their length is sufficient. Since it makes other changes, you may wish to do this before performing other editing. Alternatively, you can use Format | AutoCorrect > | Apply and Edit Changes, which makes the same changes but allows you to accept them or reject them. You could accept all the "Combine paragraphs" changes (sort by Comment and select multiple actions to make this easier) and reject all the rest. This technique also applies Text Body paragraph style, but it is a simple task to change this afterwards if required.

For this technique to work, you need to have ticked Tools | AutoCorrect Options... | Options | Combine single line paragraphs if length greater than nn%. You may need to modify the percentage - which you can do by selecting the option and clicking the Edit... button.

I trust this helps.

Brian Barker

As far as I can see:

o Format | Default Formatting removes both direct formatting (to characters or paragraphs) and formatting by character styles.
o The Apply Style drop-down applies paragraph styles, so you'd expect "Clear formatting" there to reset the paragraph style to Default - and it does. But it also does the same as Format | Default Formatting as well.

For me at least, there's just too much to remember. (You're in a maze of twisty little passages. You're in a twisty maze of little passages. Now you're in a twisty little passage with a maze.) It's enough to make me lose my mind. I can't keep track of all these various intracacies. It sure would be nice to have some tool tips.

Also, if "Apply Style" applies paragraph styles and only paragraph styles, why not have it say "Apply Paragraph Style" so as to make it obvious and avoid the obscurity.

"Default Formatting" could either have a tool tip, or perhaps broken up into separate functions that do one thing each.
i.e. 1) Remove formatting to characters.
2) Remove formatting to paragraphs.
3) Remove formatting by character styles.

That would provide more control. I don't know if there's an advantage to it - other than knowing precisely what function is being performed.

In addition, I do NOT expect "Clear formatting" to reset the paragraph style to default. I expect it to do 1,2,3 above. i.e. Clear the formatting just as it implies. I would expect "Reset Paragraph Style to Default" to reset the paragraph style to default. There's far too much guesswork and intimate knowledge required here. It's all quite NON-obvious. Sure, if one works with it all the time one can learn these things - but I shouldn't have to be an expert - it should be intuitive and if it's not intuitive it should be spelled out in a tool tip.

I suspect that at least part of the problem here is that it is sometimes difficult to see - especially with an inherited document - exactly how formatting has been applied and consequently how it might be removed.

Oh yes and that hits the nail on the head. Now that the problem has been defined, the solution becomes easy. Provide a way to SEE exactly how the formatting has been applied - and a quick link shortcut to removing it! Formatting/styles are - in my mind - similar to field codes. They're hidden formulas and such that could be turned on and off for viewing at will.

Just my opinions of course.