From 3737e3ce2797ba0b63e7d3f50d6cd792a0895037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Golonka?= Date: Mon, 7 Dec 2020 08:05:07 +0100 Subject: [PATCH 1/3] Fix: NVDA no longer fails to restart when running from sources and cwd is different to the sources dir (#11904) --- source/core.py | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/source/core.py b/source/core.py index 8509a82ac68..00d34fdf9aa 100644 --- a/source/core.py +++ b/source/core.py @@ -116,29 +116,28 @@ def restart(disableAddons=False, debugLogging=False): import subprocess import winUser import shellapi - options=[] - try: - sys.argv.remove('--disable-addons') - except ValueError: - pass - try: - sys.argv.remove('--debug-logging') - except ValueError: - pass + for paramToRemove in ("--disable-addons", "--debug-logging", "--ease-of-access"): + try: + sys.argv.remove(paramToRemove) + except ValueError: + pass + options = [] + if not hasattr(sys, "frozen"): + options.append(os.path.basename(sys.argv[0])) if disableAddons: options.append('--disable-addons') if debugLogging: options.append('--debug-logging') - try: - sys.argv.remove("--ease-of-access") - except ValueError: - pass - shellapi.ShellExecute(None, None, - sys.executable, - subprocess.list2cmdline(sys.argv + options), - None, + shellapi.ShellExecute( + hwnd=None, + operation=None, + file=sys.executable, + parameters=subprocess.list2cmdline(options + sys.argv[1:]), + directory=globalVars.appDir, # #4475: ensure that the first window of the new process is not hidden by providing SW_SHOWNORMAL - winUser.SW_SHOWNORMAL) + showCmd=winUser.SW_SHOWNORMAL + ) + def resetConfiguration(factoryDefaults=False): """Loads the configuration, installs the correct language support and initialises audio so that it will use the configured synth and speech settings. From 9c0b64998c8c5427fc9b2575d0cae43cd1a4d401 Mon Sep 17 00:00:00 2001 From: Cyrille Bougot Date: Mon, 7 Dec 2020 08:17:34 +0100 Subject: [PATCH 2/3] MS Word: report the number of pts of line spacing when line spacing type is set to 'Exactly'. (#11900) --- source/NVDAObjects/window/winword.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/NVDAObjects/window/winword.py b/source/NVDAObjects/window/winword.py index bcdcecaff6c..98f05c76c74 100755 --- a/source/NVDAObjects/window/winword.py +++ b/source/NVDAObjects/window/winword.py @@ -843,8 +843,11 @@ def _normalizeFormatField(self,field,extraDetail=False): # Translators: line spacing of 1.5 lines field['line-spacing']=pgettext('line spacing value',"1.5 lines") elif lineSpacingRule==wdLineSpaceExactly: - # Translators: exact (minimum) line spacing - field['line-spacing']=pgettext('line spacing value',"exact") + field['line-spacing'] = pgettext( + 'line spacing value', + # Translators: line spacing of exactly x point + "exactly {space:.1f} pt" + ).format(space=float(lineSpacingVal)) elif lineSpacingRule==wdLineSpaceAtLeast: # Translators: line spacing of at least x point field['line-spacing']=pgettext('line spacing value',"at least %.1f pt")%float(lineSpacingVal) From 325be94d985a3cb77b2be215a6d8e9de47352948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Golonka?= Date: Tue, 8 Dec 2020 02:02:05 +0100 Subject: [PATCH 3/3] Fix-up of #10973: Fallback to POSITION_FIRST when reporting formatting info at caret to report in MS Excel (#11914) * Fallback to POSITION_FIRST when reporting formatting info at caret to report in Excel cells * Update what's new Co-authored-by: Michael Curran --- source/globalCommands.py | 4 ++-- user_docs/en/changes.t2t | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/globalCommands.py b/source/globalCommands.py index d2cef5326bd..e9ecfdb5d77 100644 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -1552,7 +1552,7 @@ def script_reportFormatting(self, gesture): category=SCRCAT_SYSTEMCARET, ) def script_reportFormattingAtCaret(self, gesture): - self._reportFormattingHelper(self._getTIAtCaret(), False) + self._reportFormattingHelper(self._getTIAtCaret(True), False) @script( # Translators: Input help mode message for show formatting at caret position command. @@ -1560,7 +1560,7 @@ def script_reportFormattingAtCaret(self, gesture): category=SCRCAT_SYSTEMCARET, ) def script_showFormattingAtCaret(self, gesture): - self._reportFormattingHelper(self._getTIAtCaret(), True) + self._reportFormattingHelper(self._getTIAtCaret(True), True) @script( description=_( diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index c86ea2e6269..cc65846e12b 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -60,6 +60,7 @@ What's New in NVDA - When using Outlook (French locale), the shortcut for 'Reply all' (control+shift+R) works again. (#11196) - In Visual Studio, IntelliSense tool tips that provide additional details about the currently selected IntelliSense item are now only reported once. (#11611) - In Windows 10 Calculator, NVDA will not announce progress of calculations if speak typed characters is disabled. (#9428) +- It is again possible to report formatting information for the focused Excel cell using NVDA+F. (#11914) == Changes for Developers ==