views:

46

answers:

2

Hi, guys.

I'm working on PowerPoint 2003 presentation conversion into some format, and I'm confused very much at one moment. Really, I can't understand what I'm doing wrong for almost two days wasting my time for this i-thought-it-was-tiny problem. I use PowerPoint Object Model to get the presentation document structure and its layout, all the shapes I render are converted with no problems, non-list paragraphs are converted pretty well too. But the text frames with numbered or bulletted lists are dispositioned.

I thought that the following code should work pretty well too. Actually, I've failed:

bulletLeft = currentTextRange.BoundLeft;

currentTextRange.BoundLeft actually returns the position of the bulletted list item text that should be placed here. But I don't understand, I can't understand, etc: how to get X-position of the list item paragraph bullet?

I understand, it's a little problem in real but I'm wasted solving it.
Thank you.

A: 

Nevermind, guys. It was my friend's bug on text rendering. The bullet position should be set with the following code:

bulletLeft = shape.Left + shape.TextFrame.MarginLeft;

Sorry for disturbing.

Lyubomyr Shaydariv
actually it's ugly solution indeed (((
Lyubomyr Shaydariv
A: 
left += Shape.TextFrame.Ruler.Levels[IndentLevel].FirstMargin;
Lyubomyr Shaydariv