Hi Piet,
your makro is ingenious, short and effective, it does the job, than you very
much, I am happy.
Walther
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.
> >
> > Walther
>
> Even simpler:
>
> 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 *****
>
> Sub Main
>
> Dim oEnum 'com.sun.star.container.XEnumerationAccess
> Dim oPar
> Dim oSecEnum 'com.sun.star.container.XEnumerationAccess
> Dim oParSection
>
> 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 oParSection.CharHidden
> Then oParSection.setString("")
> End If
> Loop
>
> End If
> Loop
>
> End Sub
> --
> 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