~ubuntu-branches/ubuntu/raring/gnome-orca/raring-proposed

« back to all changes in this revision

Viewing changes to src/orca/scripts/apps/soffice/script_utilities.py

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich
  • Date: 2012-09-18 10:13:03 UTC
  • mfrom: (0.12.2)
  • Revision ID: package-import@ubuntu.com-20120918101303-oipgiueb21okfi9u
Tags: 3.7.0.92-0ubuntu1
* New upstream release
  - General
    + LibreOffice Writer documents should be fully readable and navigable
      via the braille display
    + Fix for bug 683795 - Orca modifier gets stuck on in Bypass Mode
    + Fix for bug 683447 - Outdated documentation needs to be removed
    + Fix for broken tag in several help translations (Thanks Piotr Drąg!)
  - New and updated translations (THANKS EVERYONE!!!):
    + da            Danish                  Kenneth Nielsen
    + de            German                  Mario Blättermann
    + en_GB         British English         Bruce Cowan
    + pl            Polish                  Piotr Drąg
    + es            Spanish                 Daniel Mustieles
    + fi            Finnish                 Jiri Grönroos
    + zh_CN         Simplified Chinese      TeliuTe
* debian/control: Update and add new dependencies and minimum versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
 
211
211
        return parent
212
212
 
 
213
    def findPreviousObject(self, obj):
 
214
        """Finds the object before this one."""
 
215
 
 
216
        if not obj:
 
217
            return None
 
218
 
 
219
        for relation in obj.getRelationSet():
 
220
            if relation.getRelationType() == pyatspi.RELATION_FLOWS_FROM:
 
221
                return relation.getTarget(0)
 
222
 
 
223
        index = obj.getIndexInParent() - 1
 
224
        if not (0 <= index < obj.parent.childCount - 1):
 
225
            obj = obj.parent
 
226
            index = obj.getIndexInParent() - 1
 
227
 
 
228
        try:
 
229
            prevObj = obj.parent[index]
 
230
        except:
 
231
            prevObj = obj
 
232
 
 
233
        return prevObj
 
234
 
 
235
    def findNextObject(self, obj):
 
236
        """Finds the object after this one."""
 
237
 
 
238
        if not obj:
 
239
            return None
 
240
 
 
241
        for relation in obj.getRelationSet():
 
242
            if relation.getRelationType() == pyatspi.RELATION_FLOWS_TO:
 
243
                return relation.getTarget(0)
 
244
 
 
245
        index = obj.getIndexInParent() + 1
 
246
        if not (0 < index < obj.parent.childCount):
 
247
            obj = obj.parent
 
248
            index = obj.getIndexInParent() + 1
 
249
 
 
250
        try:
 
251
            nextObj = obj.parent[index]
 
252
        except:
 
253
            nextObj = None
 
254
 
 
255
        return nextObj
 
256
 
213
257
    #########################################################################
214
258
    #                                                                       #
215
259
    # Impress-Specific Utilities                                            #