How to select and delete all hidden text in OpenOffice?
Thread poster: alexliz

alexliz  Identity Verified
Greece
Local time: 07:53
English to Greek
+ ...
Nov 16, 2009

I have this bilingual .doc from Trados. Now, before I send it to the client, I need to find all the hidden segments, which are put between tags and have been formatted as Hidden in Word/Trados.

Here's what I need to do: to select ALL text throughout my document which has been marked as Hidden, and replace it with ... nothing. To delete it. To end up with a 'clean' document in just the target language.

In M$ Word I was told to do the following, which worked: Invoke the Search and Replace dialog by pressing CTRL+H, then put my cursor in the Search box but leave it empty, and just press CTRL+SHIFT+H, which will instruct Word to find everything that's HIDDEN. Then, with the Replace field also empty, click on OK. This does delete all hidden text (i.e. it replaces it with nothing), leaving a clean, target language file behind.


The problem: I can't for the life of me figure out how to select text that's hidden in OpenOffice. I seem to remember something like Regular Expressions (or something to this effect), which basically allows you to select, say Carriage Returns and other special characters, but nothing that I've tried has helped me select all text hidden.

And to manually find it and delete it is just out of the question. So, what you say guys, give a little help? Surely OOo can do it!


Direct link Reply with quote
 

Valeria Rivero  Identity Verified
Argentina
Local time: 01:53
Member (2011)
English to Spanish
copy text to Notepad, if all else fails Nov 16, 2009

I'm assuming that, for some reason, you can't use the "clean up" function from WB (tools > clean up), run the clean-up macro or get someone else with Trados to do it for you.

What works for me in Word 2007 (and it also worked in Word 2003) to get rid of the hidden text is to copy/paste the text in Notepad, then copy/paste it back to Word. The hidden text disappears but, alas, so does formatting.


Direct link Reply with quote
 

Tony M  Identity Verified
France
Local time: 06:53
Member
French to English
+ ...
Use Word? Nov 16, 2009

Since you do seem to have Word available, is there any reason why you can't simply open the doc in Word, do the manipulation, then close Word and open your doc in OO again?

Or could you simply 'save as' the file as (say) RTF, which would (I assume?) also get rid of the 'hidden text' elements? (without losing all your formatting!)


Direct link Reply with quote
 

Robert Tucker
United Kingdom
Local time: 05:53
German to English
+ ...
Last resort Nov 16, 2009

Perhaps as a last resort, unzip the .odt and edit the content.xml file. You will probably find all the hidden text is between tags like this:

<text:span text:style-name="T1">Hidden text...Hidden text...Hidden text...Hidden text...Hidden text</text:span>

With a text editor that can make regular expressions "lazy" you should be able to search for <text:span text:style-name="T1">.*</text:span> and replace with nothing.

Having deleted all the hidden text you can then rezip the files and rename the zip file to .odt, of course.


Direct link Reply with quote
 
FarkasAndras
Local time: 06:53
English to Hungarian
+ ...
Nice Nov 16, 2009

Robert Tucker wrote:

Perhaps as a last resort, unzip the .odt and edit the content.xml file. You will probably find all the hidden text is between tags like this:

Hidden text...Hidden text...Hidden text...Hidden text...Hidden text

With a text editor that can make regular expressions "lazy" you should be able to search for .* and replace with nothing.

Having deleted all the hidden text you can then rezip the files and rename the zip file to .odt, of course.

That's a pretty smart idea and potentiall a powerful tool. It could come in really handy!


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 06:53
Member (2006)
English to Afrikaans
+ ...
One answer Nov 16, 2009

alexliz wrote:
I seem to remember something like Regular Expressions (or something to this effect), which basically allows you to select, say Carriage Returns and other special characters, but nothing that I've tried has helped me select all text hidden.


1. In OOo 3.1, go Ctrl+F.
2. Click "More options" and enable regular expressions.
3. Type this in the Find box: { 0 > . + < } [ 0 - 9 ] + { > (without spaces)
4. Go "Find All", and close the Find dialog.
5. Press the Delete key to delete it.

Then:

1. In OOo 3.1, go Ctrl+F.
2. Click "More options" and disable regular expressions.
3. Type this in the Find box: < 0 } (without spaces)
4. Go "Find All", and close the Find dialog.
5. Press the Delete key to delete it.

==

Added: to do all of this, you need to have hidden text visible, of course. I think it's View > non-printing characters.

[Edited at 2009-11-16 19:26 GMT]


Direct link Reply with quote
 

alexliz  Identity Verified
Greece
Local time: 07:53
English to Greek
+ ...
TOPIC STARTER
Thank you all! Nov 16, 2009

What an amazing response! I will get busy trying out the suggestions!

Many thanks, people!!!

I will post back.


Direct link Reply with quote
 

alexliz  Identity Verified
Greece
Local time: 07:53
English to Greek
+ ...
TOPIC STARTER
Worked! Nov 16, 2009

@Samuel: BRILLIANT! It's done it! (of course you knew it

How come this useful tip is not more publicized in the OOo forum somewhere?


Direct link Reply with quote
 
esperantisto  Identity Verified
Local time: 07:53
Member (2006)
English to Russian
+ ...
Just a hint Nov 18, 2009

OOo’s find and replace feature is greatly enhanced by the AltSearch extension.

Direct link Reply with quote
 

alexliz  Identity Verified
Greece
Local time: 07:53
English to Greek
+ ...
TOPIC STARTER
AltSearch not working Nov 18, 2009

@esperantisto: I installed the extension you mention, but it doesn't seem to be doing anything, unless I haven't figured it out yet.

All I noticed after installation is a new icon on the main toolbar, one with binoculars. I click on it, but nothing happens.

Any tips welcome!


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to select and delete all hidden text in OpenOffice?

Advanced search






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search