locked
Word 2010 Hidden Font Effect Bug RRS feed

  • Question

  • I think I've found a bug in Word 2010 when using styles with the Hidden font effect set.

    Say I have a document with two custom styles: one a paragraph style and the other a character style, and they both have the Hidden font effect set to true. They look like this:

    <w:style w:type="paragraph" w:customStyle="1" w:styleId="Style1">
        <w:name w:val="Style1"/>
        <w:basedOn w:val="Normal"/>
        <w:qFormat/>
        <w:rsid w:val="00800E6A"/>
        <w:pPr>
          <w:shd w:val="clear" w:color="auto" w:fill="FFFF00"/>
        </w:pPr>
        <w:rPr>
          <w:vanish/>
          <w:color w:val="FF0000"/>
        </w:rPr>
      </w:style>

    <w:style w:type="character" w:customStyle="1" w:styleId="Style2">

        <w:name w:val="Style2"/>
        <w:basedOn w:val="DefaultParagraphFont"/>
        <w:uiPriority w:val="1"/>
        <w:qFormat/>
        <w:rsid w:val="00800E6A"/>
        <w:rPr>
          <w:vanish/>
          <w:color w:val="365F91" w:themeColor="accent1" w:themeShade="BF"/>
          <w:bdr w:val="none" w:sz="0" w:space="0" w:color="auto"/>
          <w:shd w:val="clear" w:color="auto" w:fill="D6E3BC" w:themeFill="accent3" w:themeFillTint="66"/>
        </w:rPr>
      </w:style>


    If I apply the paragraph style to a paragraph and then apply the character style to a run of text within the paragraph, the hidden effect is turned off for this run of text, which means that if I print the document with the "Print hidden text" option set to false the run of text with the character style applied appears in the print-out. The paragraph xml looks like this (note : I have cleaned up this xml for the purpose of this example):

        <w:p>
          <w:pPr>
            <w:pStyle w:val="Style1"/>
          </w:pPr>
          <w:r>
            <w:t>Test </w:t>
          </w:r>
          <w:r>
            <w:rPr>
              <w:rStyle w:val="Style2"/>
            </w:rPr>
            <w:t>test</w:t>
          </w:r>
          <w:r>
            <w:t> test</w:t>
          </w:r>
        </w:p>

    Would you consider this to be a bug?

    Chris

    Friday, February 24, 2012 3:37 AM

Answers

  • Probably would have helped if I'd done this in the first place, but I've just been reading the spec for the Open XML file format and as it turns out the vanish property is a toggle property and so according to the spec the above example behaves correctly.

    I wonder though if Word should toggle the property back on as direct formatting (as it does with linked styles) when I apply a style with the vanish property on to text whose paragraph has a different style with the vanish property turned on. From a user's perspective I think this behaviour is a bit confusing.

    Chris

    • Marked as answer by chrissafc33 Thursday, March 15, 2012 8:00 AM
    Thursday, March 15, 2012 8:00 AM