@@ -1371,17 +1371,34 @@ def script_sayAll(self,gesture):
13711371 script_sayAll .category = SCRCAT_SYSTEMCARET
13721372
13731373 def _reportFormattingHelper (self , info , browseable = False ):
1374- formatConfig = {
1375- "detectFormatAfterCursor" :False ,
1376- "reportFontName" :True ,"reportFontSize" :True ,"reportFontAttributes" :True ,"reportColor" :True ,"reportRevisions" :False ,"reportEmphasis" :False ,
1377- "reportStyle" :True ,"reportAlignment" :True ,"reportSpellingErrors" :True ,
1378- "reportPage" :False ,"reportLineNumber" :False ,"reportLineIndentation" :True ,"reportLineIndentationWithTones" :False ,"reportParagraphIndentation" :True ,"reportLineSpacing" :True ,"reportTables" :False ,
1379- "reportLinks" :False ,"reportHeadings" :False ,"reportLists" :False ,
1380- "reportBlockQuotes" :False ,"reportComments" :False ,
1381- "reportBorderStyle" :True ,"reportBorderColor" :True ,
1382- }
1383- textList = []
1374+ # Report all formatting-related changes regardless of user settings
1375+ # when explicitly requested.
1376+ # These are the options we want reported when reporting formatting manually.
1377+ # for full list of options that may be reported see the "documentFormatting" section of L{config.configSpec}
1378+ reportFormattingOptions = (
1379+ "reportFontName" ,
1380+ "reportFontSize" ,
1381+ "reportFontAttributes" ,
1382+ "reportSuperscriptsAndSubscripts" ,
1383+ "reportColor" ,
1384+ "reportStyle" ,
1385+ "reportAlignment" ,
1386+ "reportSpellingErrors" ,
1387+ "reportLineIndentation" ,
1388+ "reportParagraphIndentation" ,
1389+ "reportLineSpacing" ,
1390+ "reportBorderStyle" ,
1391+ "reportBorderColor" ,
1392+ )
1393+
1394+ # Create a dictionary to replace the config section that would normally be
1395+ # passed to getFormatFieldsSpeech / getFormatFieldsBraille
1396+ formatConfig = dict ()
1397+ from config import conf
1398+ for i in conf ["documentFormatting" ]:
1399+ formatConfig [i ] = i in reportFormattingOptions
13841400
1401+ textList = []
13851402 # First, fetch indentation.
13861403 line = info .copy ()
13871404 line .expand (textInfos .UNIT_LINE )
0 commit comments