superb, a makro! I will try it later on.
Am Mittwoch, 4. Mai 2016 schrieb Piet van Oostrum:
Walther Koehler wrote:
> Am Mittwoch, 4. Mai 2016 schrieb Piet van Oostrum:
> > Walther Koehler wrote:
> > > Thank you.
> > > Your procedure is principally what I need.
> > > However, quite complicated for routine work.
> > >
> > > Walther
> > The first part (replacing hidden text with colored text) could be done
> > with a script.
> yes, and the whole procedure could be packed in a basic makro.
> The script can be called by a shell command within a makro, the replace
> functions realized with dispatcher commands.
> Let us try it.
Here is a Basic macro that just walks through the document, and deletes all
hidden text. No unzipping, editing, etc. It just works inside the ODT
document in LO.
It only considers normal plain text, i.e. not inside tables, sections,
frames, footnotes, etc. If you want that, these have to be specially coded.
REM ***** BASIC *****
Dim oEnum 'com.sun.star.container.XEnumerationAccess
Dim oSecEnum 'com.sun.star.container.XEnumerationAccess
oEnum = ThisComponent.Text.createEnumeration()
Do While oEnum.hasMoreElements()
oPar = oEnum.nextElement()
If oPar.supportsService("com.sun.star.text.Paragraph") Then
oSecEnum = oPar.createEnumeration()
Do While oSecEnum.hasMoreElements()
oParSection = oSecEnum.nextElement()
If oParSection.TextPortionType = "Text" AND
Piet van Oostrum <email@example.com>
PGP key: [8DAE142BE17999C4]
To unsubscribe e-mail to: firstname.lastname@example.org
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
Re: free text editor (was: [libreoffice-users] delete hidden formated text in odt) · Barry Smith
(message not available)
- Re: free text editor (was: [libreoffice-users] delete hidden formated text in odt) (continued)
Impressum (Legal Info)
: 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