none
w:shd fill="auto" appears to be ignored RRS feed

Answers

  • Hi Dave, I believe that I found the answer to this. The behavior is not explained in ISO/IEC 29500 or MS-OI29500. However, if we take a look at MS-DOC it does mention how 'auto' is handled in a few different contexts. First, a description of the Shd structure and the related Ipat structure…

     

    2.9.247 Shd

    The Shd structure specifies the colors and pattern that are used for background shading.

    ShdAuto is a special value for Shd that specifies that no shading is applied and is defined as the

    following Shd.

     


     

    2.9.121 Ipat

    The Ipat enumeration is an index to a shading pattern.

    Along with that, I found a few areas that specifically mentioned how ShdAuto behaves when it's used in a table cell. I think this explains the behavior that we see in your sample document. Please let me know if you have any other questions.

     

    • "Non-shaded cells in rgShd are set to ShdAuto"
    • "By default, the background shading of table cells is ShdAuto."
    • "If a cell is set to ShdAuto in rgShd, the cell is not shaded"

     


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

    Monday, November 14, 2016 8:38 PM
    Moderator

All replies

  • Hi Dave,
    Thank you for this question. One of our engineers will look into this and follow-up soon.
    Thanks,
    Edgar
    Friday, November 4, 2016 3:53 AM
    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, November 4, 2016 6:51 PM
    Moderator
  • Hi Dave, I've been looking into this and I wanted to touch base with you to make sure that I am understanding the issue from your perspective.

     

    Both of the table cells on the left side have an image in them. The anchor element has behindDoc="1" for both images. The shd element of the table cell properties in the top left cell has fill="00B0F0" and the bottom left is set to fill="auto". The expectation is that the image should be hidden in both cells because of the cell background color fill. The top left cell has a blue fill and we might expect that the lower left is filled with white. However, in this case, fill="auto" is NOT filling the cell with white. If I explicitly set the fill="FFFFFF" I get the expected result. The cell is filled with white and the image is hidden. In this scenario, fill="auto" results is what looks like no background fill at all.

     

    I believe that this goes back to another issue we discussed previously having to do with how the color "auto" is handled by various elements in which the behavior depends on the context such as the parent element. This is much more specific though so I should be able to find out something more solid.


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

    Thursday, November 10, 2016 11:39 PM
    Moderator
  • Yes & yes.

    Definitely a weird on huh?

    thanks - dave


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

    Thursday, November 10, 2016 11:43 PM
  • Hi Dave, I believe that I found the answer to this. The behavior is not explained in ISO/IEC 29500 or MS-OI29500. However, if we take a look at MS-DOC it does mention how 'auto' is handled in a few different contexts. First, a description of the Shd structure and the related Ipat structure…

     

    2.9.247 Shd

    The Shd structure specifies the colors and pattern that are used for background shading.

    ShdAuto is a special value for Shd that specifies that no shading is applied and is defined as the

    following Shd.

     


     

    2.9.121 Ipat

    The Ipat enumeration is an index to a shading pattern.

    Along with that, I found a few areas that specifically mentioned how ShdAuto behaves when it's used in a table cell. I think this explains the behavior that we see in your sample document. Please let me know if you have any other questions.

     

    • "Non-shaded cells in rgShd are set to ShdAuto"
    • "By default, the background shading of table cells is ShdAuto."
    • "If a cell is set to ShdAuto in rgShd, the cell is not shaded"

     


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

    Monday, November 14, 2016 8:38 PM
    Moderator
  • That matches everything - good job.

    What is the MS-DOC you reference? Is that the documentation for the.DOC format? And if so, where can I download it?

    thanks - dave


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

    Monday, November 14, 2016 8:42 PM
  • MS-DOC describes the binary (.doc) file format. It's occasionally relevant to questions about the OpenXML formats because the structures described in MS-DOC are also how the OpenXML package contents are represented in memory.

     

    You can download it here:  https://msdn.microsoft.com/en-us/library/cc313153(v=office.12).aspx


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

    Monday, November 14, 2016 8:54 PM
    Moderator