solenv/gdb/libreoffice/sw.py | 16 ++++++++++++++++ solenv/gdb/libreoffice/tl.py | 17 +++++++++++++++++ 2 files changed, 33 insertions(+)
New commits: commit d1ab1fa5411ac4d1d90d82a02b5a1f01e7e94099 Author: Miklos Vajna <vmik...@suse.cz> Date: Wed Jul 11 09:21:37 2012 +0200 gdb: add pretty-printer for SwRect Change-Id: I0506b3e92df372a67b4431e52e2e9d308dc886c9 diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index 5007d0d..581169d 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) commit d323a8a0b5d32385835afb6a109d16e001721fb2 Author: Miklos Vajna <vmik...@suse.cz> Date: Wed Jul 11 09:15:32 2012 +0200 gdb: add pretty-printer for tools Size Change-Id: I3ff6568e34698d414ca7e4c631d32156b9d28cf0 diff --git a/solenv/gdb/libreoffice/tl.py b/solenv/gdb/libreoffice/tl.py index b800710..36024e2 100644 --- a/solenv/gdb/libreoffice/tl.py +++ b/solenv/gdb/libreoffice/tl.py @@ -354,6 +354,22 @@ class PointPrinter(object): children = [('x', x), ('y', y)] return children.__iter__() +class SizePrinter(object): + '''Prints a Size.''' + + def __init__(self, typename, value): + self.typename = typename + self.value = value + + def to_string(self): + return "%s" % (self.typename) + + def children(self): + width = self.value['nA'] + height = self.value['nB'] + children = [('width', width), ('height', height)] + return children.__iter__() + printer = None def build_pretty_printers(): @@ -379,6 +395,7 @@ def build_pretty_printers(): printer.add('Date', DatePrinter) printer.add('Time', TimePrinter) printer.add('Point', PointPrinter) + printer.add('Size', SizePrinter) def register_pretty_printers(obj): printing.register_pretty_printer(printer, obj) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits