Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index

Walther Koehler wrote:

Hi Robert

Am Dienstag, 3. Mai 2016 schrieb Robert Funnell:
Walther -

Could you open your content.xml with Emacs and record a macro to
find and remove the hidden text? (I'm not sure that qualifies as
Unfortunately, I am not used to emacs, although I know it is a very powerful 

Here is a simple recipe that you can use with any text editor (including sed):
Please do this on a copy of your original document, or make a backup copy first.

Unzip from your document the file content.xml:
unzip HiddenText.odt content.xml

Edit content.xml, replace all occurrences of text:display="none" with fo:color="#800080"
This replaces the hidden text with a colored text. I have chosen magenta (#800080) here; you should 
choose a color that is not used in your document.
sed -e 's/text:display="none"/fo:color="#800080"/' content.xml > content2.xml

Rename the new file to content.xml
mv content2.xml content.xml

Replace content.xml in the ODT file
zip HiddenText.odt content.xml

Now open the file in LibreOffice, and replace the magenta-colored text with empty text.

Edit > Find & Replace
Other Options > Format > Font Effects > Font color > Magenta

I found that Replace All did not work. It said that it replaced the text but it didn't (LO 
on Mac OS X). The alternative Replace and Find extension, however, did work. There you choose 
[:::CharColor=8388736::] as search criterium (colors are given in decimal).

Piet van Oostrum <>
PGP key: [8DAE142BE17999C4]

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.