Hi there,
here at ApacheCon Europe 2012 (Sinsheim) Christoph Lipp from Munich solved the
mystery today!
In Impress you need to use a XTextRange and set one of its properties named
"NumberLevel" to a value
between 0 and 8.
After learning the result of his research and experiments I have added a
nutshell example
demonstrating this (also reading and determining the defined NumberLevel using
an XEnumerationAccess
as no XParagraphCursor is available) to my presentation tomorrow ("Scripting
Apache OpenOffice")
you can fetch that presentation's PDF to see a working example, once it becomes
available.
If there is interest, I could also post that nutshell example here.
---rony
P.S.: It has been a great and interesting conference!
On 02.11.2012 17:03, Rony G. Flatscher wrote:
> When working interactively (via the GUI) with Impress it is fairly easy and
> straightforward to enter
> text like this in the (usually) bulleted placeholder area of the content part:
>
> * first praragraph
> o indented under first para
> o indented after second para
> * second paragraph
> o indented under second para
> + indented one level more
> * third paragrpah
>
> Trying to do the same programmatically (e.g. via Java, C++) has not been
> possible for me so far. The
> best I could arrive at was fetching the correct XShape with a ShapeType of
> "com.sun.star.presentation.OutlinerShape" and using the XText setString()
> method to set text.
> However, the result is not formatted according to the content's outline
> layout! :(
>
> So far, I have not been successful in finding the corners (interfaces,
> properties, or whatever is
> needed) where one becomes able to insert text and determine what outline
> level it should be placed
> at within the OutlinerShape.
>
> Even tried to get via the StyleFamily the "Default" one which contains
> XStyles "outline1" through
> "outline9" and assign e.g. the XStyle "outline1" to the OutlinerShape
> (property "Style") without any
> effects.
>
> Also googling for Java, C++ or AOO/OOO Basic examples yielded no results so
> far.
>
> Also trying to get at the functionality by recording macros to get at the
> dispatches does not work
> as simpress does not allow for recording macros. :(
>
> ---
>
> So does anyone know or have samples that would demonstrate how to create two
> or three simple slides
> with bulleted text with different outlines?
> (Preferably also showing how to add custom animation to each outline text
> paragraph in these slides?)
>
> TIA for any hints/insights/samples,
>
> ---rony
>
>