| View previous topic :: View next topic |
| Author |
Message |
Fundi OOo Advocate

Joined: 21 Sep 2004 Posts: 278
|
Posted: Tue May 05, 2009 4:19 pm Post subject: [SOLVED] Keeping italics and bold yet removing the rest |
|
|
Hi
I have to format a long document where the text has a lot of bolded and italicized words. (originally written in Word). When I apply a paragraph style only certain attributes get applied. When I then press Ctrl-m it applies the formatting completely (as it should) but it takes out the italics and bold words too. Obviously it is a pain to put them all back manually.
The interesting thing is that the behavior is not always the same. On some paragraph it applies the style nicely with leaving the bold and italics in tact. Why? and Wy only on some?
1. Is there a way to control what gets stripped a bit better?
2. If not is there a way to preserve the bold and italics yet apply a paragraph style.
3. Is there a document that explains these features and behaviours?
I searched the forum but found only an old thread for 2.1 (I'm using 3.0 and 3.01 on XP and Gnu/Linux/Ubuntu).
Any pointer in the right direction wold be great! Thanks in advance.
Ps. I don't like/can to edit XML code that is just beyond me.
Last edited by Fundi on Wed May 06, 2009 2:09 pm; edited 1 time in total |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4601 Location: Netherlands
|
Posted: Tue May 05, 2009 11:26 pm Post subject: |
|
|
That's probably due to direct formatting vs formatting with styles. What you want is a kind of formatting debugger, and unfortunately no such thing exists.
What you can do to save the italics and boldface is define character styles for them, them Search for italics (and later bold), Find all, then apply the character style for the selection (across the document). Save the file under a new name, then start removing any other direct formatting. _________________ LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum |
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Wed May 06, 2009 2:24 am Post subject: |
|
|
problem is: removing direct formatting with "Format - Default" will also remove character styles. There should be a possibility to selectively remove a formatting (e.g. search "italics formatting" then replace with nothing). However, there is not.
Due to the underlying structure of Writer documents, it would be difficult implementing this. Any direct formatting, and combination of formatting is handled in the document format as a ... character style! Thus, for an instance of "bold + italic", a character style is defined in the file and applied. For "bold + italic + underline", yet another character style is defined.
I filed this issue a long time ago http://qa.openoffice.org/issues/show_bug.cgi?id=41193 and had quite some discussion with the developers. This is not going to be resolved any time soon, and your only "clean" option for now is "format default", have your paragraph styles properly applied and then reapply either character styles or direct formatting where needed. Alternatively, it all comes down to a nightmare of direct formatting, which probably is even worse. _________________ --
GNU/Linux (Ubuntu) |
|
| Back to top |
|
 |
Fundi OOo Advocate

Joined: 21 Sep 2004 Posts: 278
|
Posted: Wed May 06, 2009 8:59 am Post subject: |
|
|
Thanks for the feedback. At least I don't feel stupid doing all these formating changes step by step.
I got an idea though through reading of your mail. I have not tried it will do so shortly.
What aobut searching for bold and putting some character in in front and rear of the bolded section. Then aply all the Ctrl-m formatting with the right style and then go and do another search to find all bold places now duly marked in the document.
then use a small macro to take out the beginning and ending character and bold everything in between. I will struggle with the macros as this is not my forte but I will give it a try and let you know.
Thanks again. _________________ Set your Subject to [Solved] if it did the trick |
|
| Back to top |
|
 |
BillP Super User

Joined: 07 Jan 2006 Posts: 2702
|
Posted: Wed May 06, 2009 11:25 am Post subject: |
|
|
| Fundi wrote: | Thanks for the feedback. At least I don't feel stupid doing all these formating changes step by step.
I got an idea though through reading of your mail. I have not tried it will do so shortly.
What aobut searching for bold and putting some character in in front and rear of the bolded section. Then aply all the Ctrl-m formatting with the right style and then go and do another search to find all bold places now duly marked in the document.
then use a small macro to take out the beginning and ending character and bold everything in between. I will struggle with the macros as this is not my forte but I will give it a try and let you know.
Thanks again. |
That should work, but you don't need a macro unless you have many documents to change. After marking the bold text, apply Default Formatting and your paragraph style, then use Find & Replace to search for all of your marked text. Once the marked text is highlighted, apply a character style to make it bold, then search for and delete the markers. |
|
| Back to top |
|
 |
Fundi OOo Advocate

Joined: 21 Sep 2004 Posts: 278
|
Posted: Wed May 06, 2009 2:08 pm Post subject: |
|
|
Ahh or Heukera! I got it.
For some unknown reason the language code is not reset when Default-format is applied. (know Idea why but bug or feature this helps).
1. I search for bold and replace with some language that i don't use in the document. This marks all bold phrases as specific to the language. (the same for italics but a different language)
2. I apply default-formatting
3. I then search for the Language and replace with bold and the language I use.
Bingo all done.
Thanks for this discussion it brought about the right result.
PS. If this is possible should something like this not be possible as a feature from the developers side? I like to hear your opinion if you so please.
Thanks again. _________________ Set your Subject to [Solved] if it did the trick |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4601 Location: Netherlands
|
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Wed May 06, 2009 11:52 pm Post subject: |
|
|
Indeed you found a splendid workaround! _________________ --
GNU/Linux (Ubuntu) |
|
| Back to top |
|
 |
|