none
How to recognize table end RRS feed

  • Question

  • hi~

    In doc format document, I want to know which unicode value and paraproperty make table end.

    I saw sprmPFTtp means table terminating paragraph mark in specification.

    But, it shows every row end.

    How can I recognize table end?


    • Edited by JJDad Thursday, August 21, 2014 9:07 AM
    Thursday, August 21, 2014 9:06 AM

Answers

  • Hello c200cgi,

    As stated in [MS-DOC] §1.3.4, "there are no characters to denote the beginning of a table cell or the end of the table as a whole." Without knowing more about exactly what you’re doing, it would seem that the best way forward would be to utilize the first algorithm described in §2.4.5:

    Given character position cp, use the following algorithm to determine if cp is in a table.

    1. Follow the procedure from Direct Paragraph Formatting to find the paragraph properties for the paragraph that contains cp. Apply the properties and determine the table depth as specified in Overview of Tables. Call this itap.
    2. If itap is zero, then this paragraph is not in a table row. Leave the algorithm.

    By iterating through character positions starting with one that is inside the table you’re interested in and applying this algorithm, you can determine the first character position that is not inside of a table. If the tables are nested, you can use the same algorithm but instead of terminating when itap is zero, you terminate when itap is one less than the previous itap.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Friday, August 29, 2014 9:58 PM

All replies

  • Hi c200cgi,
                    Thank you for your inquiry about office document protocols. One of the Open specifications team member will contact you shortly.

     
    Regards,
    Sreekanth Nadendla
    Microsoft Windows Open specifications

    Thursday, August 21, 2014 1:51 PM
    Moderator
  • Hello c200cgi,

    As stated in [MS-DOC] §1.3.4, "there are no characters to denote the beginning of a table cell or the end of the table as a whole." Without knowing more about exactly what you’re doing, it would seem that the best way forward would be to utilize the first algorithm described in §2.4.5:

    Given character position cp, use the following algorithm to determine if cp is in a table.

    1. Follow the procedure from Direct Paragraph Formatting to find the paragraph properties for the paragraph that contains cp. Apply the properties and determine the table depth as specified in Overview of Tables. Call this itap.
    2. If itap is zero, then this paragraph is not in a table row. Leave the algorithm.

    By iterating through character positions starting with one that is inside the table you’re interested in and applying this algorithm, you can determine the first character position that is not inside of a table. If the tables are nested, you can use the same algorithm but instead of terminating when itap is zero, you terminate when itap is one less than the previous itap.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Friday, August 29, 2014 9:58 PM