summaryrefslogtreecommitdiff
path: root/solenv/gdb
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-11 09:21:37 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-11 09:23:21 +0200
commitd1ab1fa5411ac4d1d90d82a02b5a1f01e7e94099 (patch)
treef36f5137481243930de502f00ae434a636c969b1 /solenv/gdb
parentd323a8a0b5d32385835afb6a109d16e001721fb2 (diff)
gdb: add pretty-printer for SwRect
Change-Id: I0506b3e92df372a67b4431e52e2e9d308dc886c9
Diffstat (limited to 'solenv/gdb')
-rw-r--r--solenv/gdb/libreoffice/sw.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 5007d0d3fe9e..581169d24ad0 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -55,6 +55,21 @@ class SwPaMPrinter(object):
children = [ ( 'point', point), ( 'mark', mark ) ]
return children.__iter__()
+class SwRectPrinter(object):
+ '''Prints SwRect.'''
+
+ def __init__(self, typename, value):
+ self.typename = typename
+ self.value = value
+
+ def to_string(self):
+ return "%s" % (self.typename)
+
+ def children(self):
+ point = self.value['m_Point']
+ size = self.value['m_Size']
+ children = [ ( 'point', point), ( 'size', size ) ]
+ return children.__iter__()
class BigPtrArrayPrinter(object):
'''Prints BigPtrArray.'''
@@ -174,6 +189,7 @@ def build_pretty_printers():
printer.add('BigPtrArray', BigPtrArrayPrinter)
printer.add('SwPosition', SwPositionPrinter)
printer.add('SwPaM', SwPaMPrinter)
+ printer.add('SwRect', SwRectPrinter)
def register_pretty_printers(obj):
printing.register_pretty_printer(printer, obj)