none
Why is some text bold when bold is never set? RRS feed

Answers

  • p/pPr/rPr has no effect as you found because rPr under pPr only sets the properties of the paragraph mark itself. This also negates my last post. Ignore it.

    Only r/rPr affect the actual run characters. 

    So "Loss Warranty" does not have bold property applied by docDefaults, paragraph or run properties. 

    This leaves style. The only style where w:b is specified is in the table style GridTable4 which is basedOn TableNormal. TableNormal has no w:b specified and is not basedOn anything else. So GridTable4 is the only style. 

    In GridTable4, only firstCol applies to "Loss Warranty". It's not in firstCol, firstRow, lastRow or in a band with an odd number (band1Horz). firstCol has w:b. 

    Therefore, we really don't have the situation where the bold property appears multiple times a the same level in the style hierachy, nor do we have the situation where it appears in multiple levels of the style hierarchy. So firstCol would just be applied. Therefore, "Loss Warranty" is bold. Sure enough, if I change the <w:b/> in firstCol properties to <w:b val="0"/>, "Loss Warranty" is no longer bold. 

    Tom

    • Marked as answer by DavidThi808 Saturday, March 2, 2019 6:53 PM
    Saturday, March 2, 2019 6:37 PM
    Moderator

All replies

  • Hello David,
    Thank you for this inquiry. One of our engineers will look into this and follow-up with you.
    Regards,
    Edgar
    Sunday, February 17, 2019 6:55 PM
    Moderator
  • Hi Dave, 

    For "Loss Warranty", the direct formatting is not applying any bold setting. I.e. at the run level, there's no w:b element. Therefore, the styles have to be considered together since this is a toggle property. 

    17.7.3 Toggle Properties says: 

    • If the value of the toggle property appears at multiple levels of the style hierarchy (§17.7.2), their effective values shall be combined as follows:
    •           If the value specified by the document defaults is true, the effective value is true.
    •           Otherwise, the values are combined by a Boolean XOR as follows:

    

    i.e., the effective value to be applied to the content shall be true if its effective value is true for an odd number of levels of the style hierarchy.

    If you follow this, the table style turns it on ("firstCol" properties), the paragraph turns is off and the character doesn't exist which would be the same as off or the default (no docDefault for w:b). XOR them and you get 1 or on for w:b. 

    Does this help?


    Best regards,
    Tom Jebo 
    Sr Escalation Engineer
    Microsoft Open Specifications Support

    Sunday, February 17, 2019 8:02 PM
    Moderator
  • Hi Tom;

    First off, thanks for the reply on a Sunday!

    Ok, looking at LossWarranty it is in the table with style GridTable4 and so firstCol has <w:b/> (sorry, I searched for "w:b " and missed that) so that turns it on. And the rule is as soon as there's a toggle in the table style additional cases life firstRow are skipped so the style turns it on.

    But you then say the para props. That's p/pPr/rPr but I think that is not applied as that's for bullets and the end of para marker, not para content - correct?

    So it's the one toggle and that is therefore bold is on - which is what is happening.

    Is that correct?

    thanks - dave


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

    Sunday, February 17, 2019 11:54 PM
  • Hi again;

    Ok, getting further into this, our code is doing this right but...

    It first reads the band1Horz setting, which is <w:b w:val="0"/>. Then following the rule that we should stop toggling as soon as we hit a setting in the conditional table formatting, stop looking at others. And with the value set to 0, we set to off.

    I'm guessing this is where we're wrong. So I'm guessing it's one of the following three (and you can tell me which) cases that we're off on:

    1. The val=0 should be ignored and a w:b is a toggle in styles.
    2. We should start with the most specific (corners) and work to general (horizontal band), stopping on the first toggle found.
    3. 2.3.2.1 says "Setting it to false (or an equivalent) shall result in the current setting remaining unchanged." which means a val=0 we should ignore and keep looking in the other conditionals. (Which brings up the question - why is it there???)

    ??? - thanks - dave


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

    Monday, February 18, 2019 12:34 AM
  • There is a pPr in the <body> element which I believe will carry through if no style is set in the table. w:b is set there so I assume this will be part of the XOR equation. But the result is the same. 

    Tom

    Monday, February 18, 2019 2:31 AM
    Moderator
  • Ok, did some further testing:

    1. Changed the <w:b w:val='0'/> in p/pPr/rPr to <w:i w:val='1'/> - text is still bold and it is not italic. So what is in p/pPr/rPr has no impact.
    2. In styles I change every <w:b/> to <w:b val='0'/> - text is not bold. So val='0' means ignore the setting.
    3. Changed just band1Horiz to <w:b/> - still regular text.
    4. Turned on using lastRow setting, removed bold from all other conditionals.
    5. Set lastRow to <w:b/> and firstCol to <w:b w:val='0'/> - bold text
    6. Set lastRow to <w:b val='0'/> and firstCol to <w:b/> - regular text

    The order used is corners, top/bottom, left/right, banded columns, banded rows. So it looks like the first instance of <w:b/> is the only one used (lastRow comes before firstCol) and if it has val='0' it means no effect. But you still stop looking at that point.

    Does this make sense to you?

    thanks - dave


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


    • Edited by DavidThi808 Monday, February 18, 2019 5:56 PM
    Monday, February 18, 2019 5:39 PM
  • Maybe we're looking at the wrong thing. I believe that direct formatting should have applied here. I can't find a reason why it didn't and no notes in MS-OI29500. 

    Tom

    Saturday, March 2, 2019 12:52 AM
    Moderator
  • p/pPr/rPr has no effect as you found because rPr under pPr only sets the properties of the paragraph mark itself. This also negates my last post. Ignore it.

    Only r/rPr affect the actual run characters. 

    So "Loss Warranty" does not have bold property applied by docDefaults, paragraph or run properties. 

    This leaves style. The only style where w:b is specified is in the table style GridTable4 which is basedOn TableNormal. TableNormal has no w:b specified and is not basedOn anything else. So GridTable4 is the only style. 

    In GridTable4, only firstCol applies to "Loss Warranty". It's not in firstCol, firstRow, lastRow or in a band with an odd number (band1Horz). firstCol has w:b. 

    Therefore, we really don't have the situation where the bold property appears multiple times a the same level in the style hierachy, nor do we have the situation where it appears in multiple levels of the style hierarchy. So firstCol would just be applied. Therefore, "Loss Warranty" is bold. Sure enough, if I change the <w:b/> in firstCol properties to <w:b val="0"/>, "Loss Warranty" is no longer bold. 

    Tom

    • Marked as answer by DavidThi808 Saturday, March 2, 2019 6:53 PM
    Saturday, March 2, 2019 6:37 PM
    Moderator