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 > > simple.) > Unfortunately, I am not used to emacs, although I know it is a very powerful > editor.
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 5.1.2.2 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 <[email protected]> WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- To unsubscribe e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
