Index: src/orca/scripts/apps/soffice/script.py
===================================================================
--- src/orca/scripts/apps/soffice/script.py	(revision 3983)
+++ src/orca/scripts/apps/soffice/script.py	(working copy)
@@ -1879,9 +1879,35 @@
         - event: the Event
         """
 
-        # If the object is losing focus, then just ignore this event.
+        # If we are losing focus and we in a paragraph in a slide 
+        # presentation and the last thing the user typed was a Return,
+        # and echo by word is enabled, then echo the previous word 
+        # that the user typed.  See bug #538053 for more details.
         #
         if event.detail1 == -1:
+            rolesList = [pyatspi.ROLE_PARAGRAPH,
+                         pyatspi.ROLE_UNKNOWN,
+                         pyatspi.ROLE_UNKNOWN,
+                         pyatspi.ROLE_SCROLL_PANE, \
+                         pyatspi.ROLE_PANEL, \
+                         pyatspi.ROLE_PANEL, \
+                         pyatspi.ROLE_ROOT_PANE, \
+                         pyatspi.ROLE_FRAME, \
+                         pyatspi.ROLE_APPLICATION]
+            if self.isDesiredFocusedItem(event.source, rolesList) and \
+               settings.enableEchoByWord:
+                if isinstance(orca_state.lastInputEvent,
+                              input_event.KeyboardEvent):
+                    keyString = orca_state.lastNonModifierKeyEvent.event_string
+                    if keyString == "Return":
+                        result = self.getText(event.source, 0, -1)
+                        line = result.decode("UTF-8")
+                        self.echoPreviousWord(event.source, len(line))
+                        return
+
+        # Otherwise, if the object is losing focus, then just ignore this event.
+        #
+        if event.detail1 == -1:
             return
 
         if isinstance(orca_state.lastInputEvent, input_event.KeyboardEvent) \
Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 3982)
+++ src/orca/default.py	(working copy)
@@ -2194,7 +2194,7 @@
         if len(utterance):
             speech.speak(utterance)
 
-    def echoPreviousWord(self, obj):
+    def echoPreviousWord(self, obj, offset=None):
         """Speaks the word prior to the caret, as long as there is
         a word prior to the caret and there is no intervening word
         delimiter between the caret and the end of the word.
@@ -2207,6 +2207,8 @@
         Arguments:
         - obj: an Accessible object that implements the AccessibleText
                interface.
+        - offset: if not None, the offset within the text to use as the
+                  end of the word.
         """
 
         try:
@@ -2214,7 +2216,8 @@
         except NotImplementedError:
             return
 
-        offset = text.caretOffset - 1
+        if not offset:
+            offset = text.caretOffset - 1
         if (offset < 0):
             return
 
@@ -2230,7 +2233,7 @@
         # work our way to the beginning of the word, stopping when
         # we hit another word delimiter.
         #
-        wordEndOffset = text.caretOffset - 2
+        wordEndOffset = offset - 1
         wordStartOffset = wordEndOffset
 
         while wordStartOffset >= 0:
