Index: test/harness/utils.py
===================================================================
--- test/harness/utils.py	(revision 3896)
+++ test/harness/utils.py	(working copy)
@@ -21,6 +21,14 @@
 htmlDir = os.path.abspath(fullPath + "/../../html")
 htmlURLPrefix = "file://" + htmlDir + "/"
 
+# Various OpenOffice names as a regex.  These are needed because OOo likes
+# to do various things with its window titles from release to release. 
+# These regex's attempt to provide a way to manage those differences.
+#
+OOoNames = "(OpenOffice.org Writer|OOo-dev Writer Beta)"
+def getOOoTitleRegEx(title, remainder):
+    return "soffice Application( " + title + "|)(.odt|)( - )(" + OOoNames[1:-1] + "|) Frame (" +  title + ")(.odt|) - (OpenOffice.org Writer|OOo-dev Writer Beta) RootPane ScrollPane Document view " + remainder
+
 createDiffs = True
 try:
     # If the difflib module is not found, fall back to generating the
@@ -92,7 +100,6 @@
                 continue
             else:
                 return results
-
     return None
 
 class AssertPresentationAction(AtomicAction):
@@ -146,8 +153,14 @@
                 expectedToFail = True
 
         d = difflib.Differ()
-        diffs = list(d.compare(self._expectedResults, results))
-        print >> myErr, '\n'.join(list(diffs))
+        try:
+            # This can stack trace for some odd reason (UTF-8 characters?),
+            # so we need to capture it.  Otherwise, it can hang the tests.
+            #
+            diffs = list(d.compare(self._expectedResults, results))
+            print >> myErr, '\n'.join(list(diffs))
+        except:
+            pass
         return expectedToFail
 
     def printResults(self, results):
Index: test/keystrokes/oowriter/bug_450210.py
===================================================================
--- test/keystrokes/oowriter/bug_450210.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_450210.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
Index: test/keystrokes/oowriter/bug_430402.py
===================================================================
--- test/keystrokes/oowriter/bug_430402.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_430402.py	(working copy)
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -63,7 +63,7 @@
     "Type Control-Home to move to start of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quick $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view The quick \$l'",
      "     VISIBLE:  'The quick $l', cursor=1",
      "SPEECH OUTPUT: 'The quick'"]))
 
@@ -98,7 +98,7 @@
 ######################################################################
 # 8. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_435226.py
===================================================================
--- test/keystrokes/oowriter/bug_435226.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_435226.py	(working copy)
@@ -18,7 +18,7 @@
 # 1. Start oowriter. There is a bug_435226.params file that will
 #    automatically load spanish.odt.
 #
