diff options
-rw-r--r-- | solenv/gdb/libreoffice/sw.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index 581169d24ad0..7ea6a664cc6e 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -39,6 +39,17 @@ class SwPositionPrinter(object): offset = self.value['nContent']['m_nIndex'] return "%s (node %d, offset %d)" % (self.typename, node['nOffset'], offset) +class SwNodeIndexPrinter(object): + '''Prints SwNodeIndex.''' + + def __init__(self, typename, value): + self.typename = typename + self.value = value + + def to_string(self): + node = self.value['pNd'].dereference(); + return "%s (node %d)" % (self.typename, node['nOffset']) + class SwPaMPrinter(object): '''Prints SwPaM.''' @@ -188,6 +199,7 @@ def build_pretty_printers(): printer = printing.Printer("libreoffice/sw") printer.add('BigPtrArray', BigPtrArrayPrinter) printer.add('SwPosition', SwPositionPrinter) + printer.add('SwNodeIndex', SwNodeIndexPrinter) printer.add('SwPaM', SwPaMPrinter) printer.add('SwRect', SwRectPrinter) |