none
PPT: Missing valid BulletFlags.fHasBullet for a run of text RRS feed

  • Question

  • Hi,

    I'm processing the textual content of a presentation slide and I have problems to identify a list with bullets.

    The following approach is used:

    To decide whether the text is in a list with bullets or in a simple paragraph, the value of TextPFException.bulletFlags.fHasBullet is checked.  This one is valid if TextPFException.masks.hasBullet = true.

    Presentation Slide

    If the value of fHasBullet is not valid, or there are no BulletFlags, then the TextMasterStyleAtom of the corresponding main master/title master slide with recInstance = TextHeaderAtom.textType is checked.

    Main Master Slide / Title Master Slide

    If the value of fHasBullet is not valid, or there are no BulletFlags then TextMasterStyleAtom and TextPFExceptionAtom in DocumentContainer.DocumentTextInfoContainer are checked.  Of course TextMasterStyleAtom.recInstance = TextHeaderAtom.textType applies.

    Current Issue

    This approach works on my test documents saved in MS Office 2003, but when I re-saved the documents in MS Office 2007, I noticed there's no valid BulletFlags.fHasBullet in a few cases.

    Let's check the test documents.  There's only one run of text with indentLevel = 1 corresponding to the OfficeArtSpContainer.clientTextBox of the second msosptRectangle type shape, which should have a bullet char. 

    In both documents I ended up checking the textPFDefaultsAtom in DocumentTextInfoContainer.  The difference is that in case of the MS Office 2003 file textPFDefaultsAtom has fHasBullet = true (hasBullet = true), whereas the MS Office 2007 file does not have BulletFlags in textPFDefaultsAtom.

    Test Documents:
    http://neuron.tuke.sk/~uzak/koffice/powerpoint/list_styles_mp03.ppt
    http://neuron.tuke.sk/~uzak/koffice/powerpoint/list_styles_mp07.ppt

    Please check my current approach and provide some hints to solve the described issue.  Is there any other default value for the BulletFlags.fHasBullet bit?

    br,

    Matus Uzak

     

    2.9.1 DocumentTextInfoContainer

    A container record that specifies default settings and user preferences for text.

    textPFDefaultsAtom (variable): An optional TextPFExceptionAtom record that specifies default settings for paragraph-level style and formatting.

    textMasterStyleAtom (variable): A TextMasterStyleAtom record that specifies the character-level and paragraph-level formatting of a main master slide.

     

    2.9.20 TextPFException


    A structure that specifies paragraph-level formatting.

     

    2.9.21 PFMasks

    A structure that specifies which paragraph-level formatting fields are valid in the TextPFException or TextPFException9
    record that contains this PFMasks structure.

    2.9.22 BulletFlags

    A structure that specifies bullet properties.

    fHasBullet (1 bit): A bit that specifies whether a bullet exists.

    2.9.35 TextMasterStyleAtom

    An atom record that specifies the character-level and paragraph-level formatting of a main master slide. 

    If this TextMasterStyleAtom is contained in a MainMasterContainer record, character-level and paragraph-level formatting not specified by this TextMasterStyleAtom record inherit from the TextMasterStyleAtom record contained in the
    DocumentTextInfoContainer record.


    2.9.41 TextHeaderAtom

    An atom record that specifies the type of a text body. The presence of this atom indicates a text body whose properties are specified by other atom and container records that follow.

    textType (4 bytes): A TextTypeEnum enumeration that specifies the type of the text body.

    2.9.45 TextPFRun

    A structure that specifies the paragraph-level formatting of a run of text.

    indentLevel (2 bytes): An IndentLevel that specifies the indentation level of the paragraph.

     

    Wednesday, October 20, 2010 9:30 AM

Answers

  • Matus, the following are the results of our research. Please let me know if this helps.

     

    Here are some observations from the files you supplied.

    1.       For list_style_mp07.ppt:  In TextMasterStyleArray, the second TextMasterStyleAtom is for Tx_TYPE_BODY. For its TextMasterStyleLevel - lstLvl2, bulletFlags.fHasBullet = 1 and masks.hasBullet = 0. This is the same with list_style_mp03.ppt. I.e. 07 an d03 have the same master style.

    2.       For DocumentTextInfoContainer\TextPFExceptionAtom, for list_style_mp07.ppt, masks.hasBullet = 0, and no bulletFlags. For list_style_mp03.ppt, masks.hasBullet = 1, and bulletFlags.fHasBullet = 1. But this doesn’t matter, because the master body already has bullets.

     

    How to decide whether it has bullet for a Tx_TYPE_BODY in TextMasterStyleAtom:

    1.       It defaults to having bullet;

    2.       It has no bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 0.

     

    How to decide whether it has bullet for other types (like Tx_TYPE_CENTER, Tx_TYPE_TITLE, etc.) in TextMasterStyleAtom:

    1.       For the first level, e.g. Tx_TYPE_TITLE in TextMasterStyleAtom – which has only one level:

    a.       It defaults to no bullet;

    b.      It has bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 1.

    2.       For other levels – if they have, they could follow the previous level:

    a.       It defaults to whether the previous level has bullet;

    b.      If its previous level has bullet, this level has no bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 0;

    c.       If its previous level has no bullet, this level has bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 1.

    3.       Tx_TYPE_CENTERTITLE could follow Tx_TYPE_TITLE, Tx_TYPE_CENTERBODY, Tx_TYPE_HALFBODY, and Tx_TYPE_QUARTERBODY could follow Tx_TYPE_BODY. For them, we need to resolve up to its base to check whether they have bullet.


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Monday, December 6, 2010 4:30 PM
    Moderator

