1. Compile and run the attached program to the bug report 407819
2. Make sure that "auto extension" checkbox is enabled
3. Select the last file filter (DocBook (.xml)) via dropdown list
4. Click "Save"
5. Check program output
Result without this patch:
The output is "Word 2003 XML (.xml) (*.xml)"
Result with this patch applied:
The output should be "DocBook (.xml) (*.xml)", since this was selected in the file dialog.
Fixes bug 407819