[Libreoffice-commits] core.git: solenv/gdb
Stephan Bergmann
sbergman at redhat.com
Thu Jun 16 12:53:41 UTC 2016
solenv/gdb/libreoffice/cppu.py | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
New commits:
commit 8132c691dea66f9e402161ff8fac8e31f313b72d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 16 14:53:06 2016 +0200
Improve output of UnoAnyPrinter
Change-Id: I1461264fe7f951c9ecec777c6217d0acfb7e4254
diff --git a/solenv/gdb/libreoffice/cppu.py b/solenv/gdb/libreoffice/cppu.py
index 1ab2b6e..5114dbe 100644
--- a/solenv/gdb/libreoffice/cppu.py
+++ b/solenv/gdb/libreoffice/cppu.py
@@ -20,22 +20,16 @@ class UnoAnyPrinter(object):
self.typename = typename.replace('com::sun::star::', '')
def to_string(self):
- if self._is_set():
- return ('%s %s' % (self.typename, self._make_string()))
- else:
- return "empty %s" % self.typename
-
- def _is_set(self):
- return self.value['pType'].dereference()['eTypeClass'] != TypeClass.VOID
-
- def _make_string(self):
- ptr = self.value['pData']
- assert ptr
type_desc = self.value['pType']
assert type_desc
type = make_uno_type(type_desc.dereference())
assert type
- return str(uno_cast(type, ptr).dereference())
+ if type_desc.dereference()['eTypeClass'] == TypeClass.VOID:
+ return ('%s(%s)' % (self.typename, type.tag))
+ else:
+ ptr = self.value['pData']
+ assert ptr
+ return ('%s(%s: %s)' % (self.typename, type.tag, str(uno_cast(type, ptr).dereference())))
class UnoReferencePrinter(object):
'''Prints reference to a UNO interface'''
More information about the Libreoffice-commits
mailing list