All replies

  • matus,

    someone from our team will follow-up with you shortly in regards to your issue.

    dominic salemno
    escalation engineer
    open specifications

    Wednesday, October 20, 2010 2:08 PM
  • Hi Matus,

    Thank you for your question.  I will investigate this and follow up with you.

    Regards,

    Mark Miller

    Escalation Engineer

    US-CSS DSC PROTOCOL TEAM

    Thursday, October 21, 2010 12:52 PM
  • Hi Matus,

     

    In the MainMasterContainer the TextMasterStyleAtom with recInstance == 1 (Tx_TYPE_BODY) for lstLvl1 shows hasBullet == 1 and fHasBullet == 1.

    This is true in both the 2003 and 2007 files and explains why both files show bullets when opened. You are correct that the textPFDefaultsAtom are different between 2003 and 2007, but that’s irrelevant, as processing never gets that far. The question is resolved in the MainMasterContainer and so the defaults are never considered.

     

    Best regards,

    Tom Jebo

    Escalation Engineer

    Microsoft Open Specifications Team

     

    • Marked as answer by Chris Mullaney Wednesday, November 10, 2010 10:02 PM
    • Unmarked as answer by Matus Uzak Thursday, November 11, 2010 1:25 PM
    Friday, November 5, 2010 4:12 PM
  • Hi,

    thanks for response, but lstLvl1 you mentioned is not related to my issue.

    Again there's only one run of text with indentLevel = 1 corresponding to the OfficeArtSpContainer.clientTextBox of the second msosptRectangle type shape, which should have a bullet char. My problem is that I can't find a valid TextPFException.bulletFlags.fHasBullet for this text in the MS Office 2007 test file.  As a result it looks like the text is in a simple paragaph instead of a list.  The clientTextBox contains also some text with indentLevel = 0 .  Sorry for that, but I don't have any MS Office version at hand actually to create simpler test files.

    In the MainMasterContainer the TextMasterStyleAtom with recInstance == 1 (Tx_TYPE_BODY) for lstLvl2 shows hasBullet == 0 and fHasBullet == 1.  In this case fHasBullet is not valid.
    That's why I end up checking the textPFDefaultsAtom in DocumentTextInfoContainer.

    2.9.35 TextMasterStyleAtom

    lstLvl1 (variable): An optional TextMasterStyleLevel structure that specifies the master formatting for text that has an
    IndentLevel equal to 0x0000. It MUST exist if and only if cLevels is greater than 0x0000.

    lstLvl2 (variable): An optional TextMasterStyleLevel structure that specifies the master formatting for text that has an
    IndentLevel equal to 0x0001. It MUST exist if and only if cLevels is greater than 0x0001.

    br,

    Matus Uzak

    Thursday, November 11, 2010 1:25 PM
  • Matus,

    I'm checking on this again.  I'll get back to you soon.

    Tom

    Sunday, November 14, 2010 6:09 PM
  • Matus, we are still looking into this issue. I hope to have more information for you soon. Your patience is greatly appreciated.
    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Wednesday, December 1, 2010 8:46 PM
    Moderator
  • Matus, the following are the results of our research. Please let me know if this helps.

     

    Here are some observations from the files you supplied.

    1.       For list_style_mp07.ppt:  In TextMasterStyleArray, the second TextMasterStyleAtom is for Tx_TYPE_BODY. For its TextMasterStyleLevel - lstLvl2, bulletFlags.fHasBullet = 1 and masks.hasBullet = 0. This is the same with list_style_mp03.ppt. I.e. 07 an d03 have the same master style.

    2.       For DocumentTextInfoContainer\TextPFExceptionAtom, for list_style_mp07.ppt, masks.hasBullet = 0, and no bulletFlags. For list_style_mp03.ppt, masks.hasBullet = 1, and bulletFlags.fHasBullet = 1. But this doesn’t matter, because the master body already has bullets.

     

    How to decide whether it has bullet for a Tx_TYPE_BODY in TextMasterStyleAtom:

    1.       It defaults to having bullet;

    2.       It has no bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 0.

     

    How to decide whether it has bullet for other types (like Tx_TYPE_CENTER, Tx_TYPE_TITLE, etc.) in TextMasterStyleAtom:

    1.       For the first level, e.g. Tx_TYPE_TITLE in TextMasterStyleAtom – which has only one level:

    a.       It defaults to no bullet;

    b.      It has bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 1.

    2.       For other levels – if they have, they could follow the previous level:

    a.       It defaults to whether the previous level has bullet;

    b.      If its previous level has bullet, this level has no bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 0;

    c.       If its previous level has no bullet, this level has bullet if masks.hasBullet = 1 and bulletFlags.fHasBullet = 1.

    3.       Tx_TYPE_CENTERTITLE could follow Tx_TYPE_TITLE, Tx_TYPE_CENTERBODY, Tx_TYPE_HALFBODY, and Tx_TYPE_QUARTERBODY could follow Tx_TYPE_BODY. For them, we need to resolve up to its base to check whether they have bullet.


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Monday, December 6, 2010 4:30 PM
    Moderator
  • Hi Josh,

    of course this helps!  The default values are not described in [1].  I figured out some of the rules for other text types when I
    was fine tuning processing of text colors.  Mine are very similar to yours, but the default values you provided were the problem.

    Thanks!

    Matus Uzak (Calligra Suite developer)

    [1] [MS-PPT]: PowerPoint (.ppt) Binary File Format, v20100926
    Wednesday, December 8, 2010 5:31 PM