OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] Keeping italics and bold yet removing the rest

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Fundi
OOo Advocate
OOo Advocate


Joined: 21 Sep 2004
Posts: 278

PostPosted: Tue May 05, 2009 4:19 pm    Post subject: [SOLVED] Keeping italics and bold yet removing the rest Reply with quote

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
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Tue May 05, 2009 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
ftack
Moderator
Moderator


Joined: 27 Jan 2003
Posts: 3102
Location: Belgium

PostPosted: Wed May 06, 2009 2:24 am    Post subject: Reply with quote

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
View user's profile Send private message
Fundi
OOo Advocate
OOo Advocate


Joined: 21 Sep 2004
Posts: 278

PostPosted: Wed May 06, 2009 8:59 am    Post subject: Reply with quote

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
View user's profile Send private message
BillP
Super User
Super User


Joined: 07 Jan 2006
Posts: 2703

PostPosted: Wed May 06, 2009 11:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Fundi
OOo Advocate
OOo Advocate


Joined: 21 Sep 2004
Posts: 278

PostPosted: Wed May 06, 2009 2:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Wed May 06, 2009 2:31 pm    Post subject: Reply with quote

Good trick & thinking! Cool
_________________
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
View user's profile Send private message
ftack
Moderator
Moderator


Joined: 27 Jan 2003
Posts: 3102
Location: Belgium

PostPosted: Wed May 06, 2009 11:52 pm    Post subject: Reply with quote

Indeed you found a splendid workaround!
_________________
--
GNU/Linux (Ubuntu)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group