[Libreoffice-commits] .: 2 commits - .gitignore solenv/gdb
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon Aug 29 02:34:22 PDT 2011
.gitignore | 3 +++
solenv/gdb/libreoffice/sw.py | 30 ++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
New commits:
commit bcc461789442cc38df2801b38dc1161d2940fba6
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Mon Aug 29 11:31:28 2011 +0200
Added SwPosition, SwPaM gdb pretty-printers
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 761c153..0b2ff7f 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -27,6 +27,34 @@
from libreoffice.util import printing
+class SwPositionPrinter(object):
+ '''Prints SwPosition.'''
+
+ def __init__(self, typename, value):
+ self.typename = typename
+ self.value = value
+
+ def to_string(self):
+ node = self.value['nNode']['pNd'].dereference();
+ offset = self.value['nContent']['nIndex']
+ return "%s (node %d, offset %d)" % (self.typename, node['nOffset'], offset)
+
+class SwPaMPrinter(object):
+ '''Prints SwPaM.'''
+
+ 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_pPoint'].dereference()
+ mark = self.value['m_pMark'].dereference()
+ children = [ ( 'point', point), ( 'mark', mark ) ]
+ return children.__iter__()
+
class BigPtrArrayPrinter(object):
'''Prints BigPtrArray.'''
@@ -110,6 +138,8 @@ def build_pretty_printers():
printer = printing.Printer("libreoffice/sw")
printer.add('BigPtrArray', BigPtrArrayPrinter)
+ printer.add('SwPosition', SwPositionPrinter)
+ printer.add('SwPaM', SwPaMPrinter)
def register_pretty_printers(obj):
printing.register_pretty_printer(printer, obj)
commit 7c4b75cfeabb988ba975283fa58a53cb3b67bd8e
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Mon Aug 29 11:30:57 2011 +0200
Ignore pyc files in git
diff --git a/.gitignore b/.gitignore
index e3ca556..58f491f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,9 @@
*~
.*.sw[op]
+# python generated file
+*.pyc
+
# where the 'subrepos' and downloads are located
/clone
/src
More information about the Libreoffice-commits
mailing list