Reported by pranavlal on 2015-06-27 06:25
I am attaching a word document to this ticket. When I move the cursor over the text, nvda says heading 1. However, if I use quick navigation, I am told that there are no headings in the document. This happens across versions of Microsoft word namely 2010 and 2013.
Attachment testDoc.docx added by pranavlal on 2015-06-27 06:27
test document for formatting issue
Comment 1 by pranavlal on 2015-06-27 06:28
Comment 2 by bhavyashah on 2015-06-27 07:04
I can confirm this issue.
I am using NVDA version 2015.2 with Microsoft Office Word 2007.
I haven't tested this attached example document, but, will soon attach another document where I experience this issue as well.
Comment 3 by briang1 on 2015-06-27 09:06
I can confirm this on even older versions of Word, ie 2002/3 using the conversion system downloaded from Microsoft to change the document into the form the earlier versions of word can use.
I can see its a header level 3 on the last line of the document but the browse mode ignorees it. Could it be due to it being at the last line perhaps?
I'm running this test in XP.
Comment 4 by bhavyashah on 2015-06-28 16:30
The Dropbox link of the sample document where I encounter this issue is https://www.dropbox.com/s/o5r41ymxds6ka9z/living_science_grade_8.docx?dl=0
Sorry for the late response...
Comment 5 by jteh on 2015-06-29 00:48
This text has an outline level, but Word doesn't consider it to be a heading. The question is what Word does consider to be a heading. We should probably restrict NVDA's reporting of heading so that it matches what Word considers to be a heading.
Technical: I think Word only considers something to be a heading if its style is based on the built-in heading styles. There are constants for the built-in styles; see WdBuiltinStyle Enumeration. The problem is that I don't see a way to get this constant from a Style object. You can keep calling BaseStyle on a style until BuiltIn returns true, but there doesn't seem to be a way to get the WdBuiltinStyle constant for that object.
So I don't forget (again)... Technical:
Some further notes:
If it were possible to detect the built-in style used for a range of text, we decided that we would only expose heading levels in NVDA for MS Word if the range used one of the heading built-in style constants directly, so as to match goto (used by heading quicknav).
Incubated in 8352d38.
In the end we did end up going with matching on the localized name of builtin heading styles, but by creating a cache of builtin heading style localized names on first use.