Kaydet (Commit) 001da655 authored tarafından Miklos Vajna's avatar Miklos Vajna

pretty-print SwXTextCursor

Change-Id: I98bb5cbcde93a408c44f4f985c06532ab0a37652
üst 62660521
...@@ -154,6 +154,21 @@ class SwXTextRangeImplPrinter(object): ...@@ -154,6 +154,21 @@ class SwXTextRangeImplPrinter(object):
children = [('mark', mark)] children = [('mark', mark)]
return children.__iter__() return children.__iter__()
class SwXTextCursorImplPrinter(object):
'''Prints SwXTextCursor::Impl.'''
def __init__(self, typename, value):
self.typename = typename
self.value = value
def to_string(self):
return "%s" % (self.typename)
def children(self):
registeredIn = self.value['pRegisteredIn'].dereference()
children = [('registeredIn', registeredIn)]
return children.__iter__()
class SwUnoImplPtrPrinter(object): class SwUnoImplPtrPrinter(object):
"""Prints sw::UnoImplPtr""" """Prints sw::UnoImplPtr"""
...@@ -177,6 +192,16 @@ class SwXTextRangePrinter(object): ...@@ -177,6 +192,16 @@ class SwXTextRangePrinter(object):
def to_string(self): def to_string(self):
return "%s %s" % (self.typename, self.value['m_pImpl']) return "%s %s" % (self.typename, self.value['m_pImpl'])
class SwXTextCursorPrinter(object):
'''Prints SwXTextCursor.'''
def __init__(self, typename, value):
self.typename = typename
self.value = value
def to_string(self):
return "%s %s" % (self.typename, self.value['m_pImpl'])
class BigPtrArrayPrinter(object): class BigPtrArrayPrinter(object):
'''Prints BigPtrArray.''' '''Prints BigPtrArray.'''
...@@ -306,6 +331,8 @@ def build_pretty_printers(): ...@@ -306,6 +331,8 @@ def build_pretty_printers():
printer.add('sw::UnoImplPtr', SwUnoImplPtrPrinter) printer.add('sw::UnoImplPtr', SwUnoImplPtrPrinter)
printer.add('SwXTextRange', SwXTextRangePrinter) printer.add('SwXTextRange', SwXTextRangePrinter)
printer.add('SwModify', SwModifyPrinter) printer.add('SwModify', SwModifyPrinter)
printer.add('SwXTextCursor::Impl', SwXTextCursorImplPrinter)
printer.add('SwXTextCursor', SwXTextCursorPrinter)
def register_pretty_printers(obj): def register_pretty_printers(obj):
printing.register_pretty_printer(printer, obj) printing.register_pretty_printer(printer, obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment