none
17.4.67 (or 17.4.66) - # of lines in border RRS feed

  • Question

  • Hi;

    I think in that it means the number of borders around the cell. So if left & top are defined and right & bottom are not then it's 2. A couple of questions:

    1. It's just the left, top, right, & bottom correct? Not between, vertical, etc.
    2. A border set to none or nil does not count in the number of lines - correct?
    3. For the "# of lines in border * border number" does the lower number win, or the higher number? Playing with Word it seems to be the higher number.
    4. When it lists the border val list that goes from single to inset, the lower number wins - correct?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing



    • Edited by DavidThi808 Thursday, April 21, 2016 10:59 PM
    Thursday, April 21, 2016 10:57 PM

Answers

  • Hi Dave, my previous statement regarding how the weight calculation is performed was incorrect. While reviewing the documentation on this again, I noticed something that I missed previously which I believe explains it very clearly and removes any ambiguity...

     

    ISO/IEC 29500-1 section 17.4.66 defines the border weight calculation as the following with no explanation as to what "# of lines in border" really means.

     

    • Wborder = # of lines in border * border number

     

     

    Whereas MS-OI29500 section 2.1.167 defines the weight calculation as the following.

     

    • Wborder = border width * border number

     

    It then clarifies that the border width "shall be specified in measurements of eighths of a point." Conveniently, the sz attribute of the border type elements "is specified in measurements of eighths of a point" (ISO/IEC 29500-1 section 17.3.4). From this we now know that the border weight calculation can be represented as follows:

     

    • Wborder = sz * border number

     

    Please let me know if this answers your question.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Wednesday, May 18, 2016 8:19 PM
    Moderator

All replies

  • Hi Dave,

    Thank you for your question. One of our protocols engineers will respond.


    Jeff McCashland | Microsoft Protocols Open Specifications Team

    Thursday, April 21, 2016 11:34 PM
    Moderator
  • Hi Dave, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Friday, April 22, 2016 8:28 PM
    Moderator
  • Hi Dave, I haven't been able to confirm this, but my own testing has shown that it appears to be using the number of lines in the border style itself and that the weight is evaluated separately for each border between 2 cells. I tried several different scenarios and they all worked out the same. Here's a good example that I think illustrates it well involving a 4x3 table. The middle 2 cells have the following XML.

     

    <w:tc>

       <w:tcPr>

          <w:tcW w:w="1350" w:type="dxa"/>

          <w:tcBorders>

             <w:top w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>

             <w:start w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>

             <w:bottom w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>

             <w:end w:val="double" w:sz="24" w:space="0" w:color="FF0000"/>

          </w:tcBorders>

       </w:tcPr>

       <w:p w:rsidR="004F7973" w:rsidRDefault="004F7973"/>

    </w:tc>

    <w:tc>

       <w:tcPr>

          <w:tcW w:w="1260" w:type="dxa"/>

          <w:tcBorders>

             <w:start w:val="triple" w:sz="24" w:space="0" w:color="0000FF"/>

          </w:tcBorders>

       </w:tcPr>

       <w:p w:rsidR="004F7973" w:rsidRDefault="004F7973"/>

    </w:tc>

    <w:tc>

     

    And the results looks like this:

     

     

    Based on your original question, there are 2 possible ways to calculate the weight of the borders.

    1. borderWeight = # of borders in cell * border number.
    2. borderWeight = # of lines in border style * border number.

     

    The "double" border is #3 and the "triple" border is #8.

     

    Given the first method the results might look like this. In this case, the red border should win, but it doesn't.

    • Red cell: 4 * 3 = 12
    • Blue cell: 1 * 8 = 8

     

    I think it's using the second method, which works out this way and the blue border with 3 lines wins.

    • Red cell: 2 * 3 = 6
    • Blue cell: 3 * 8 = 24 

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team



    Friday, April 29, 2016 10:37 PM
    Moderator
  • Hi Josh;

    I think you're right based on what it's doing. But can you still ask because that is a weird way to do it. It already sets the weight for the border type which prioritizes triple over double.

    And the only ones that are not 1 are double & triple correct?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Sunday, May 1, 2016 2:41 PM
  • Hi Dave, I haven't looked at an example of every single border type, but I am still trying to get confirmation on exactly how the weight is calculated. I'll let you know when I have more information regarding that.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Monday, May 2, 2016 9:03 PM
    Moderator
  • Hi Dave, my previous statement regarding how the weight calculation is performed was incorrect. While reviewing the documentation on this again, I noticed something that I missed previously which I believe explains it very clearly and removes any ambiguity...

     

    ISO/IEC 29500-1 section 17.4.66 defines the border weight calculation as the following with no explanation as to what "# of lines in border" really means.

     

    • Wborder = # of lines in border * border number

     

     

    Whereas MS-OI29500 section 2.1.167 defines the weight calculation as the following.

     

    • Wborder = border width * border number

     

    It then clarifies that the border width "shall be specified in measurements of eighths of a point." Conveniently, the sz attribute of the border type elements "is specified in measurements of eighths of a point" (ISO/IEC 29500-1 section 17.3.4). From this we now know that the border weight calculation can be represented as follows:

     

    • Wborder = sz * border number

     

    Please let me know if this answers your question.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Wednesday, May 18, 2016 8:19 PM
    Moderator
  • Good job, yes, thank you.

    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Wednesday, May 18, 2016 8:30 PM