-sequence.append(WaitForWindowActivate("spanish - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("spanish(.odt|) - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -72,7 +72,7 @@
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
     "Type KP-Enter once to do a 'single-click' where-am-I operation",
-    ["BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'paragraph'",
@@ -89,9 +89,9 @@
 sequence.append(PauseAction(3000))
 sequence.append(utils.AssertPresentationAction(
     "Type KP-Enter twice to do a 'double-click' where-am-I operation",
-    ["BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
-     "BRAILLE LINE:  'soffice Application spanish - OpenOffice.org Writer Frame spanish - OpenOffice.org Writer RootPane ScrollPane Document view Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("spanish", "Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! \$l") + "'",
      "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=17",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'paragraph'",
Index: test/keystrokes/oowriter/bug_382415.py
===================================================================
--- test/keystrokes/oowriter/bug_382415.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_382415.py	(working copy)
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382415.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.OOoNames,None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -30,7 +30,7 @@
     "Down arrow to next line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -44,7 +44,7 @@
     "Down arrow to move to the Mon table column header",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,9 +58,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the blank table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
@@ -76,9 +76,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the '4' table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +94,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Down arrow to move to the '11' table cell on the next row",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
Index: test/keystrokes/oowriter/bug_413909.py
===================================================================
--- test/keystrokes/oowriter/bug_413909.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_413909.py	(working copy)
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -53,7 +53,7 @@
     "Type Control-Home to move to the start of the document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=1",
      "SPEECH OUTPUT: 'The quuuiick brown fox'"]))
 
@@ -65,35 +65,35 @@
 sequence.append(WaitForFocus("Change", acc_role=pyatspi.ROLE_PUSH_BUTTON))
 sequence.append(utils.AssertPresentationAction(
     "Enter F7 to bring up the spell checking dialog",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=2",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=3",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=4",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=5",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=23",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=14",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=15",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=16",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=17",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=18",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=19",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=20",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=21",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=22",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view The quuuiick brown fox $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("Untitled[ ]*2", "The quuuiick brown fox \$l") + "'",
      "     VISIBLE:  'The quuuiick brown fox $l', cursor=23",
      "BRAILLE LINE:  'soffice Application Spellcheck:  (English (USA)) Dialog'",
      "     VISIBLE:  'Spellcheck:  (English (USA)) Dia', cursor=1",
@@ -130,7 +130,7 @@
 ######################################################################
 # 9. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_355733.py
===================================================================
--- test/keystrokes/oowriter/bug_355733.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_355733.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -25,7 +25,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -58,7 +58,7 @@
     "Return to top of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 
Index: test/keystrokes/oowriter/bug_353268.py
===================================================================
--- test/keystrokes/oowriter/bug_353268.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_353268.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -49,7 +49,7 @@
     "Return to top of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 1'"]))
 
@@ -63,7 +63,7 @@
     "Arrow down over first line of text",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 2 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Line 2 \$l'",
      "     VISIBLE:  'Line 2 $l', cursor=1",
      "SPEECH OUTPUT: 'Line 2'"]))
 
@@ -77,7 +77,7 @@
     "Arrow down over second line of text",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view  $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view  \$l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'blank'"]))
 
Index: test/keystrokes/oowriter/bug_384893.py
===================================================================
--- test/keystrokes/oowriter/bug_384893.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_384893.py	(working copy)
@@ -15,7 +15,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -47,7 +47,7 @@
 sequence.append(KeyComboAction("<Control>Home"))
 sequence.append(utils.AssertPresentationAction(
     "Type Control-Home to move to start of document",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view This is a test $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("empty_document", "This is a test \$l") + "'",
      "     VISIBLE:  'This is a test $l', cursor=1",
      "SPEECH OUTPUT: 'This is a test'"]))
 
Index: test/keystrokes/oowriter/bug_342602.py
===================================================================
--- test/keystrokes/oowriter/bug_342602.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_342602.py	(working copy)
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,7 +26,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -49,7 +49,7 @@
 # 4. Enter Return (Insert a table with the default parameters - 2x2).
 #
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -61,9 +61,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Move to cell B1",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
      "     VISIBLE:  'A Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'A'",
      "SPEECH OUTPUT: ' not selected'",
@@ -80,9 +80,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Move back to cell A1",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Table1-1 Table A Paragraph'",
      "     VISIBLE:  'A Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -114,7 +114,7 @@
 ######################################################################
 # 9. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_350219.py
===================================================================
--- test/keystrokes/oowriter/bug_350219.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_350219.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -26,15 +26,15 @@
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "New text document",
-    ["BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame'",
-     "     VISIBLE:  'Untitled2 - OpenOffice.org Write', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane Panel'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame'",
+     "     VISIBLE:  'Untitled[ ]*2 - *",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane Panel'",
      "     VISIBLE:  'Panel', cursor=1",
-     "SPEECH OUTPUT: 'Untitled2 - OpenOffice.org Writer frame'",
+     "SPEECH OUTPUT: 'Untitled[ ]*2 - " + utils.OOoNames + " frame'",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'panel'"]))
 
@@ -48,7 +48,7 @@
 ######################################################################
 # 4. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_361624.py
===================================================================
--- test/keystrokes/oowriter/bug_361624.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_361624.py	(working copy)
@@ -14,7 +14,7 @@
 # 1. Start oowriter. There is a bug_361624.params file that will
 #    automatically load column-example.odt.
 #
-sequence.append(WaitForWindowActivate("column-example - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("column-example - " + utils.OOoNames,None))
 
 ######################################################################
 # 2. Type Control-Home to position the text caret to the left of the
Index: test/keystrokes/oowriter/bug_382408.py
===================================================================
--- test/keystrokes/oowriter/bug_382408.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_382408.py	(working copy)
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382408.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.OOoNames,None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -37,7 +37,7 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -51,7 +51,7 @@
     "Type a down arrow to move to the Mon table column header",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat") + "'",
      "     VISIBLE:  'Mon Tue Wed Thu Fri Sat', cursor=1",
      "SPEECH OUTPUT: 'Sun Mon Tue Wed Thu Fri Sat'",
      "SPEECH OUTPUT: ' not selected'"]))
Index: test/keystrokes/oowriter/bug_382418.py
===================================================================
--- test/keystrokes/oowriter/bug_382418.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_382418.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -25,7 +25,7 @@
 sequence.append(WaitForFocus("Text Document", acc_role=pyatspi.ROLE_MENU_ITEM))
 
 sequence.append(KeyComboAction("Return"))
-sequence.append(WaitForWindowActivate("Untitled2 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*2 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -65,9 +65,9 @@
     "Type Control-Home to move to start of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view Line 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view Line 1 \$l'",
      "     VISIBLE:  'Line 1 $l', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -108,7 +108,7 @@
 ######################################################################
 # 10. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_361747.py
===================================================================
--- test/keystrokes/oowriter/bug_361747.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_361747.py	(working copy)
@@ -14,7 +14,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif 
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -44,7 +44,7 @@
 sequence.append(KeyComboAction("<Control>Home"))
 sequence.append(utils.AssertPresentationAction(
     "Control-Home to move to start of document",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=1",
      "SPEECH OUTPUT: 'Bold Italic Normal'"]))
 
@@ -72,7 +72,7 @@
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
 sequence.append(utils.AssertPresentationAction(
     "Text information for italic word",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=6",
      "SPEECH OUTPUT: 'Italic '",
      "SPEECH OUTPUT: 'size 12'",
@@ -90,7 +90,7 @@
 sequence.append(KeyReleaseAction(150, 106,"Insert"))   # Release Insert
 sequence.append(utils.AssertPresentationAction(
     "Text information for regular word",
-    ["BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view Bold Italic Normal $l'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("empty_document", "Bold Italic Normal \$l") + "'",
      "     VISIBLE:  'Bold Italic Normal $l', cursor=13",
      "SPEECH OUTPUT: 'Normal'",
      "SPEECH OUTPUT: 'size 12'",
Index: test/keystrokes/oowriter/bug_382880.py
===================================================================
--- test/keystrokes/oowriter/bug_382880.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_382880.py	(working copy)
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382880.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.OOoNames,None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -30,7 +30,7 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -44,7 +44,7 @@
     "Type a down arrow to move to the Mon table column header",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,12 +58,13 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Tab to move to the Tue table column header",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: 'Cell C1'",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'"]))
@@ -76,9 +77,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the blank cell C2",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +95,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell C3 containing '5'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -112,9 +113,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Shift-Tab to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '5'",
      "SPEECH OUTPUT: ' not selected'",
@@ -130,9 +131,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell B4 containing '11'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
@@ -148,9 +149,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type an up arrow to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '11'",
      "SPEECH OUTPUT: ' not selected'",
Index: test/keystrokes/oowriter/bug_364765.py
===================================================================
--- test/keystrokes/oowriter/bug_364765.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_364765.py	(working copy)
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -30,9 +30,9 @@
 sequence.append(WaitForFocus("Letter...", acc_role=pyatspi.ROLE_MENU_ITEM))
 sequence.append(utils.AssertPresentationAction(
     "Press W to open the Wizards submenu",
-    ["BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar Wizards Menu'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.OOoNames + " Frame Untitled[ ]*1 - " + utils.OOoNames + " RootPane MenuBar Wizards Menu'",
      "     VISIBLE:  'Wizards Menu', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar File Menu Letter...'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.OOoNames + " Frame Untitled[ ]*1 - " + utils.OOoNames + " RootPane MenuBar File Menu Letter...'",
      "     VISIBLE:  'Letter...', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Wizards menu'",
@@ -47,7 +47,7 @@
 sequence.append(WaitForFocus("Wizards", acc_role=pyatspi.ROLE_MENU))
 sequence.append(utils.AssertPresentationAction(
     "Press Escape to close the Wizards submenu",
-    ["BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Writer Frame Untitled1 - OpenOffice.org Writer RootPane MenuBar Wizards Menu'",
+    ["BRAILLE LINE:  'soffice Application Untitled[ ]*1 - " + utils.OOoNames + " Frame Untitled[ ]*1 - " + utils.OOoNames + " RootPane MenuBar Wizards Menu'",
      "     VISIBLE:  'Wizards Menu', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Wizards menu'"]))
Index: test/keystrokes/oowriter/bug_385828.py
===================================================================
--- test/keystrokes/oowriter/bug_385828.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_385828.py	(working copy)
@@ -12,7 +12,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -32,17 +32,17 @@
 #
 sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction("a"))
-sequence.append(WaitForWindowActivate("aw-5blue (read-only) - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("aw-5blue (read-only) - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("Page design", acc_role=pyatspi.ROLE_LABEL))
 sequence.append(utils.AssertPresentationAction(
     "Press 'a' to bring up the Agenda... wizard",
-    ["BRAILLE LINE:  'soffice Application aw-5blue (read-only) - OpenOffice.org Writer Frame'",
-     "     VISIBLE:  'aw-5blue (read-only) - OpenOffic', cursor=1",
+    ["BRAILLE LINE:  'soffice Application aw-5blue \(read-only\) - " + utils.OOoNames + " Frame'",
+     "     VISIBLE:  'aw-5blue \(read-only\) - OpenOffic', cursor=1",
      "BRAILLE LINE:  'soffice Application Agenda Wizard Dialog'",
      "     VISIBLE:  'Agenda Wizard Dialog', cursor=1",
      "BRAILLE LINE:  'soffice Application Agenda Wizard Dialog Steps Panel  $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "SPEECH OUTPUT: 'aw-5blue (read-only) - OpenOffice.org Writer frame'",
+     "SPEECH OUTPUT: 'aw-5blue \(read-only\) - " + utils.OOoNames + " frame'",
      "SPEECH OUTPUT: 'Agenda Wizard'",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Page design label'"]))
Index: test/keystrokes/oowriter/bug_469367.py
===================================================================
--- test/keystrokes/oowriter/bug_469367.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_469367.py	(working copy)
@@ -15,7 +15,7 @@
 #    automatically load empty_document.odt. This uses the FreeSerif
 #    font as the default which should be available on all test systems.
 #
-sequence.append(WaitForWindowActivate("empty_document - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("empty_document(.odt|) - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -43,7 +43,7 @@
     "Enter up arrow to position the text caret on the first line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame empty_document - OpenOffice.org Writer RootPane ScrollPane Document view 		   This is a test. $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("empty_document", "		   This is a test. \$l") + "'",
      "     VISIBLE:  '		   This is a test. $l', cursor=1",
      "SPEECH OUTPUT: '		   This is a test.'"]))
 
Index: test/keystrokes/oowriter/bug_362979.py
===================================================================
--- test/keystrokes/oowriter/bug_362979.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_362979.py	(working copy)
@@ -13,7 +13,7 @@
 ######################################################################
 # 1. Start oowriter.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames,None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 
 ######################################################################
@@ -79,7 +79,7 @@
     "Move cursor to start of document",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view •Line 1 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view •Line 1 \$l'",
      "     VISIBLE:  '•Line 1 $l', cursor=2",
      "SPEECH OUTPUT: '•Line 1'"]))
 
@@ -93,7 +93,7 @@
     "Move to second bulleted line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Untitled2 - OpenOffice.org Writer Frame Untitled2 - OpenOffice.org Writer RootPane ScrollPane Document view •Line 2 $l'",
+     "BRAILLE LINE:  'soffice Application Untitled[ ]*2 - " + utils.OOoNames + " Frame Untitled[ ]*2 - " + utils.OOoNames + " RootPane ScrollPane Document view •Line 2 \$l'",
      "     VISIBLE:  '•Line 2 $l', cursor=2",
      "SPEECH OUTPUT: '•Line 2'"]))
 
@@ -118,7 +118,7 @@
 ######################################################################
 # 12. Wait for things to get back to normal.
 #
-sequence.append(WaitForWindowActivate("Untitled1 - OpenOffice.org Writer", None))
+sequence.append(WaitForWindowActivate("Untitled[ ]*1 - " + utils.OOoNames, None))
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(PauseAction(3000))
 
Index: test/keystrokes/oowriter/bug_382888.py
===================================================================
--- test/keystrokes/oowriter/bug_382888.py	(revision 3896)
+++ test/keystrokes/oowriter/bug_382888.py	(working copy)
@@ -13,7 +13,7 @@
 # 1. Start oowriter. There is a bug_382888.params file that will
 #    automatically load table-sample.odt
 #
-sequence.append(WaitForWindowActivate("table-sample - OpenOffice.org Writer",None))
+sequence.append(WaitForWindowActivate("table-sample(.odt|) - " + utils.OOoNames,None))
 
 ######################################################################
 # 2. Type Control-Home to move the text caret to the start of the document.
@@ -30,7 +30,7 @@
     "Type a down arrow to move to the next line",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view This is a test. $l'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "This is a test. \$l") + "'",
      "     VISIBLE:  'This is a test. $l', cursor=16",
      "SPEECH OUTPUT: 'This is a test.'"]))
 
@@ -44,7 +44,7 @@
     "Type a down arrow to move to the Mon table column header",
     ["BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Cell B1'",
      "SPEECH OUTPUT: 'Mon'",
@@ -58,12 +58,13 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Tab to move to the Tue table column header",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Mon Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Mon Paragraph") + "'",
      "     VISIBLE:  'Mon Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Mon'",
      "SPEECH OUTPUT: ' not selected'",
+     "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
      "SPEECH OUTPUT: 'Cell C1'",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'"]))
@@ -76,9 +77,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to the blank cell C2",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Tue Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Tue Paragraph") + "'",
      "     VISIBLE:  'Tue Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
      "SPEECH OUTPUT: 'Tue'",
      "SPEECH OUTPUT: ' not selected'",
@@ -94,9 +95,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell C3 containing '5'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table Paragraph") + "'",
      "     VISIBLE:  'Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: ' not selected'",
@@ -112,9 +113,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a Shift-Tab to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 5 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 5 Paragraph") + "'",
      "     VISIBLE:  '5 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '5'",
      "SPEECH OUTPUT: ' not selected'",
@@ -130,9 +131,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type a down arrow to move to cell B4 containing '11'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
      "SPEECH OUTPUT: '4'",
      "SPEECH OUTPUT: ' not selected'",
@@ -148,9 +149,9 @@
 sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
 sequence.append(utils.AssertPresentationAction(
     "Type an up arrow to move to cell B3 containing '4'",
-    ["BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 11 Paragraph'",
+    ["BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 11 Paragraph") + "'",
      "     VISIBLE:  '11 Paragraph', cursor=1",
-     "BRAILLE LINE:  'soffice Application Frame table-sample - OpenOffice.org Writer RootPane ScrollPane Document view Calendar-1 Table 4 Paragraph'",
+     "BRAILLE LINE:  '" + utils.getOOoTitleRegEx("table-sample", "Calendar-1 Table 4 Paragraph") + "'",
      "     VISIBLE:  '4 Paragraph', cursor=1",
      "SPEECH OUTPUT: '11'",
      "SPEECH OUTPUT: ' not selected'",
