Index: src/orca/scripts/StarOffice.py
===================================================================
--- src/orca/scripts/StarOffice.py	(revision 1986)
+++ src/orca/scripts/StarOffice.py	(working copy)
@@ -620,6 +620,13 @@
         #
         self.currentParagraph = None
 
+        # Set the number of retries after a COMM_FAILURE to 1. The default
+        # of 5 was not allowing Orca to be responsive in the event of OOo
+        # going into crash recovery mode (see bug #397787).
+        #
+        print "StarOffice: __init__: setting limit to 1."
+        settings.commFailureAttemptLimit = 1
+
         # The default set of text attributes to speak to the user. The
         # only difference over the default set in settings.py is to add
         # in "left-margin:" and "right-margin:".
Index: src/orca/script.py
===================================================================
--- src/orca/script.py	(revision 1986)
+++ src/orca/script.py	(working copy)
@@ -88,6 +88,14 @@
 
         self.findCommandRun = False
 
+        # Set the default number of retries after a COMM_FAILURE to 5. 
+        # We override this value in the __init__ method of the StarOffice
+        # script, so we need a way of easily resetting to the default
+        # value (see bug #397787).
+        #
+        print "script: __init__: setting limit to 5."
+        settings.commFailureAttemptLimit = 5
+
         debug.println(debug.LEVEL_FINE, "NEW SCRIPT: %s" % self.name)
 
     def getListeners(self):
