solenv/gdb/libreoffice/sw.py | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
New commits: commit 001da6553adfcb160a08225fdd6aea478bd7dea9 Author: Miklos Vajna <[email protected]> Date: Tue Apr 9 11:55:14 2013 +0200 pretty-print SwXTextCursor Change-Id: I98bb5cbcde93a408c44f4f985c06532ab0a37652 diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index f5cdc29..21e8ea8 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -154,6 +154,21 @@ class SwXTextRangeImplPrinter(object): children = [('mark', mark)] 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): """Prints sw::UnoImplPtr""" @@ -177,6 +192,16 @@ class SwXTextRangePrinter(object): def to_string(self): 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): '''Prints BigPtrArray.''' @@ -306,6 +331,8 @@ def build_pretty_printers(): printer.add('sw::UnoImplPtr', SwUnoImplPtrPrinter) printer.add('SwXTextRange', SwXTextRangePrinter) printer.add('SwModify', SwModifyPrinter) + printer.add('SwXTextCursor::Impl', SwXTextCursorImplPrinter) + printer.add('SwXTextCursor', SwXTextCursorPrinter) def register_pretty_printers(obj): printing.register_pretty_printer(printer, obj) commit 626605218359df6c3f9274e57cb5ef0886b890fc Author: Miklos Vajna <[email protected]> Date: Tue Apr 9 11:36:51 2013 +0200 pretty-print SwUnoCrsr Change-Id: Ia79e582002c92591694815580eff905b864ea6c5 diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index 1a06139..f5cdc29 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -83,6 +83,9 @@ class SwPaMPrinter(object): children.append(("prev", prev)) return children.__iter__() +class SwUnoCrsrPrinter(SwPaMPrinter): + '''Prints SwUnoCrsr.''' + class SwRectPrinter(object): '''Prints SwRect.''' @@ -119,6 +122,23 @@ class SwIMarkPrinter(object): else: return self._iterator(self.value) +class SwModifyPrinter(object): + '''Prints SwModify.''' + + def __init__(self, typename, value): + self.typename = typename + self.value = value + + def to_string(self): + return "%s" % (self.typename) + + def children(self): + if str(self.value.dynamic_type) == "SwUnoCrsr": + unoCrsr = self.value.cast(self.value.dynamic_type) + return SwUnoCrsrPrinter(self.typename, unoCrsr).children() + else: + return self._iterator(self.value) + class SwXTextRangeImplPrinter(object): '''Prints SwXTextRange::Impl.''' @@ -279,11 +299,13 @@ def build_pretty_printers(): printer.add('SwNodeIndex', SwNodeIndexPrinter) printer.add('SwIndex', SwIndexPrinter) printer.add('SwPaM', SwPaMPrinter) + printer.add('SwUnoCrsr', SwUnoCrsrPrinter) printer.add('SwRect', SwRectPrinter) printer.add('sw::mark::IMark', SwIMarkPrinter) printer.add('SwXTextRange::Impl', SwXTextRangeImplPrinter) printer.add('sw::UnoImplPtr', SwUnoImplPtrPrinter) printer.add('SwXTextRange', SwXTextRangePrinter) + printer.add('SwModify', SwModifyPrinter) def register_pretty_printers(obj): printing.register_pretty_printer(printer, obj) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
